public class ItemImplementation extends Object implements ItemOperations
| Modifier and Type | Field and Description |
|---|---|
protected ItemPath |
mItemPath |
protected TransactionManager |
mStorage |
| Modifier | Constructor and Description |
|---|---|
protected |
ItemImplementation(ItemPath key) |
| Modifier and Type | Method and Description |
|---|---|
String |
delegatedAction(SystemKey agentId,
SystemKey delegateId,
String stepPath,
int transitionID,
String requestData,
String attachmentType,
byte[] attachment) |
protected void |
finalize() |
protected PredefinedStepContainer |
getNewPredefStepContainer() |
SystemKey |
getSystemKey()
System generated unique key of the Entity.
|
UUID |
getUUID() |
void |
initialise(SystemKey agentId,
String propString,
String initWfString,
String initCollsString,
String initViewpointString,
String initOutcomeString)
Initialises a new Item.
|
String |
queryData(String path)
Returns a chunk of XML which may be a serialized C2KLocalObject, or in the case of Outcomes is merely a fragment of XML.
|
String |
queryLifeCycle(SystemKey agentId,
boolean filter)
Returns a set of Jobs for this Agent on this Item.
|
String |
requestAction(SystemKey agentId,
String stepPath,
int transitionID,
String requestData,
String attachmentType,
byte[] attachment)
Requests a transition of an Activity in this Item's workflow.
|
protected final TransactionManager mStorage
protected final ItemPath mItemPath
protected ItemImplementation(ItemPath key)
public SystemKey getSystemKey()
ItemOperationsgetSystemKey in interface ItemOperationspublic UUID getUUID()
public void initialise(SystemKey agentId, String propString, String initWfString, String initCollsString, String initViewpointString, String initOutcomeString) throws AccessRightsException, InvalidDataException, PersistencyException
ItemOperationsinitialise in interface ItemOperationsagentId - the Agent doing the initialisationpropString - The XML marshalled PropertyArrayList containing the initial
Property objects of the IteminitWfString - The XML marshalled new lifecycle of the IteminitViewpointString - the XML marshalled Viewpoint to be stored to find the OutcomeinitOutcomeString - the XML data to be storedAccessRightsExceptionInvalidDataExceptionPersistencyExceptionprotected PredefinedStepContainer getNewPredefStepContainer()
public String requestAction(SystemKey agentId, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
ItemOperationsrequestAction in interface ItemOperationsagentId - The SystemKey of the Agent. Some activities may be restricted in which roles may execute them.
Some transitions cause the activity to be assigned to the executing Agent.stepPath - The path in the Workflow to the desired ActivitytransitionID - The transition to be performedrequestData - The XML Outcome of the work defined by the Activity. Must be valid to the XML Schema,
though this is not verified on the server, rather in the AgentProxy in the Client API.attachmentType - the MimeType of the attachment (can be empty)attachment - binary data associated with the Outcome (can be empty)AccessRightsException - The Agent is not permitted to perform the operation. Either it does not
have the correct role, or the Activity is reserved by another Agent. Also thrown when the given Agent ID doesn't exist.InvalidTransitionException - The Activity is not in the correct state to make the requested transition.ObjectNotFoundException - The Activity or a container of it does not exist.InvalidDataException - An activity property for the requested Activity was invalid e.g. SchemaVersion was not a number.
Also thrown when an uncaught Java exception or error occurred.PersistencyException - There was a problem committing the changes to storage.ObjectAlreadyExistsException - Not normally thrown, but reserved for PredefinedSteps to throw if they need to.InvalidCollectionModificationpublic String delegatedAction(SystemKey agentId, SystemKey delegateId, String stepPath, int transitionID, String requestData, String attachmentType, byte[] attachment) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
public String queryLifeCycle(SystemKey agentId, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException
ItemOperationsqueryLifeCycle in interface ItemOperationsagentId - The system key of the Agent requesting Jobs.filter - If true, then only Activities which are currently active will be included.JobArrayListAccessRightsException - - when the Agent doesn't existObjectNotFoundException - - when the Item doesn't have a lifecyclePersistencyException - - when there was a storage or other unknown errorpublic String queryData(String path) throws AccessRightsException, ObjectNotFoundException, PersistencyException
ItemOperationsqueryData in interface ItemOperationspath - - All Entity data is arranged in a tree structure which uniquely identifies that object within the Entity it is contained, according to the following scheme:
LifeCycle/workflow (Items only): The Workflow object for this Item, containing the graph of activities defining the Item's lifecycle, and the Predefined Step container for data modificationCollection/{Name} (Items only): Collection objects defining links between ItemsProperty/{Name}: Name value pairs to idenfity this Entity, define its type, and hold any other oft-changing indicators that would be heavy to extract from OutcomesAuditTrail/{ID} (Items only): Events describing all activity state changes in this Item.Outcome/{Schema name}/{Schema version}/{Event ID} (Items only): XML fragments resulting from the execution of an Activity, validated against the XML Schema defined by that activity.ViewPoint/{Schema name}/{Name} (Items only): A named pointer to the latest version of an Outcome, defined by the Activity.Job/{ID} (Agents only): A persistent Job, reflecting a request for execution of an Activity to this Agent. Not all roles create persistent Jobs like this, only those specifically flagged to do so.AccessRightsException - Not currently implementedObjectNotFoundException - when the path is not present in this EntityPersistencyException - when the path could not be loaded because of a problem with the storage subsystem.ClusterStorage.getPath(org.cristalise.kernel.entity.C2KLocalObject)Copyright © 1997–2019 CRISTAL-iSE. All rights reserved.