wt.lifecycle
Class PhaseTemplate

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.project.WTRoleHolder
          extended bywt.project.WTActorRoleHolder
              extended bywt.project.WTIndirectRoleHolder
                  extended bywt.lifecycle.PhaseTemplate
All Implemented Interfaces:
ActorRoleHolder, DisplayIdentification, Externalizable, IndirectRoleHolder, NetFactor, ObjectMappable, Persistable, RoleHolder, Serializable

public final class PhaseTemplate
extends WTIndirectRoleHolder
implements Externalizable

PhaseTemplate is a building block class for forming a life cycle definition. An ordered sequence of phase templates are connected to instantiate a life cycle template.

A PhaseTemplate is also a factory for creating Phase instances. The template specifies the state and behavior for a period of time when an object has that specific state.

Use the newPhaseTemplate static factory method(s), not the PhaseTemplate constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
LifeCycleTemplate, Phase, Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
static String FINAL_PHASE
          Label for the attribute; a flag to determine whether or not there is a successor to this phase

Supported API: false
private  boolean finalPhase
           
static String GATE_WORKFLOW_ID
          Label for the attribute.
static String GATE_WORKFLOW_ID_REFERENCE
          Label for the attribute.
private  ObjectReference gateWorkflowIdReference
           
private  String name
           
static String NAME
          Label for the attribute; Name for the context.
private static int NAME_UPPER_LIMIT
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PHASE_STATE
          Label for the attribute; A unique state to be associated with objects in this phase.
private static int PHASE_STATE_UPPER_LIMIT
           
static String PHASE_WORKFLOW_ID
          Label for the attribute.
static String PHASE_WORKFLOW_ID_REFERENCE
          Label for the attribute.
private  State phaseState
           
private  ObjectReference phaseWorkflowIdReference
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String SERIES_SELECTOR
          Label for the attribute; Select the SeriesRangeSelector.
private static int SERIES_SELECTOR_UPPER_LIMIT
           
private  SeriesRangeSelector seriesSelector
           
 
Fields inherited from class wt.project.WTIndirectRoleHolder
 
Fields inherited from class wt.project.WTActorRoleHolder
 
Fields inherited from class wt.project.WTRoleHolder
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.project.IndirectRoleHolder
ROLE_ROLE_MAP
 
Fields inherited from interface wt.project.ActorRoleHolder
ROLE_ACTOR_ROLE_MAP
 
Fields inherited from interface wt.project.RoleHolder
ROLE_PRINCIPAL_MAP
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
PhaseTemplate()
           
 
Method Summary
 void checkAttributes()
          Validate the values of this Persistable object's attributes.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
private  void gateWorkflowIdReferenceValidate(ObjectReference a_GateWorkflowIdReference)
           
 String getConceptualClassname()
          Deprecated.  
 WfProcessDefinition getGateWorkflowId()
          Gets the object for the association that plays role: GATE_WORKFLOW_ID.
 ObjectReference getGateWorkflowIdReference()
          Gets the value of the attribute: GATE_WORKFLOW_ID_REFERENCE.
 String getName()
          Gets the value of the attribute: NAME.
 State getPhaseState()
          Gets the value of the attribute: PHASE_STATE.
 WfProcessDefinition getPhaseWorkflowId()
          Gets the object for the association that plays role: PHASE_WORKFLOW_ID.
 ObjectReference getPhaseWorkflowIdReference()
          Gets the value of the attribute: PHASE_WORKFLOW_ID_REFERENCE.
 SeriesRangeSelector getSeriesSelector()
          Gets the value of the attribute: SERIES_SELECTOR.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize()
          Initializes objects created by new-factory methods.
 boolean isFinalPhase()
          Gets the value of the attribute: FINAL_PHASE.
private  void nameValidate(String a_Name)
           
static PhaseTemplate newPhaseTemplate()
          Default factory for the class.
private  void phaseStateValidate(State a_PhaseState)
           
