Enum Class State
- All Implemented Interfaces:
Serializable,Comparable<State>,java.lang.constant.Constable
A state specifies how an entity of the activity model (
By creating a new development branch, no entity is set to
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhile beingUNDER_CONSTRUTION, the corresponding entity is subject of changes with respect to the corresponding base revision.While beingIN_PRODUCTION, the corresponding entity may be used normally.OUTDATEDis the last state in the lifecycle of (the revision of) an entity. -
Method Summary
Modifier and TypeMethodDescriptionbytegetCode()Returns a byte code representing this state.static StatevalueOf(byte code) Returns the state for the given code ornullif the code is not recognised.static StateReturns the enum constant of this class with the specified name.static State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IN_DEVELOPMENT
While beingUNDER_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_DEVELOPMENTof an entity having no released revision yet has a special semantics: This is the only revision which allows to change the names ofExecutableComponentDescriptions,Operations andConfigurationSets. Since this name is used as unique identifier in the production system, it may not be changed when beingIN_PRODUCTIONand therefore not in the following revisions. -
IN_PRODUCTION
While beingIN_PRODUCTION, the corresponding entity may be used normally. As soon as a new revision is set toIN_PRODUCTION, the state of the current revision automatically changes toOUTDATED. Besides this, the current revision may be explicitly set toOUTDATED. -
OUTDATED
OUTDATEDis 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 toIN_PRODUCTION. However, the latest revision of an entity may be outdated but it will still be the base for new development branches.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- 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
Returns the state for the given code ornullif the code is not recognised.- Parameters:
code- the code for which to find the state- Returns:
- the state for the given code
-