CeState

CE State

The CeState is an object which allows to retrieve different states of a configuration entity. The most important APIs for generator and script code are:
  • IParameterStatePublished
  • IContainerStatePublished

Getting a CeState object

The BSWMD models implement methods to get the CeState for a specific CE as the following listing shows (the types GIParameter and GIContainer are interface base types in the BSWMD models):
GIParameter parameter = ...;
IParameterStatePublished parameterState = parameter.getCeState();

GIContainer container = ...;
IContainerStatePublished containerState = container.getCeState();

IParameterStatePublished

The IParameterStatePublished 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.

IParameterStatePublished class structure
Figure 1. IParameterStatePublished class structure


Parameters have different types of state information:
  • Simple state retrieval
    Example: The method isUserDefined() returns true when the parameter has a user-defined flag.
  • States and values (pre-configuration, recommended configuration and initial (derived) values)
    Example: The method hasPreConfigurationValue() returns true when the parameter has a pre-configured value. getPreConfigurationValue() returns this value.
  • States and reasons
    Example: The method isDeletionAllowedAccordingToCurrentConfigurationPhase() returns true if the parameter can be deleted in the current configuration phase (post-build loadable projects only).

IContainerStatePublished

The IContainerStatePublished 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.

IContainerStatePublished class structure
Figure 2. IContainerStatePublished class structure


This API provides state information similar to IParameterStatePublished. Some of the states are container-specific, of course. getCreationPhase(), for example,
which returns the phase a container in a post-build loadable configuration has been created in.