CeState
CE State
The
Parameters have different types of state information:
This API provides state information similar to IParameterStatePublished. Some of the states are container-specific, of course.
CeState is an object which allows to retrieve
different states of a configuration entity.
The most important
APIs for generator and script code are:
IParameterStatePublishedIContainerStatePublished
Getting a CeState object
The BSWMD models implement methods to get the CeState for a specific CE as the following listing shows (the typesGIParameter and GIContainer are
interface base types in the BSWMD models):
GIParameter parameter = ...;
IParameterStatePublished parameterState = parameter.getCeState();
GIContainer container = ...;
IContainerStatePublished containerState = container.getCeState();
IParameterStatePublished
TheIParameterStatePublished specifies a type-safe published API for parameter states. It mainly covers the following state
information
- Does this parameter have a pre-configuration value? What is this value? The same information is being provided for recommended and initial (derived) values
- Is this parameter user-defined?
- Is value change or deletion allowed in the current configuration phase (post-build loadable use case)?
- What is the configuration class of this parameter
The figure ParameterStateClasses shows the inheritance hierarchy of the IParameterStatePublished class and its sub classes.
Figure 1. IParameterStatePublished class structure
- Simple state retrieval
Example: The methodisUserDefined()returns true when the parameter has a user-defined flag. - States and values (pre-configuration, recommended configuration and initial (derived) values)
Example: The methodhasPreConfigurationValue()returns true when the parameter has a pre-configured value.getPreConfigurationValue()returns this value. - States and reasons
Example: The methodisDeletionAllowedAccordingToCurrentConfigurationPhase()returns true if the parameter can be deleted in the current configuration phase (post-build loadable projects only).
IContainerStatePublished
TheIContainerStatePublished specifies a type-safe published API for container states. It mainly covers the following state
information
- Does this container have a pre-configuration container (includes access to this container)? The same information is being provided for recommended and initial (derived) values
- Is change or deletion allowed in the current configuration phase (post-build loadable use case)?
- In which configuration phase has this container been created in (post-build loadable use case)?
- What is the configuration class of this container
The figure ContainerStateClasses shows the inheritance hierarchy of the IContainerStatePublished class and its sub classes.
Figure 2. IContainerStatePublished class structure
getCreationPhase(), for example,
which returns the phase a container in a post-build loadable configuration has been created in.