com.softwareag.centrasite.appl.framework.lcm
Interface LCModel

All Known Implementing Classes:
LCModelImpl

public interface LCModel

LC Models are state machines for Lifecycle Management and the state machines may not have any states that cannot be reached The LCModel provides methods for all operations that can be performed on an LCModel When the LCModel becomes active, no change in the LCModel will be allowed. Instead, a new version of the LCModel can be created using LCModel.createVersion(). Refer to CentraSiteVMS to know more about versioning.


Method Summary
 boolean activable(LCModelState lcModelState)
          Checks whether this LC Model can be activated
 boolean addEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys)
          Enables the registry types for the given UDDI keys for LCM with this LCModel
 boolean addEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys, boolean enableAsLCMforLCM)
          Enables the registry types for the given UDDI keys for LCM with this LCModel and enables this LCModel as LCM for LCModels if the enableAsLCMforLCM is specified true.
 boolean addStates(java.util.Collection<LCState> states)
          Adds the given states to this LCModel
 LCState createLCState()
          Creates an LCState
 LCModel createVersion()
          Creates a new version of a given LCModel
 java.lang.String getDescription()
          Returns the description of this LCModel
 java.lang.String getDisplayName()
          Returns the displayName of this LCModel
 java.util.Collection<java.lang.String> getEnabledTypes()
          Returns the UDDI keys of the enabled types for LCM with this LCModel
 LCState getInitialState()
          Returns the initialState of this LCModel
 java.lang.String getKey()
          Return the LCModel Key
 LCAwareClassificationScheme getModelClassificationScheme()
          Return the ClassificationScheme
 Organization getOrganization()
          Returns the organization to which the LCModel belongs to
 java.util.Collection<LCState> getStates()
          Returns the states of the LCModel
 boolean isActive()
          Checks whether the model is Active.
 boolean isGlobal()
          Checks whether the model is global.
 boolean isInactive()
          Checks whether the model is Inactive.
 boolean isLCMForLCM()
          Checks whether the model is a LCM for LCM
 boolean isRetired()
          Checks whether the model is Retired.
 boolean isSuperseded()
          Checks whether the model is Superseded.
 boolean removeEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys)
          Removes types for the given UDDI keys for LCM with this LCModel.
 boolean removeEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys, boolean disableAsLCMforLCM)
          Removes the given types for LCM with this LCModel and disables this LCModel as LCM for LCModels if the disableAsLCMforLCM is specified true.
 boolean removeState(LCState state)
          Remove the given state from the LCModel
 void setDescription(java.lang.String description)
          Sets the description for the model
 void setDisplayName(java.lang.String displayName)
          Set the display name of the model
 void setInitialState(LCState state)
          Set the initial state for the LCModel.
 void setLCState(LCState targetState)
          Changes the life cycle state of the LCModel.
 void setModelState(LCModelState modelState)
          Deprecated. use setLCState(LCState)
 void setOrganization(Organization organization, boolean global)
          Set the organization for this model
 void validate()
          Validates this LCModel
 

Method Detail

getDisplayName

java.lang.String getDisplayName()
                                throws CSAppFrameworkException
Returns the displayName of this LCModel

Returns:
displayName of the LCModel
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getDescription

java.lang.String getDescription()
                                throws CSAppFrameworkException
Returns the description of this LCModel

Returns:
description as String
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getEnabledTypes

java.util.Collection<java.lang.String> getEnabledTypes()
                                                       throws CSAppFrameworkException
Returns the UDDI keys of the enabled types for LCM with this LCModel

Returns:
collection of UDDI keys of enabled types, cannot be null
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getInitialState

LCState getInitialState()
                        throws CSAppFrameworkException
Returns the initialState of this LCModel

Returns:
initialState as LCState object
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getOrganization

Organization getOrganization()
                             throws CSAppFrameworkException
Returns the organization to which the LCModel belongs to

Returns:
organization the LCModel belongs to
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getStates

java.util.Collection<LCState> getStates()
                                        throws CSAppFrameworkException
Returns the states of the LCModel

Returns:
LCStates as a collection, cannot be null
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setDisplayName

void setDisplayName(java.lang.String displayName)
                    throws CSAppFrameworkException
Set the display name of the model

Parameters:
displayName -
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setDescription

void setDescription(java.lang.String description)
                    throws CSAppFrameworkException
Sets the description for the model

Parameters:
description - to be set
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setOrganization

void setOrganization(Organization organization,
                     boolean global)
                     throws CSAppFrameworkException
Set the organization for this model

Parameters:
organization - for the model
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setInitialState

void setInitialState(LCState state)
                     throws CSAppFrameworkException
Set the initial state for the LCModel.

Parameters:
state - to be set as the initial state for this model
Throws:
CSAppFrameworkException - if the given state is not a part of the model at the time of calling this method

