Package org.cristalise.kernel.events
Class Event
java.lang.Object
org.cristalise.kernel.events.Event
- All Implemented Interfaces:
C2KLocalObject
The data structure of events, which are passed over the event service.
Events are incrementally numbered objects maintained by the History.
Events are generated and stored whenever a step in an Item's lifecycle changes state, and provide a full record of what was done, when, and by whom.
Events are generated and stored whenever a step in an Item's lifecycle changes state, and provide a full record of what was done, when, and by whom.
-
Constructor Summary
ConstructorsConstructorDescriptionEvent()Event(Integer id, ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, String smName, Integer smVersion, int transitionId, int originState, int targetState, String schemaName, Integer schemaVersion, String viewName, boolean hasAttachment, GTimeStamp ts) Constructor for recreating object from backendEvent(Integer id, ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, String smName, Integer smVersion, int transitionId, int originState, int targetState, String schemaName, Integer schemaVersion, String viewName, GTimeStamp ts) Constructor for recreating object from backendEvent(ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, StateMachine stateMachine, int transitionId) Event(ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, StateMachine stateMachine, int transitionId, boolean hasAttachment) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOutcomeDetails(Schema schema, String viewName) Each C2KLocalObject is stored with a path identifier starting with the ClusterType: DomainPath: /Path/Domain/Name ItemPath: /Path/Item AgentPath: /Path/Agent RolePath: /Path/Role/Name 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/JobIDEach object belongs to a specific type defined inClusterTypebooleanReturn the TimeStamp in a form that will convert nicely to a String: YYYY-MM-DD HH:MI:SSvoidsetAgentUUID(String uuid) voidsetHasAttachment(boolean flag) voidvoidsetItemUUID(String uuid) voidSets the name of the C2KLocalObjectvoidsetTimeString(String time) voidsetViewName(String viewName) Set the ViewNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cristalise.kernel.entity.C2KLocalObject
getName
-
Constructor Details
-
Event
-
Event
-
Event
public Event(Integer id, ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, String smName, Integer smVersion, int transitionId, int originState, int targetState, String schemaName, Integer schemaVersion, String viewName, GTimeStamp ts) Constructor for recreating object from backend -
Event
public Event(Integer id, ItemPath itemPath, AgentPath agentPath, String agentRole, String stepName, String stepPath, String stepType, String smName, Integer smVersion, int transitionId, int originState, int targetState, String schemaName, Integer schemaVersion, String viewName, boolean hasAttachment, GTimeStamp ts) Constructor for recreating object from backend -
Event
public Event()
-
-
Method Details
-
setID
-
setItemUUID
- Throws:
InvalidItemPathException
-
getItemUUID
-
setAgentUUID
- Throws:
InvalidItemPathException
-
getAgentUUID
-
setName
Description copied from interface:C2KLocalObjectSets the name of the C2KLocalObject- Specified by:
setNamein interfaceC2KLocalObject- Parameters:
name- Name of the C2KLocalObject
-
getTimeString
Return the TimeStamp in a form that will convert nicely to a String: YYYY-MM-DD HH:MI:SS- Returns:
- Return the formatted TimeStamp
-
setTimeString
- Throws:
InvalidDataException
-
getClusterType
Description copied from interface:C2KLocalObjectEach object belongs to a specific type defined inClusterType- Specified by:
getClusterTypein interfaceC2KLocalObject- Returns:
- string id of the type
-
getClusterPath
Description copied from interface:C2KLocalObjectEach C2KLocalObject is stored with a path identifier starting with the ClusterType:- DomainPath: /Path/Domain/Name
- ItemPath: /Path/Item
- AgentPath: /Path/Agent
- RolePath: /Path/Role/Name
- 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
- Specified by:
getClusterPathin interfaceC2KLocalObject- Returns:
- The path identifier (i.e. primary key) of the object
-
addOutcomeDetails
-
setViewName
Set the ViewName- Parameters:
viewName- name of the view or 'last if viewName is blank
-
setHasAttachment
public void setHasAttachment(boolean flag) -
getHasAttachment
public boolean getHasAttachment()
-