com.centrasite.lcmapi
Interface LCModel


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 LCMAdminManager.createNewVersion(LCModel). Refer to CentraSiteVMS to know more about versioning of registry objects.


Method Summary
 boolean activable(LCModelState lcModelState)
          Checks whether this LC Model can be activated
 boolean addEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes)
          Enables the given registry types for LCM with this LCModel
 boolean addEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes, boolean enableAsLCMforLCM)
          Enables the given registry types 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
 void deleteModel()
          delete the model
 javax.xml.registry.infomodel.InternationalString getDescription()
          Returns the description of this LCModel
 javax.xml.registry.infomodel.InternationalString getDisplayName()
          Returns the displayName of this LCModel
 java.util.Collection<javax.xml.registry.infomodel.Concept> getEnabledTypes()
          Returns the types enabled for LCM with this LCModel
 LCState getInitialState()
          Returns the initialState of this LCModel
 javax.xml.registry.infomodel.ClassificationScheme getModelClassificationScheme()
          Return the underlying LCModel Classification Scheme
 LCModel getOldVersion()
          if this lc model has old version returns the same, else return null
 javax.xml.registry.infomodel.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<javax.xml.registry.infomodel.Concept> registryTypes)
          Removes the given types for LCM with this LCModel.
 boolean removeEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes, 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(javax.xml.registry.infomodel.InternationalString description)
          Sets the description for the model
 void setDisplayName(javax.xml.registry.infomodel.InternationalString displayName)
          Set the display name of the model
 void setInitialState(LCState state)
          Set the initial state for the LCModel.
 void setModelState(LCModelState modelState)
          Sets the state of the model
 void setOrganization(javax.xml.registry.infomodel.Organization organization, boolean global)
          Set the organization for this model
 void validate()
          Validates this LCModel
 

Method Detail

getDisplayName

javax.xml.registry.infomodel.InternationalString getDisplayName()
                                                                throws LCMException
Returns the displayName of this LCModel

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

getDescription

javax.xml.registry.infomodel.InternationalString getDescription()
                                                                throws LCMException
Returns the description of this LCModel

Returns:
description as InternationalString
Throws:
LCMException - - if the LCM provider encounters an internal error

getEnabledTypes

java.util.Collection<javax.xml.registry.infomodel.Concept> getEnabledTypes()
                                                                           throws LCMException
Returns the types enabled for LCM with this LCModel

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

getInitialState

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

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

getOrganization

javax.xml.registry.infomodel.Organization getOrganization()
                                                          throws LCMException
Returns the organization to which the LCModel belongs to

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

getStates

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

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

setDisplayName

void setDisplayName(javax.xml.registry.infomodel.InternationalString displayName)
                    throws LCMException
Set the display name of the model

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

setDescription

void setDescription(javax.xml.registry.infomodel.InternationalString description)
                    throws LCMException
Sets the description for the model

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

setOrganization

void setOrganization(javax.xml.registry.infomodel.Organization organization,
                     boolean global)
                     throws LCMException
Set the organization for this model

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

setInitialState

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

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

setModelState

void setModelState(LCModelState modelState)
                   throws LCMException
Sets the state of the model

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

addEnabledTypes

boolean addEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes)
                        throws LCMException
Enables the given registry types for LCM with this LCModel

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

addEnabledTypes

boolean addEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes,
                        boolean enableAsLCMforLCM)
                        throws LCMException
Enables the given registry types for LCM with this LCModel and enables this LCModel as LCM for LCModels if the enableAsLCMforLCM is specified true.

Parameters:
registryTypes - 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:
LCMException - - if the LCM provider encounters an internal error

addStates

boolean addStates(java.util.Collection<LCState> states)
                  throws LCMException
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:
LCMException

removeState

boolean removeState(LCState state)
                    throws LCMException
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:
LCMException - - if the LCM provider encounters an internal error

removeEnabledTypes

boolean removeEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes)
                           throws LCMException
Removes the given types 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:
registryTypes - collection of types that can be removed for LCM
Returns:
true if the LCModel is deleted as a result of the call, false otherwise
Throws:
LCMException - - if the LCM provider encounters an internal error

removeEnabledTypes

boolean removeEnabledTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> registryTypes,
                           boolean disableAsLCMforLCM)
                           throws LCMException
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:
registryTypes - collection 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:
LCMException - - if the LCM provider encounters an internal error

isGlobal

boolean isGlobal()
                 throws LCMException
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:
LCMException - - if the LCM provider encounters an internal error

isLCMForLCM

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

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

validate

void validate()
              throws LCMException
Validates this LCModel

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

getModelClassificationScheme

javax.xml.registry.infomodel.ClassificationScheme getModelClassificationScheme()
                                                                               throws LCMException
Return the underlying LCModel Classification Scheme

Returns:
LCModel's classification scheme
Throws:
LCMException - - if the LCM provider encounters an internal error

activable

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

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

getOldVersion

LCModel getOldVersion()
                      throws LCMException
if this lc model has old version returns the same, else return null

Returns:
old version LCModel if any, null otherwise
Throws:
LCMException

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

deleteModel

void deleteModel()
                 throws LCMException
delete the model

Throws:
LCMException