setModelState

void setModelState(LCModelState modelState)
                   throws CSAppFrameworkException
Deprecated. use setLCState(LCState)

Sets the state of the model.

Parameters:
modelState - - LCModelState to be set
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

addEnabledTypes

boolean addEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys)
                        throws CSAppFrameworkException
Enables the registry types for the given UDDI keys for LCM with this LCModel

Parameters:
registryTypeKeys - of the types to be enabled for this LCModel
Returns:
true if all the given types are added, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

addEnabledTypes

boolean addEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys,
                        boolean enableAsLCMforLCM)
                        throws CSAppFrameworkException
Enables the registry types for the given UDDI keys for LCM with this LCModel and enables this LCModel as LCM for LCModels if the enableAsLCMforLCM is specified true.

Parameters:
registryTypeKeys - of the types to be enabled for this LCModel
enableAsLCMforLCM - to be enabled as LCM for LCModels
Returns:
true if all the given types are added, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

addStates

boolean addStates(java.util.Collection<LCState> states)
                  throws CSAppFrameworkException
Adds the given states to this LCModel

Parameters:
states - to be added to this LCModel
Returns:
true if all the given states are added, false otherwise
Throws:
CSAppFrameworkException

removeState

boolean removeState(LCState state)
                    throws CSAppFrameworkException
Remove the given state from the LCModel

Parameters:
state - The LCState that has to be removed from this LCModel
Returns:
true if the given state is successfully removed, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

removeEnabledTypes

boolean removeEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys)
                           throws CSAppFrameworkException
Removes types for the given UDDI keys for LCM with this LCModel. If all LCM-enabled types (including LCM for LCM, if applicable) are being removed from the model with the call to this method, then the model and its states will automatically be deleted thereby making the LCModel unusable.

Parameters:
registryTypeKeys - collection of registry type keys that can be removed for LCM
Returns:
true if the LCModel is deleted as a result of the call, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

removeEnabledTypes

boolean removeEnabledTypes(java.util.Collection<java.lang.String> registryTypeKeys,
                           boolean disableAsLCMforLCM)
                           throws CSAppFrameworkException
Removes the given types for LCM with this LCModel and disables this LCModel as LCM for LCModels if the disableAsLCMforLCM is specified true. If all LCM-enabled types (including LCM for LCM, if applicable) are being removed from the model with the call to this method, then the model and its states will automatically be deleted thereby making the LCModel unusable.

Parameters:
registryTypeKeys - collection of registry type keys of Types that can be removed for LCM
disableAsLCMforLCM - to be disabled as LCM for LCModels
Returns:
true if the LCModel is deleted as a result of the call, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

isGlobal

boolean isGlobal()
                 throws CSAppFrameworkException
Checks whether the model is global. There are two levels of LCModels. A global model attached to the default organization and a local model is the one associated with any other organization

Returns:
true if the above condition is met, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

isLCMForLCM

boolean isLCMForLCM()
                    throws CSAppFrameworkException
Checks whether the model is a LCM for LCM

Returns:
true if the above condition met, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

validate

void validate()
              throws CSAppFrameworkException
Validates this LCModel

Throws:
CSAppFrameworkException - - if the validation fails or if the LCM provider encounters an internal error

activable

boolean activable(LCModelState lcModelState)
                  throws CSAppFrameworkException
Checks whether this LC Model can be activated

Parameters:
lcModelState -
Returns:
true if it can be activated else throws CSAppFrameworkException
Throws:
CSAppFrameworkException

createVersion

LCModel createVersion()
                      throws CSAppFrameworkException
Creates a new version of a given LCModel

Returns:
the new version of the lcModel
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

createLCState

LCState createLCState()
                      throws CSAppFrameworkException
Creates an LCState

Returns:
the new LCState object
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

isInactive

boolean isInactive()
Checks whether the model is Inactive.

Returns:
true if the model is Inactive, false otherwise

isActive

boolean isActive()
Checks whether the model is Active.

Returns:
true if the model is Active, false otherwise

isSuperseded

boolean isSuperseded()
Checks whether the model is Superseded.

Returns:
true if the model is Superseded, false otherwise

isRetired

boolean isRetired()
Checks whether the model is Retired.

Returns:
true if the model is Retired, false otherwise

getKey

java.lang.String getKey()
                        throws CSAppFrameworkException
Return the LCModel Key

Returns:
LCModel's key
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getModelClassificationScheme

LCAwareClassificationScheme getModelClassificationScheme()
                                                         throws CSAppFrameworkException
Return the ClassificationScheme

Returns:
LCModel's ClassificationScheme
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setLCState

void setLCState(LCState targetState)
                throws CSAppFrameworkException
Changes the life cycle state of the LCModel. The default states are new, productive and retired.

Parameters:
targetState -
Throws:
CSAppFrameworkException