com.softwareag.centrasite.appl.framework.lcm.impl
Class LCStateImpl

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.lcm.impl.LCStateImpl
All Implemented Interfaces:
LCState
Direct Known Subclasses:
LCRegistryObjectStateImpl

public class LCStateImpl
extends java.lang.Object
implements LCState

An implementation class able of managing all LCState operations


Method Summary
 void addNextStates(java.util.Collection<LCState> nextStates)
          Adds the given collection of states as next states to this LCState
 java.lang.String getDescription()
          Returns the description of this LCState
 com.centrasite.lcmapi.LCState getGenericState()
          Returns the generic com.centrasite.lcmapi.LCState wrapped by LCStateImpl
 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 to this LCState
 java.lang.String getStateConcept()
          Returns the underlying State Concept key
 boolean isTransitionAllowed()
          Checks if the current logged in user has the sufficient permissions that match restriction criteriion of the state transition
 void removeNextState(LCState nextState)
          Removes the given state as next state to this LCState
 void setDescription(java.lang.String 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 addNextStates() call
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGenericState

public com.centrasite.lcmapi.LCState getGenericState()
Returns the generic com.centrasite.lcmapi.LCState wrapped by LCStateImpl

Returns:
com.centrasite.lcmapi.LCState

getName

public java.lang.String getName()
                         throws CSAppFrameworkException
Description copied from interface: LCState
Returns the name of this LCState

Specified by:
getName in interface LCState
Returns:
name of the LCState as String
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getDescription

public java.lang.String getDescription()
                                throws CSAppFrameworkException
Description copied from interface: LCState
Returns the description of this LCState

Specified by:
getDescription in interface LCState
Returns:
description as String
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getNextStates

public java.util.Collection<LCState> getNextStates()
                                            throws CSAppFrameworkException
Description copied from interface: LCState
Returns the next states of this LCState

Specified by:
getNextStates in interface LCState
Returns:
the next states as a Collection, cannot be null
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getPreferredNexState

public LCState getPreferredNexState()
                             throws CSAppFrameworkException
Description copied from interface: LCState
Returns the preferred next state to this LCState

Specified by:
getPreferredNexState in interface LCState
Returns:
preferred next state as LCState
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setName

public void setName(java.lang.String name)
             throws CSAppFrameworkException
Description copied from interface: LCState
Sets the name for the LCState

Specified by:
setName in interface LCState
Parameters:
name - as String
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setDescription

public void setDescription(java.lang.String description)
                    throws CSAppFrameworkException
Description copied from interface: LCState
Sets the description for the LCState

Specified by:
setDescription in interface LCState
Parameters:
description - to be set
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

addNextStates

public void addNextStates(java.util.Collection<LCState> nextStates)
                   throws CSAppFrameworkException
Description copied from interface: LCState
Adds the given collection of states as next states to this LCState

Specified by:
addNextStates in interface LCState
Parameters:
nextStates - collection of states to be added as next states
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

removeNextState

public void removeNextState(LCState nextState)
                     throws CSAppFrameworkException
Description copied from interface: LCState
Removes the given state as next state to this LCState

Specified by:
removeNextState in interface LCState
Parameters:
nextState - nextState LCState object
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

setPreferredNextState

public void setPreferredNextState(LCState state)
                           throws CSAppFrameworkException
Description copied from interface: LCState
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 addNextStates() call

Specified by:
setPreferredNextState in interface LCState
Parameters:
state - the preferred next sate for this LCState
Throws:
CSAppFrameworkException - if the given state is not currently assigned as a next state

isTransitionAllowed

public boolean isTransitionAllowed()
                            throws CSAppFrameworkException
Description copied from interface: LCState
Checks if the current logged in user has the sufficient permissions that match restriction criteriion of the state transition

Specified by:
isTransitionAllowed in interface LCState
Returns:
true if the transition is allowed, false otherwise
Throws:
CSAppFrameworkException - - if the LCM provider encounters an inernal error

getStateConcept

public java.lang.String getStateConcept()
                                 throws CSAppFrameworkException
Description copied from interface: LCState
Returns the underlying State Concept key

Specified by:
getStateConcept in interface LCState
Returns:
State concept key
Throws:
CSAppFrameworkException - - if the LCM provider encounters an inernal error