Enum State

  • All Implemented Interfaces:
    Serializable, Comparable<State>

    public enum State
    extends Enum<State>
    A state specifies how an entity of the activity model ( ExecutableComponentDescription, Operation, ConfigurationSet and ActivityTemplateDefinition) may be used. Entities (more precisely their revision) IN_DEVELOPMENT may only be used for testing purpose. They are separated from the other entities in so-called development branches. Such a development branch may be released any time (if no conflicts occur). This sets the corresponding entity in state IN_PRODUCTION and all former revisions to OUTDATED. The corresponding entity may then be used normally unless set to OUTDATED which is allowed any time.
    By creating a new development branch, no entity is set to IN_DEVELOPMENT at first. This will happen as soon as one entity is retrieved and changed. Internally this creates a copy of the latest revision in the corresponding slot.

    This way you can have branches for the entitites currently under development but the revisions IN_PRODUCTION are strictly flat.

    Author:
    Ulrich Kreher
    • Enum Constant Detail

      • IN_DEVELOPMENT

        public static final State IN_DEVELOPMENT
        While being UNDER_CONSTRUTION, the corresponding entity is subject of changes with respect to the corresponding base revision. Such entities may only be used for local tests but not for the production system.

        IN_DEVELOPMENT of an entity having no released revision yet has a special semantics: This is the only revision which allows to change the names of ExecutableComponentDescriptions, Operations and ConfigurationSets. Since this name is used as unique identifier in the production system, it may not be changed when being IN_PRODUCTION and therefore not in the following revisions.

      • IN_PRODUCTION

        public static final State IN_PRODUCTION
        While being IN_PRODUCTION, the corresponding entity may be used normally. As soon as a new revision is set to IN_PRODUCTION, the state of the current revision automatically changes to OUTDATED. Besides this, the current revision may be explicitly set to OUTDATED.
      • OUTDATED

        public static final State OUTDATED
        OUTDATED is the last state in the lifecycle of (the revision of) an entity. Such an entity may not be used any more. This state is either set explicitly or implicitly when a new revision is set to IN_PRODUCTION. However, the latest revision of an entity may be outdated but it will still be the base for new development branches.
    • Method Detail

      • values

        public static State[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (State c : State.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static State valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCode

        public byte getCode()
        Returns a byte code representing this state. This code is resilient to reordering or renaming the enum constants.
        Returns:
        a byte code representing this state
      • valueOf

        public static State valueOf​(byte code)
        Returns the state for the given code or null if the code is not recognised.
        Parameters:
        code - the code for which to find the state
        Returns:
        the state for the given code