Package wt.lifecycle

Class LifeCycleHelper

java.lang.Object
wt.lifecycle.LifeCycleHelper

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

Supported API: true

Extendable: false
  • Field Details

    • ALL

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

      Supported API: true
      See Also:
    • FIRST

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

      Supported API: true
      See Also:
    • LAST

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

      Supported API: true
      See Also:
    • service

      public static final LifeCycleService service


      Supported API: true
  • Method Details

    • isFinalPhase

      public static boolean isFinalPhase(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 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 set
      lifeCycle - the LifeCycle to be set on the LifeCycleManaged object.
      Returns:
      LifeCycleManaged
      Throws:
      LifeCycleException
      WTPropertyVetoException
    • setLifeCycle

      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
      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