|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.lifecycle.LifeCycleHelper
LifeCycleHelper provides client invokable methods to life cycle services.
These methods are executed on the client side.
Supported API: true
Extendable: false
Field Summary | |
static String |
ALL
Transition initialization directive identifying all states in a sequence (life cycle). |
private static String |
CLASSNAME
|
private static Set |
deterministicTransitions
|
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
FIRST
Transition initialization directive identifying the first state in a sequence (life cycle). |
private static String |
INIT_PROPERTY_PREFIX
|
static String |
LAST
Transition initialization directive identifying the last state in a sequence (life cycle). |
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static LifeCycleService |
service
Supported API: false |
private static Map |
transitionDirectives
|
private static boolean |
VERBOSE
|
Constructor Summary | |
LifeCycleHelper()
|
Method Summary | |
static Map |
getDefaultTransitions(List states,
int index)
Returns a map of the default transitions for the state at the specified index in the specified list. |
private static Set |
getDefaultTransitions(Set stateSet,
ArrayList stateList,
int index,
List transitionDirectives)
Returns the set of states computed for the first applicable transition directive. |
private static Set |
getDefaultTransitions(Set stateSet,
ArrayList stateList,
int index,
Object transitionDirective)
Returns the set of states computed for the specified transition directive. |
private static Set |
getDefaultTransitions(Set stateSet,
ArrayList stateList,
int index,
Set transitionDirectives)
Returns the union of the sets of states computed for each list of transition directives. |
private static Object |
getTransitionDirective(String token)
Returns a transition initialization directive specified by the argument token. |
private static List |
getTransitionDirectiveList(String tokenString)
Returns a list of transition directives, parsed from the argument token string. |
private static Map |
getTransitionDirectives(WTProperties wtProperties)
Returns a map of transitions to sets of lists of transition directives as specified in the WTProperties object. |
private static Set |
getTransitionDirectiveSet(String tokenString)
Returns a set of lists of transition directives, parsed from the argument token string. |
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(PhaseTemplate aPhaseTemplate)
Answers whether the PhaseTemplate is a final phase Supported API: true |
(package private) static WhereExpression |
noTransition(FromClause fc,
int lctIdx)
Returns a WHERE expression that selects a row from the argument FROM clause of a life cycle template query if the template does not have associated with it any transitions other than NEXT. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(LifeCycleHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
static LifeCycleManaged |
setLifeCycle(LifeCycleManaged object,
LifeCycleTemplate lifeCycle)
Set the LifeCycle of the LifeCycleManaged object and clear out the rest of the Life Cycle cookie. |
static LifeCycleManaged |
setLifeCycle(LifeCycleManaged object,
LifeCycleTemplateReference lctRef)
Set the LifeCycle of the LifeCycleManaged object. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String ALL
public static final String FIRST
public static final String LAST
private static final String INIT_PROPERTY_PREFIX
private static Set deterministicTransitions
private static Map transitionDirectives
public static final LifeCycleService service
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE
Constructor Detail |
public LifeCycleHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(LifeCycleHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static boolean isFinalPhase(PhaseTemplate aPhaseTemplate) throws WTException
aPhaseTemplate
- phase template that is being evaluated
WTException
public static LifeCycleManaged setLifeCycle(LifeCycleManaged object, LifeCycleTemplate lifeCycle) throws LifeCycleException, WTPropertyVetoException
object
- the LifeCycleManaged object whose life cycle will be setlifeCycle
- the LifeCycle to be set on the LifeCycleManaged object.
LifeCycleException
WTPropertyVetoException
public static LifeCycleManaged setLifeCycle(LifeCycleManaged object, LifeCycleTemplateReference lctRef) throws WTException, LifeCycleException, WTPropertyVetoException
object
- the LifeCycleManaged object whose life cycle should be setlctRef
- the LifeCycleReference of the LifeCycle that should be set on the LifeCycleManaged object.
WTException
LifeCycleException
WTPropertyVetoException
public static boolean isDeterministic(Transition transition)
transition
- the Transition whose configuration as deterministic is to be determined
public static Map getDefaultTransitions(List states, int index) throws LifeCycleException
states
- list of states intended (though not required) to represent the sequence of unique states in a defined life cycle template; may not contain duplicatesindex
- index of a state in the List argument for which the default transitions are to be determined
LifeCycleException
static WhereExpression noTransition(FromClause fc, int lctIdx) throws QueryException
fc
- FROM clause of a query spec for a life cycle template (wt.lifecycle.LifeCycleTemplate)lctIdx
- index of the life cycle template (wt.lifecycle.LifeCycleTemplate) in the argument FROM clause
QueryException
private static Map getTransitionDirectives(WTProperties wtProperties) throws LifeCycleException
LifeCycleException
private static Set getTransitionDirectiveSet(String tokenString) throws LifeCycleException
tokenString
- String of tokens specifying valid transition initialization directives
LifeCycleException
- if any token is invalid
NullPointerException
- if tokenString is nullprivate static List getTransitionDirectiveList(String tokenString) throws LifeCycleException
tokenString
- String of tokens specifying valid transition initialization directives
LifeCycleException
- if any token is invalid
NullPointerException
- if tokenString is nullprivate static Object getTransitionDirective(String token) throws LifeCycleException
token
- the parsed token specifying a valid transition initialization directive
LifeCycleException
- if the argument token is invalid
NullPointerException
- if token is nullprivate static Set getDefaultTransitions(Set stateSet, ArrayList stateList, int index, Set transitionDirectives)
private static Set getDefaultTransitions(Set stateSet, ArrayList stateList, int index, List transitionDirectives)
private static Set getDefaultTransitions(Set stateSet, ArrayList stateList, int index, Object transitionDirective)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |