All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.vpro.domain.media.update.action.MoveAction Maven / Gradle / Ivy

Go to download

The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it. It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.

There is a newer version: 8.3.1
Show newest version
/*
 * Copyright (C) 2015 Licensed under the Apache License, Version 2.0
 * VPRO The Netherlands
 */
package nl.vpro.domain.media.update.action;

import lombok.*;

import jakarta.xml.bind.annotation.*;

/**
 * @author Roelof Jan Koekoek
 * @since 3.8
 */
@XmlRootElement(name = "move")
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "moveActionType",
    propOrder = {
        "from",
        "to"
    })
@ToString
@Data
@lombok.Builder
@AllArgsConstructor
public class MoveAction {


    public MoveAction() {

    }

    /**
     * What the 'from' and 'to' properties of the actions are referring to.
     * @since 7.10.1
     */
    @XmlType(name = "moveActionTypeType")
    public enum Type {
        /**
         * A reference to a mediaobject. MID, crid, or id.
         */
        REFERENCE,

        /**
         * The id of the memberref itself
         * @since 7.12
         */
        REF_ID,

        /**
         * The number in the member ref (unsupported as yet)
         */
        NUMBER,

        /**
         * The (offset 0) index in the corresponding list.
         */
        INDEX
    }

    @XmlAttribute(name = "type")
    Type type;


    public Type getEffectiveType() {
        return type == null ? Type.INDEX : type;
    }

    /**
     * The {@link #getType()} of the object to move from
     */
    @XmlElement(required = true)
    private String from;


    /**
     * The {@link #getType()} of the object to move from
     */
    @XmlElement(required = true)
    private String to;


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy