wt.lifecycle
Class LifeCycleHelper

java.lang.Object
  extended by wt.lifecycle.LifeCycleHelper
All Implemented Interfaces:
Externalizable, Serializable

public class LifeCycleHelper
extends Object
implements Externalizable

LifeCycleHelper provides client invokable methods to life cycle services. These methods are executed on the client side.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static String ALL
          Transition initialization directive identifying all states in a sequence (life cycle).
static String FIRST
          Transition initialization directive identifying the first state in a sequence (life cycle).
static String LAST
          Transition initialization directive identifying the last state in a sequence (life cycle).
 
Method Summary
static boolean isDeterministic(Transition transition)
          Returns true if the argrument transition is among those specified in the system configuration to be deterministic and false otherwise.
static boolean isFinalPhase(wt.lifecycle.PhaseTemplate aPhaseTemplate)
          Answers whether the PhaseTemplate is a final phase

Supported API: true
static wt.lifecycle.LifeCycleManaged setLifeCycle(wt.lifecycle.LifeCycleManaged object, wt.lifecycle.LifeCycleTemplate lifeCycle)
          Set the LifeCycle of the LifeCycleManaged object and clear out the rest of the Life Cycle cookie.
static wt.lifecycle.LifeCycleManaged setLifeCycle(wt.lifecycle.LifeCycleManaged object, wt.lifecycle.LifeCycleTemplateReference lctRef)
          Set the LifeCycle of the LifeCycleManaged object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final String ALL
Transition initialization directive identifying all states in a sequence (life cycle).

Supported API: true

See Also:
Constant Field Values

FIRST

public static final String FIRST
Transition initialization directive identifying the first state in a sequence (life cycle).

Supported API: true

See Also:
Constant Field Values

LAST

public static final String LAST
Transition initialization directive identifying the last state in a sequence (life cycle).

Supported API: true

See Also:
Constant Field Values
Method Detail

isFinalPhase

public static boolean isFinalPhase(wt.lifecycle.PhaseTemplate aPhaseTemplate)
                            throws WTException
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 wt.lifecycle.LifeCycleManaged setLifeCycle(wt.lifecycle.LifeCycleManaged object,
                                                         wt.lifecycle.LifeCycleTemplate lifeCycle)
                                                  throws wt.lifecycle.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 set
lifeCycle - the LifeCycle to be set on the LifeCycleManaged object.
Returns:
LifeCycleManaged
Throws:
wt.lifecycle.LifeCycleException
WTPropertyVetoException

setLifeCycle

public static wt.lifecycle.LifeCycleManaged setLifeCycle(wt.lifecycle.LifeCycleManaged object,
                                                         wt.lifecycle.LifeCycleTemplateReference lctRef)
                                                  throws WTException,
                                                         wt.lifecycle.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 set
lctRef - the LifeCycleReference of the LifeCycle that should be set on the LifeCycleManaged object.
Returns:
LifeCycleManaged
Throws:
WTException
wt.lifecycle.LifeCycleException
WTPropertyVetoException

isDeterministic

public static boolean isDeterministic(Transition transition)
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