private  void phaseWorkflowIdReferenceValidate(ObjectReference a_PhaseWorkflowIdReference)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
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(PhaseTemplate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setFinalPhase(boolean a_FinalPhase)
          Sets the value of the attribute: FINAL_PHASE.
 void setGateWorkflowId(WfProcessDefinition a_GateWorkflowId)
          Sets the object for the association that plays role: GATE_WORKFLOW_ID.
 void setGateWorkflowIdReference(ObjectReference a_GateWorkflowIdReference)
          Sets the value of the attribute: GATE_WORKFLOW_ID_REFERENCE.
 void setName(String a_Name)
          Sets the value of the attribute: NAME.
 void setPhaseState(State a_PhaseState)
          Sets the value of the attribute: PHASE_STATE.
 void setPhaseWorkflowId(WfProcessDefinition a_PhaseWorkflowId)
          Sets the object for the association that plays role: PHASE_WORKFLOW_ID.
 void setPhaseWorkflowIdReference(ObjectReference a_PhaseWorkflowIdReference)
          Sets the value of the attribute: PHASE_WORKFLOW_ID_REFERENCE.
 void setSeriesSelector(SeriesRangeSelector a_SeriesSelector)
          Sets the value of the attribute: SERIES_SELECTOR.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.project.WTIndirectRoleHolder
addRole, deleteRole, deleteRoleTarget, getRoleRoleMap, getRoles, getRoleTarget, readVersion, setRoleRoleMap
 
Methods inherited from class wt.project.WTActorRoleHolder
addActorRole, deleteActorRoleTarget, getActorRoleTarget, getRoleActorRoleMap, readVersion, setRoleActorRoleMap
 
Methods inherited from class wt.project.WTRoleHolder
addPrincipal, deletePrincipal, getMembers, getPrincipals, getRolePrincipalMap, mapAsString, readVersion, rolePrincipalMapAsString, setRolePrincipalMap
 
Methods inherited from class wt.fc.WTObject
duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.project.ActorRoleHolder
addActorRole, deleteActorRoleTarget, getActorRoleTarget, getRoleActorRoleMap, setRoleActorRoleMap
 
Methods inherited from interface wt.project.RoleHolder
addPrincipal, deletePrincipal, getPrincipals, getRolePrincipalMap, rolePrincipalMapAsString, setRolePrincipalMap
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NAME

public static final String NAME
Label for the attribute; Name for the context. Intialized to state name. Required attribute.

Supported API: false

See Also:
Constant Field Values

NAME_UPPER_LIMIT

private static int NAME_UPPER_LIMIT

name

private String name

PHASE_STATE

public static final String PHASE_STATE
Label for the attribute; A unique state to be associated with objects in this phase. This is an enumerated type with localized values held in a resource bundle. Required attribute.

Supported API: false

See Also:
Constant Field Values

PHASE_STATE_UPPER_LIMIT

private static int PHASE_STATE_UPPER_LIMIT

phaseState

private State phaseState

FINAL_PHASE

public static final String FINAL_PHASE
Label for the attribute; a flag to determine whether or not there is a successor to this phase

Supported API: false

See Also:
Constant Field Values

finalPhase

private boolean finalPhase

SERIES_SELECTOR

public static final String SERIES_SELECTOR
Label for the attribute; Select the SeriesRangeSelector.

Supported API: false

See Also:
Constant Field Values

SERIES_SELECTOR_UPPER_LIMIT

private static int SERIES_SELECTOR_UPPER_LIMIT

seriesSelector

private SeriesRangeSelector seriesSelector

GATE_WORKFLOW_ID

public static final String GATE_WORKFLOW_ID
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

GATE_WORKFLOW_ID_REFERENCE

public static final String GATE_WORKFLOW_ID_REFERENCE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

gateWorkflowIdReference

private ObjectReference gateWorkflowIdReference

PHASE_WORKFLOW_ID

public static final String PHASE_WORKFLOW_ID
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

PHASE_WORKFLOW_ID_REFERENCE

public static final String PHASE_WORKFLOW_ID_REFERENCE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

phaseWorkflowIdReference

private ObjectReference phaseWorkflowIdReference

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

PhaseTemplate

public PhaseTemplate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class WTIndirectRoleHolder
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class WTIndirectRoleHolder
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(PhaseTemplate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class WTIndirectRoleHolder
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class WTIndirectRoleHolder
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getName

public String getName()
Gets the value of the attribute: NAME. Name for the context. Intialized to state name. Required attribute.

Supported API: false

Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: NAME. Name for the context. Intialized to state name. Required attribute.

Supported API: false

Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getPhaseState

public State getPhaseState()
Gets the value of the attribute: PHASE_STATE. A unique state to be associated with objects in this phase. This is an enumerated type with localized values held in a resource bundle. Required attribute.

Supported API: false

Returns:
State

setPhaseState

public void setPhaseState(State a_PhaseState)
                   throws WTPropertyVetoException
Sets the value of the attribute: PHASE_STATE. A unique state to be associated with objects in this phase. This is an enumerated type with localized values held in a resource bundle. Required attribute.

Supported API: false

Parameters:
a_PhaseState -
Throws:
WTPropertyVetoException

phaseStateValidate

private void phaseStateValidate(State a_PhaseState)
                         throws WTPropertyVetoException
Parameters:
a_PhaseState -
Throws:
WTPropertyVetoException

isFinalPhase

public boolean isFinalPhase()
Gets the value of the attribute: FINAL_PHASE. a flag to determine whether or not there is a successor to this phase

Supported API: false

Returns:
boolean

setFinalPhase

public void setFinalPhase(boolean a_FinalPhase)
                   throws WTPropertyVetoException
Sets the value of the attribute: FINAL_PHASE. a flag to determine whether or not there is a successor to this phase

Supported API: false

Parameters:
a_FinalPhase -
Throws:
WTPropertyVetoException

getSeriesSelector

public SeriesRangeSelector getSeriesSelector()
Gets the value of the attribute: SERIES_SELECTOR. Select the SeriesRangeSelector.

Supported API: false

Returns:
SeriesRangeSelector

setSeriesSelector

public void setSeriesSelector(SeriesRangeSelector a_SeriesSelector)
                       throws WTPropertyVetoException
Sets the value of the attribute: SERIES_SELECTOR. Select the SeriesRangeSelector.

Supported API: false

Parameters:
a_SeriesSelector -
Throws:
WTPropertyVetoException

getGateWorkflowId

public WfProcessDefinition getGateWorkflowId()
Gets the object for the association that plays role: GATE_WORKFLOW_ID.

Supported API: false

Returns:
WfProcessDefinition

setGateWorkflowId

public void setGateWorkflowId(WfProcessDefinition a_GateWorkflowId)
                       throws WTPropertyVetoException,
                              WTException
Sets the object for the association that plays role: GATE_WORKFLOW_ID.

Supported API: false

Parameters:
a_GateWorkflowId -
Throws:
WTPropertyVetoException
WTException

getGateWorkflowIdReference

public ObjectReference getGateWorkflowIdReference()
Gets the value of the attribute: GATE_WORKFLOW_ID_REFERENCE.

Supported API: false

Returns:
ObjectReference

setGateWorkflowIdReference

public void setGateWorkflowIdReference(ObjectReference a_GateWorkflowIdReference)
                                throws WTPropertyVetoException
Sets the value of the attribute: GATE_WORKFLOW_ID_REFERENCE.

Supported API: false

Parameters:
a_GateWorkflowIdReference -
Throws:
WTPropertyVetoException

gateWorkflowIdReferenceValidate

private void gateWorkflowIdReferenceValidate(ObjectReference a_GateWorkflowIdReference)
                                      throws WTPropertyVetoException
Parameters:
a_GateWorkflowIdReference -
Throws:
WTPropertyVetoException

getPhaseWorkflowId

public WfProcessDefinition getPhaseWorkflowId()
Gets the object for the association that plays role: PHASE_WORKFLOW_ID.

Supported API: false

Returns:
WfProcessDefinition

setPhaseWorkflowId

public void setPhaseWorkflowId(WfProcessDefinition a_PhaseWorkflowId)
                        throws WTPropertyVetoException,
                               WTException
Sets the object for the association that plays role: PHASE_WORKFLOW_ID.

Supported API: false

Parameters:
a_PhaseWorkflowId -
Throws:
WTPropertyVetoException
WTException

getPhaseWorkflowIdReference

public ObjectReference getPhaseWorkflowIdReference()
Gets the value of the attribute: PHASE_WORKFLOW_ID_REFERENCE.

Supported API: false

Returns:
ObjectReference

setPhaseWorkflowIdReference

public void setPhaseWorkflowIdReference(ObjectReference a_PhaseWorkflowIdReference)
                                 throws WTPropertyVetoException
Sets the value of the attribute: PHASE_WORKFLOW_ID_REFERENCE.

Supported API: false

Parameters:
a_PhaseWorkflowIdReference -
Throws:
WTPropertyVetoException

phaseWorkflowIdReferenceValidate

private void phaseWorkflowIdReferenceValidate(ObjectReference a_PhaseWorkflowIdReference)
                                       throws WTPropertyVetoException
Parameters:
a_PhaseWorkflowIdReference -
Throws:
WTPropertyVetoException

newPhaseTemplate

public static PhaseTemplate newPhaseTemplate()
                                      throws WTException
Default factory for the class.

Supported API: false

Returns:
PhaseTemplate
Throws:
WTException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class WTIndirectRoleHolder
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class WTIndirectRoleHolder
Returns:
int

initialize

protected void initialize()
                   throws WTException
Description copied from class: WTObject
Initializes objects created by new-factory methods.

Supported API: false

Overrides:
initialize in class WTIndirectRoleHolder
Throws:
WTException

checkAttributes

public void checkAttributes()
                     throws InvalidAttributeException
Description copied from class: WTObject
Validate the values of this Persistable object's attributes.

Supported API: false

Specified by:
checkAttributes in interface Persistable
Overrides:
checkAttributes in class WTObject
Throws:
InvalidAttributeException