nl.vpro.domain.subtitles.SubtitlesWorkflow Maven / Gradle / Ivy
package nl.vpro.domain.subtitles;
import java.util.*;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
import nl.vpro.domain.Xmlns;
import static java.util.Collections.unmodifiableSet;
/**
* @author Michiel Meeuwissen
* @since 5.11
*/
@XmlEnum
@XmlType(name = "subtitlesWorkflowEnum", namespace = Xmlns.SHARED_NAMESPACE)
public enum SubtitlesWorkflow {
/**
* Completely excluded from publishing/unpublishing logic. Not a real status, can can only be
* attained by manually setting it in the database.
*/
IGNORE,
/**
* Revoked because the media itself is not published, or is not playable
*/
REVOKED,
/**
* Marked for deletion, but not yet processed
*/
FOR_DELETION,
/**
* Marked deleted, and already revoked from API
*/
DELETED,
/**
* New subtitles, not yet processed for publication.
*/
FOR_PUBLICATION,
/**
* Changed subtitles, not yet processed for publication
*/
FOR_REPUBLICATION,
/**
* The subtitles are published to the API
*/
PUBLISHED,
/**
* Could not be published because of some error
*/
PUBLISH_ERROR,
/**
* The subtitles are not available in POMS. But the player probably does have them?
* This is missed opportunity, but that's how it is.
* @since 7.11
*/
MISSING
;
public static final Set NEEDS_WORK =
unmodifiableSet(new HashSet<>(
Arrays.asList(
FOR_DELETION,
FOR_PUBLICATION,
FOR_REPUBLICATION
))
);
public static final Set NOT_PUBLISHED = unmodifiableSet(new HashSet<>(Arrays.asList(FOR_DELETION, DELETED, REVOKED, FOR_PUBLICATION)));
public static final Set DELETEDS = unmodifiableSet(new HashSet<>(Arrays.asList(FOR_DELETION, DELETED)));
public static final Set INVISIBLE = DELETEDS;
}