|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.WTObject
wt.fc.ObjectToObjectLink
wt.workflow.definer.NodeTemplateLink
The NodeTemplateLink
is the class responsible for the definition
of links representing flow of control. It has a type (defined at creation
time) that describes the source and destination nodes in the association
and whether it is a control link or not. The type can't be changed for
the lifetime of the link.
The NodeTemplateLink
class also contains a mapping
between events in the source node and actions at the destination node.
Events in the source node can be state transitions in case of activities)
or user defined events for routers. Actions in the destination node
can, for example, be state transition for activities.
Use the newNodeTemplateLink
static factory method(s), not
the NodeTemplateLink
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
Field Summary | |
static String |
BACK_LOOP
Label for the attribute; Determines if the link is used to create a "loop" or iteration. |
private boolean |
backLoop
|
private static String |
CLASSNAME
|
static String |
DESTINATION_ROLE
Label for the attribute. |
protected static String |
EVENT_ACTION_MAP
Label for the attribute; Table that maps events in the source node to actions in the destination node. |
private static int |
EVENT_ACTION_MAP_UPPER_LIMIT
|
private EventActionTable |
eventActionMap
|
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
LINK_TYPE
Label for the attribute; Type of the link. |
private static int |
LINK_TYPE_UPPER_LIMIT
|
private WfTemplateLinkType |
linkType
|
protected static long |
OLD_FORMAT_VERSION_UID
|
static String |
PARENT_TEMPLATE
Label for the attribute; Reference to the parent process template. |
private WfContainerTemplateReference |
parentTemplate
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static String |
SOURCE_ROLE
Label for the attribute. |
Fields inherited from class wt.fc.ObjectToObjectLink |
ROLE_AOBJECT_REF, ROLE_BOBJECT_REF |
Fields inherited from class wt.fc.WTObject |
CREATE_TIMESTAMP, MODIFY_TIMESTAMP |
Fields inherited from interface wt.fc.BinaryLink |
ALL_ROLES, BOTH_ROLES, ROLE_AOBJECT_ROLE, ROLE_BOBJECT_ROLE |
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 | |
NodeTemplateLink()
|
Method Summary | |
boolean |
addEventActionPair(Object event,
Object action)
Adds an event-action pair to the link. |
private void |
checkAction(Object action)
Checks if the destination action is valid. |
private void |
checkEvent(Object event)
Checks if the source event is valid. |
NodeTemplateLink |
copy(WfNodeTemplate source,
WfNodeTemplate destination)
Produces a transient, shallow copy of the link template. |
WfLink |
createWfLink(WfContainer container,
WfNode source,
WfNode destination)
Creates a workflow link using the information contained in the template. |
boolean |
equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifier s. |
boolean |
fires()
Returns if any event is mapped into the FIRE action (for connectors). |
Object |
getAction(Object event)
Returns the action associated with the event passed as argument. |
Enumeration |
getAllActions()
Returns an enumeration with all destination actions valid for the link. |
Enumeration |
getAllEvents()
Returns an enumeration with all source events valid for the link. |
String |
getConceptualClassname()
Deprecated. |
WfNodeTemplate |
getDestination()
Gets the object for the association that plays role: DESTINATION_ROLE. |
protected EventActionTable |
getEventActionMap()
Gets the value of the attribute: EVENT_ACTION_MAP. |
WfTemplateLinkType |
getLinkType()
Gets the value of the attribute: LINK_TYPE. |
Enumeration |
getMappedActions()
Returns an enumeration with all destination actions that are mapped to by some event. |
Enumeration |
getMappedEvents()
Returns an enumeration containing events that are mapped to actions. |
WfContainerTemplateReference |
getParentTemplate()
Gets the value of the attribute: PARENT_TEMPLATE. |
WfNodeTemplate |
getSource()
Gets the object for the association that plays role: SOURCE_ROLE. |
int |
hashCode()
Returns a hash code for this object based upon its ObjectIdentifier . |
protected void |
initialize(WfNodeTemplate source,
WfNodeTemplate destination)
Link initialization. |
boolean |
isBackLoop()
Gets the value of the attribute: BACK_LOOP. |
boolean |
isValid()
Returns whether or node the link is valid. |
static NodeTemplateLink |
newNodeTemplateLink(WfNodeTemplate source,
WfNodeTemplate destination)
Default factory for the class. |
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(NodeTemplateLink thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
boolean |
removeEventActionPair(Object event)
Removes an event-action pair mapping from the link, given the event. |
void |
replaceEventActionPair(Object event,
Object action)
Replaces an event-action pair to the link. |
void |
setBackLoop(boolean a_BackLoop)
Sets the value of the attribute: BACK_LOOP. |
void |
setDestination(WfNodeTemplate destination)
Sets the object for the association that plays role: DESTINATION_ROLE. |
protected void |
setEventActionMap(EventActionTable a_EventActionMap)
Sets the value of the attribute: EVENT_ACTION_MAP. |
void |
setLinkType(WfTemplateLinkType a_LinkType)
Sets the value of the attribute: LINK_TYPE. |
void |
setParentTemplate(WfContainerTemplateReference a_ParentTemplate)
Sets the value of the attribute: PARENT_TEMPLATE. |
void |
setSource(WfNodeTemplate source)
Sets the object for the association that plays role: SOURCE_ROLE. |
String |
toString()
Returns string representation of the object. |
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.fc.WTObject |
checkAttributes, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, initialize, readVersion, setPersistInfo |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.Persistable |
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo |
Methods inherited from interface wt.fc.NetFactor |
getClassInfo |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String SOURCE_ROLE
public static final String DESTINATION_ROLE
public static final String LINK_TYPE
private static int LINK_TYPE_UPPER_LIMIT
private WfTemplateLinkType linkType
protected static final String EVENT_ACTION_MAP
private static int EVENT_ACTION_MAP_UPPER_LIMIT
private EventActionTable eventActionMap
public static final String PARENT_TEMPLATE
private WfContainerTemplateReference parentTemplate
public static final String BACK_LOOP
private boolean backLoop
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Constructor Detail |
public NodeTemplateLink()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class ObjectToObjectLink
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class ObjectToObjectLink
input
-
IOException
ClassNotFoundException
protected boolean readVersion(NodeTemplateLink 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 void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class ObjectToObjectLink
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class ObjectToObjectLink
input
-
SQLException
DatastoreException
public WfNodeTemplate getSource()
public void setSource(WfNodeTemplate source) throws WTPropertyVetoException
source
-
WTPropertyVetoException
public WfNodeTemplate getDestination()
public void setDestination(WfNodeTemplate destination) throws WTPropertyVetoException
destination
-
WTPropertyVetoException
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
public WfTemplateLinkType getLinkType()
public void setLinkType(WfTemplateLinkType a_LinkType)
a_LinkType
- protected EventActionTable getEventActionMap()
protected void setEventActionMap(EventActionTable a_EventActionMap)
a_EventActionMap
- public WfContainerTemplateReference getParentTemplate()
public void setParentTemplate(WfContainerTemplateReference a_ParentTemplate)
a_ParentTemplate
- public boolean isBackLoop()
public void setBackLoop(boolean a_BackLoop) throws WTPropertyVetoException
a_BackLoop
-
WTPropertyVetoException
public String toString()
toString
in class WTObject
public WfLink createWfLink(WfContainer container, WfNode source, WfNode destination) throws WTException
container
- source
- destination
-
WTException
ActivityActivityLink
,
ActivityConnectorLink
,
ConnectorActivityLink
,
ConnectorConnectorLink
public boolean addEventActionPair(Object event, Object action) throws InvalidEventException, InvalidActionException
event
- action
-
InvalidEventException
InvalidActionException
public boolean removeEventActionPair(Object event) throws InvalidEventException
event
-
InvalidEventException
public Object getAction(Object event) throws InvalidEventException
event
-
InvalidEventException
public Enumeration getAllEvents()
public Enumeration getMappedEvents()
public void replaceEventActionPair(Object event, Object action) throws InvalidEventException, InvalidActionException
event
- action
-
InvalidEventException
InvalidActionException
public Enumeration getAllActions()
public Enumeration getMappedActions()
public NodeTemplateLink copy(WfNodeTemplate source, WfNodeTemplate destination) throws WTException
source
- destination
-
WTException
public boolean fires()
public boolean isValid()
public static NodeTemplateLink newNodeTemplateLink(WfNodeTemplate source, WfNodeTemplate destination) throws WTException
source
- destination
-
WTException
public boolean equals(Object obj)
ObjectIdentifier
s.
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
equals
in class ObjectToObjectLink
obj
-
public int hashCode()
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
hashCode
in class ObjectToObjectLink
protected void initialize(WfNodeTemplate source, WfNodeTemplate destination) throws WTException
Sets the eventActionMap to the default mapping. The default mapping depends of the type of the link, as follows:
+--------------+-----------------------------------------+ | | Activity Connector | +--------------+-----------------------------------------+ | Activity | COMPLETE/START COMPLETE/FIRE | +--------------+-----------------------------------------+ | Connector | FIRE/START FIRE/FIRE | +--------------+-----------------------------------------+If the source is also a router, the mapping is not initialized.
source
- destination
-
WTException
private void checkEvent(Object event) throws InvalidEventException
event
-
InvalidEventException
private void checkAction(Object action) throws InvalidActionException
InvalidEventException
InvalidActionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |