Package wt.lifecycle
Class LifeCycleHelper
java.lang.Object
wt.lifecycle.LifeCycleHelper
LifeCycleHelper provides client invokable methods to life cycle services.
These methods are executed on the client side.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTransition initialization directive identifying all states in a sequence (life cycle).static final StringTransition initialization directive identifying the first state in a sequence (life cycle).static final StringTransition initialization directive identifying the last state in a sequence (life cycle).static final LifeCycleService
Supported API: true -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDeterministic(Transition transition) Returns true if the argrument transition is among those specified in the system configuration to be deterministic and false otherwise.static booleanisFinalPhase(PhaseTemplate aPhaseTemplate) Answers whether the PhaseTemplate is a final phase
Supported API: truestatic LifeCycleManagedsetLifeCycle(LifeCycleManaged object, LifeCycleTemplate lifeCycle) Set the LifeCycle of the LifeCycleManaged object and clear out the rest of the Life Cycle cookie.static LifeCycleManagedsetLifeCycle(LifeCycleManaged object, LifeCycleTemplateReference lctRef) Set the LifeCycle of the LifeCycleManaged object.
-
Field Details
-
ALL
Transition initialization directive identifying all states in a sequence (life cycle).
Supported API: true- See Also:
-
FIRST
Transition initialization directive identifying the first state in a sequence (life cycle).
Supported API: true- See Also:
-
LAST
Transition initialization directive identifying the last state in a sequence (life cycle).
Supported API: true- See Also:
-
service
Supported API: true
-
-
Method Details
-
isFinalPhase
Answers whether the PhaseTemplate is a final phase
Supported API: true- Parameters:
aPhaseTemplate- phase template that is being evaluated- Returns:
- boolean
- Throws:
WTException
-
setLifeCycle
public static LifeCycleManaged setLifeCycle(LifeCycleManaged object, LifeCycleTemplate lifeCycle) throws LifeCycleException, WTPropertyVetoException Set the LifeCycle of the LifeCycleManaged object and clear out the rest of the Life Cycle cookie. If the object is already persisted, this method will throw an exception.
Supported API: true- Parameters:
object- the LifeCycleManaged object whose life cycle will be setlifeCycle- the LifeCycle to be set on the LifeCycleManaged object.- Returns:
- LifeCycleManaged
- Throws:
LifeCycleExceptionWTPropertyVetoException
-
setLifeCycle
public static LifeCycleManaged setLifeCycle(LifeCycleManaged object, LifeCycleTemplateReference lctRef) throws WTException, LifeCycleException, WTPropertyVetoException Set the LifeCycle of the LifeCycleManaged object. If the object is already persisted, this method will throw an exception.
Supported API: true- Parameters:
object- the LifeCycleManaged object whose life cycle should be setlctRef- the LifeCycleReference of the LifeCycle that should be set on the LifeCycleManaged object.- Returns:
- LifeCycleManaged
- Throws:
WTExceptionLifeCycleExceptionWTPropertyVetoException
-
isDeterministic
Returns true if the argrument transition is among those specified in the system configuration to be deterministic and false otherwise. A transition is deterministic if it is permitted to be used at most once for a given source state.
Supported API: true- Parameters:
transition- the Transition whose configuration as deterministic is to be determined- Returns:
- boolean
-