public interface LCState
LCState
provides access to
the LCState and state specific operations.Modifier and Type | Method and Description |
---|---|
void |
addNextStates(java.util.Collection<LCState> nextStates)
Adds the given collection of states as next states to this
LCState
Please make sure that this LC state is added to a LC model before adding next states.
|
void |
addPromotionNodes(java.util.Collection<LCMNode> promotionNodes)
Adds the promotion node for this state.
|
javax.xml.registry.infomodel.InternationalString |
getDescription()
Returns the description of this LCState
|
java.lang.String |
getName()
Returns the name of this LCState
|
java.util.Collection<LCState> |
getNextStates()
Returns the next states of this LCState
|
LCState |
getPreferredNexState()
Returns the preferred next state of this LCState
|
java.util.Collection<LCMNode> |
getPromotionNodes()
Returns the promotion nodes
|
java.util.Collection |
getRestrictedTo()
Returns the collection of user / role / groups for which the transition to this
state is restricted.
|
javax.xml.registry.infomodel.Concept |
getStateConcept()
Returns the underlying State Concept
|
boolean |
isTransitionAllowed()
Checks if the current logged in user has the sufficient permissions
that match the restriction criteria of the state transition
|
void |
removeNextState(LCState nextState)
Removes the given state as next state of this LCState
|
void |
removePromotionNodes(java.util.Collection<LCMNode> promotionNodes)
Removes the promotion node for this state.
|
void |
restrictTo(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> restrictedFor)
Allows restricting the state transitions to particular users / roles / groups
Note that calling this method will overwrite any existing restrictions for the state
|
void |
setDescription(javax.xml.registry.infomodel.InternationalString description)
Sets the description for the LCState
|
void |
setName(java.lang.String name)
Sets the name for the LCState
|
void |
setPreferredNextState(LCState state)
Sets the preferred next state for this LCState
The LCState passed here should be one of the states added
as a next state to this LCState via the addNextStates() call.
|
java.lang.String getName() throws LCMException
String
LCMException
- if the LCM provider encounters an internal error while getting the name of the current LCStatejavax.xml.registry.infomodel.InternationalString getDescription() throws LCMException
InternationalString
LCMException
- if the LCM provider encounters an internal error while getting the description of the current LCStatejava.util.Collection<LCState> getNextStates() throws LCMException
LCState
objects, cannot be nullLCMException
- if the LCM provider encounters an internal error while getting the next statesLCState getPreferredNexState() throws LCMException
LCState>
LCMException
- if the LCM provider encounters an internal error while getting preferred next statejava.util.Collection<LCMNode> getPromotionNodes() throws LCMException
LCMNode
objectsLCMException
- if the LCM provider encounters an internal errorvoid setName(java.lang.String name) throws LCMException
name
- as String
LCMException
- if the LCM provider encounters an internal error while updating the namevoid setDescription(javax.xml.registry.infomodel.InternationalString description) throws LCMException
description
- to be set as InternationalString
LCMException
- if the LCM provider encounters an internal error while updating the descriptionvoid addNextStates(java.util.Collection<LCState> nextStates) throws LCMException
nextStates
- collection of states of type LCState
to be added as next statesLCMException
- if the LCM provider encounters an internal error while adding the next statesvoid addPromotionNodes(java.util.Collection<LCMNode> promotionNodes) throws LCMException
promotionNodes
- the promotion nodes as a collection of LCMNode
objectsLCMException
- if the LCM provider encounters an internal error while promoting the nodesvoid removePromotionNodes(java.util.Collection<LCMNode> promotionNodes) throws LCMException
promotionNodes
- the promotion nodes as a collection of LCMNode
objectsLCMException
- if the LCM provider encounters an internal errorvoid removeNextState(LCState nextState) throws LCMException
nextState
- nextState LCState
objectLCMException
- if the LCM provider encounters an internal error while the removing the next statevoid setPreferredNextState(LCState state) throws LCMException
state
- the preferred next state for this LCState
LCMException
- if the given state is not currently assigned as a next statevoid restrictTo(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> restrictedFor) throws LCMException
restrictedFor
- should be a collection of User objects or a RegistryEntries that are classified
as group (OBJECT_TYPE_KEY_Group) or role (OBJECT_TYPE_KEY_ROLE)LCMException
- if the given registry object does not meet the above conditions or
if the LCM provider encounters an internal errorjava.util.Collection getRestrictedTo() throws LCMException
LCMException
- If the LCM provider encounters an internal errorboolean isTransitionAllowed() throws LCMException
true
if the transition is allowed, false
otherwiseLCMException
- if the LCM provider encounters an internal errorjavax.xml.registry.infomodel.Concept getStateConcept() throws LCMException
Concept
objectLCMException
- if the LCM provider encounters an internal error