public class Job extends Object implements C2KLocalObject
| Constructor and Description |
|---|
Job()
Empty constructor required for Castor
|
Job(Activity act,
ItemPath itemPath,
Transition transition,
AgentPath agent,
AgentPath delegate,
String role)
Main constructor to create Job during workflow enactment
|
Job(int id,
ItemPath itemPath,
String stepName,
String stepPath,
String stepType,
Transition transition,
String originStateName,
String targetStateName,
String agentRole,
AgentPath agentPath,
AgentPath delegatePath,
CastorHashMap actProps,
GTimeStamp creationDate)
Constructor for recreating Job from backend
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Object |
getActProp(BuiltInVertexProperties name) |
Object |
getActProp(BuiltInVertexProperties name,
Object defaultValue) |
Object |
getActProp(String name) |
Object |
getActProp(String name,
Object defaultValue) |
String |
getActPropString(BuiltInVertexProperties name) |
String |
getActPropString(String name) |
String |
getAgentName() |
String |
getAgentUUID()
Used by castor to marshall to XML
|
String |
getClusterPath()
Each C2KLocalObject is stored with a path identifier starting with the ClusterType:
Properties: /Property/Name
Workflow: /LifeCycle/workflow
Collections: /Collection/Name/Version (default Name='last')
Outcomes: /Outcome/SchemaName/SchemaVersion/EventID
Viewpoints: /ViewPoint/SchemaName/Name (default Name='last')
Events: /AuditTrail/EventID
Jobs: /Job/JobID
|
ClusterType |
getClusterType()
Each object belongs to a specific type defined in
ClusterStorage |
String |
getDelegateName() |
String |
getDescription() |
ItemProxy |
getItem() |
ItemProxy |
getItemProxy() |
String |
getItemUUID() |
KeyValuePair[] |
getKeyValuePairs() |
Outcome |
getLastOutcome()
Returns the Outcome instance associated with the 'last' Viewpoint
|
String |
getLastView()
Returns the Outcome string associated with the 'last' Viewpoint
|
String |
getName()
Gets the name of the C2KLocalObject
|
Outcome |
getOutcome()
Returns the Outcome if exists otherwise tries to read and duplicate the Outcome of 'last' ViewPoint.
|
OutcomeInitiator |
getOutcomeInitiator()
Retrieve the OutcomeInitiator associated with this Job.
|
String |
getOutcomeString()
Returns the Outcome string.
|
Query |
getQuery() |
Schema |
getSchema() |
String |
getSchemaName()
Deprecated.
|
int |
getSchemaVersion()
Deprecated.
|
Script |
getScript() |
String |
getScriptName()
Deprecated.
|
int |
getScriptVersion()
Deprecated.
|
Transition |
getTransition() |
String |
getValidViewpointName()
Checks the value of the 'Viewpoint' ActivityProperty and return 'last' if value is blank
or starts with 'xpath:'.
|
int |
hashCode() |
boolean |
hasOutcome() |
boolean |
hasQuery() |
boolean |
hasScript() |
boolean |
isOutcomeRequired() |
boolean |
isOutcomeSet() |
Map<String,Object> |
matchActPropNames(String pattern)
Searches Activity property names using
String.startsWith(String) method |
void |
setActProp(BuiltInVertexProperties prop,
Object value) |
void |
setActProp(String name,
Object value) |
void |
setAgentUUID(String uuid)
Used by castor to unmarshall from XML
|
void |
setError(ErrorInfo errors) |
void |
setItemPath(ItemPath path) |
void |
setItemUUID(String uuid) |
void |
setKeyValuePairs(KeyValuePair[] pairs) |
void |
setName(String name)
Sets the name of the C2KLocalObject
|
void |
setOutcome(Outcome o) |
void |
setOutcome(String outcomeData) |
void |
setTransition(Transition transition) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitenforceValidNamepublic Job()
public Job(Activity act, ItemPath itemPath, Transition transition, AgentPath agent, AgentPath delegate, String role) throws InvalidDataException, ObjectNotFoundException, InvalidAgentPathException
public Job(int id,
ItemPath itemPath,
String stepName,
String stepPath,
String stepType,
Transition transition,
String originStateName,
String targetStateName,
String agentRole,
AgentPath agentPath,
AgentPath delegatePath,
CastorHashMap actProps,
GTimeStamp creationDate)
public void setItemPath(ItemPath path)
public void setItemUUID(String uuid) throws InvalidItemPathException
InvalidItemPathExceptionpublic String getItemUUID()
public ItemProxy getItem() throws InvalidDataException
InvalidDataExceptionpublic Transition getTransition()
public void setTransition(Transition transition)
public void setAgentUUID(String uuid) throws InvalidItemPathException
uuid - the string representation of UUIDInvalidItemPathException - Cannot set UUID of agent and delegate from parameterpublic String getAgentUUID()
public String getAgentName()
public String getDelegateName()
public Schema getSchema() throws InvalidDataException, ObjectNotFoundException
@Deprecated public String getSchemaName() throws InvalidDataException, ObjectNotFoundException
@Deprecated public int getSchemaVersion() throws InvalidDataException, ObjectNotFoundException
public boolean isOutcomeRequired()
public Script getScript() throws ObjectNotFoundException, InvalidDataException
public Query getQuery() throws ObjectNotFoundException, InvalidDataException
@Deprecated public String getScriptName()
@Deprecated public int getScriptVersion() throws InvalidDataException
InvalidDataExceptionpublic KeyValuePair[] getKeyValuePairs()
public void setKeyValuePairs(KeyValuePair[] pairs)
public String getName()
C2KLocalObjectgetName in interface C2KLocalObjectpublic void setName(String name)
C2KLocalObjectsetName in interface C2KLocalObjectname - Name of the C2KLocalObjectpublic ItemProxy getItemProxy() throws ObjectNotFoundException, InvalidItemPathException
public String getDescription()
public void setOutcome(String outcomeData) throws InvalidDataException, ObjectNotFoundException
public void setOutcome(Outcome o)
public void setError(ErrorInfo errors)
public String getValidViewpointName()
public Outcome getLastOutcome() throws InvalidDataException, ObjectNotFoundException
InvalidDataException - inconsistent data or persistency issueObjectNotFoundException - Schema or Outcome was not foundpublic String getLastView() throws InvalidDataException, ObjectNotFoundException
InvalidDataException - inconsistent data or persistency issueObjectNotFoundException - Schema or Outcome was not foundpublic OutcomeInitiator getOutcomeInitiator() throws InvalidDataException
InvalidDataException - OutcomeInitiator could not be createdBuiltInVertexProperties.OUTCOME_INITpublic String getOutcomeString() throws InvalidDataException, ObjectNotFoundException
getOutcome()InvalidDataException - inconsistent dataObjectNotFoundExceptionpublic Outcome getOutcome() throws InvalidDataException, ObjectNotFoundException
InvalidDataException - inconsistent dataObjectNotFoundException - Schema was not foundpublic boolean hasOutcome()
public boolean hasScript()
public boolean hasQuery()
public boolean isOutcomeSet()
public ClusterType getClusterType()
C2KLocalObjectClusterStoragegetClusterType in interface C2KLocalObjectpublic String getClusterPath()
C2KLocalObjectgetClusterPath in interface C2KLocalObjectpublic Object getActProp(BuiltInVertexProperties name)
public Object getActProp(BuiltInVertexProperties name, Object defaultValue)
public void setActProp(BuiltInVertexProperties prop, Object value)
public String getActPropString(BuiltInVertexProperties name)
public Map<String,Object> matchActPropNames(String pattern)
String.startsWith(String) methodpattern - the pattern to be matchedCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.