Class ItemProxy
java.lang.Object
org.cristalise.kernel.entity.proxy.ItemProxy
- Direct Known Subclasses:
AgentProxy
It is a immutable wrapper for the connection and communication with Item and its data. It relies on the
ClusterStorage mechanism to retrieve and to cache data, i.e. it does not do any cashing itself.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Itemprotected ItemPathprotected TransactionKeySet Transaction key (a.k.a. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedItemProxy(ItemPath itemPath, TransactionKey transKey) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCollection(String collection) Checks if the given Collection existsbooleancheckCollection(String collection, TransactionKey transKey) Checks if the given Collection existsbooleancheckCollection(BuiltInCollections collection) Checks if the given built-in Collection existsbooleancheckCollection(BuiltInCollections collection, TransactionKey transKey) Checks if the given built-in Collection existsbooleancheckContent(String path, String name) Check if the data of the Item located by the ClusterStorage path is existbooleancheckContent(String path, String name, TransactionKey transKey) Check if the data of the Item located by the ClusterStorage path is exist.booleancheckContent(ClusterType cluster, String name) Check the root content of the given ClusterTypebooleancheckContent(ClusterType cluster, String name, TransactionKey transKey) Check the root content of the given ClusterTypebooleancheckJobForAgent(Job job, AgentPath agentPath) booleancheckOutcome(String schemaName, int schemaVersion, int eventId) Check if the given Outcome existsbooleancheckOutcome(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) Check if the given Outcome exists.booleancheckOutcome(Schema schema, int eventId) Check if the given Outcome existsbooleancheckOutcome(Schema schema, int eventId, TransactionKey transKey) Check if the given Outcome exists.booleancheckOutcomeAttachment(Schema schema, int eventId) Check if the given OutcomeAttachment existsbooleancheckOutcomeAttachment(Schema schema, int eventId, TransactionKey transKey) Check if the given OutcomeAttachment exists.booleancheckProperty(String name) Check if the given Property existsbooleancheckProperty(String name, TransactionKey transKey) Check if the given Property exists.booleanCheck if the given built-in Property existsbooleancheckProperty(BuiltInItemProperties prop, TransactionKey transKey) Check if the given built-in Property exists.booleancheckViewpoint(String schemaName, String viewName) Check if the given Viewpoint existsbooleancheckViewpoint(String schemaName, String viewName, TransactionKey transKey) Check if the given Viewpoint exists.voidexecuteQuery(Query query) Executes the Query in the target database.Returns the so called Aggregate Script which can be used to construct master outcome.getAggregateScript(String scriptName, Integer scriptVersion) Returns the so called Aggregate Script which can be used to construct master outcome.Collection<?> getCollection(String collName) Gets the last version of the named collectionCollection<?> getCollection(String collName, Integer version) Gets a numbered version (snapshot) of a collectionCollection<?> getCollection(String collName, Integer version, TransactionKey transKey) Gets a numbered version (snapshot) of a collection.Collection<?> getCollection(String collName, TransactionKey transKey) Gets the last version of the named collection.Collection<?> getCollection(BuiltInCollections collection) Gets the current version of the named CollectionCollection<?> getCollection(BuiltInCollections collection, Integer version) Gets a numbered version (snapshot) of a collectionCollection<?> getCollection(BuiltInCollections collection, Integer version, TransactionKey transKey) Gets a numbered version (snapshot) of a collectionCollection<?> getCollection(BuiltInCollections collection, TransactionKey transKey) Gets the current version of the named Collection.String[]getContents(String path) List the content of the cluster located by the cluster pathString[]getContents(String path, TransactionKey transKey) List the content of the cluster located by the cluster path.String[]getContents(ClusterType type) List the root content of the given ClusterType.String[]getContents(ClusterType type, TransactionKey transKey) List the root content of the given ClusterType.getEvent(int eventId) Retrieves the Event of the given id.getEvent(int eventId, TransactionKey transKey) Retrieves the Event of the given id.Retrieves the History of the item.getHistory(TransactionKey transKey) Retrieves the History of the item.getItem()Retrieves single persistent Job.getJob(String id, TransactionKey transKey) Retrieves single persistent Job.getJobByName(String actName, AgentProxy agent) Finds the first finishing job with the given name for the given Agent in the workflow.getJobByTransitionName(String actName, String transName, AgentProxy agent) Finds the Job with the given Activity and Transition name for the Agent in the Items WorkflowgetJobByTransitionName(String actName, String transName, AgentPath agentPath) Finds the Job with the given Activity and Transition name for the Agent in the Items WorkflowgetJobs()Retrieves the complete list of Jobs of the Item.getJobs(AgentProxy agent) Get the list of active Jobs of the Item that can be executed by the AgentGet the list of active Jobs of the Item that can be executed by the AgentGet the list of active Jobs of the Item for the given Activity that can be executed by the Agent.getJobs(TransactionKey transKey) Retrieves the complete list of Jobs of the Item.Returns the so called Master Schema which can be used to construct master outcome.getMasterSchema(String schemaName, Integer schemaVersion) Returns the so called Master Schema which can be used to construct master outcome.getName()Get the name of the Item from its Property called NamegetName(TransactionKey transKey) Get the name of the Item from its Property called Name.Retrieve the C2KLocalObject for the Cluster pathgetObject(String path, TransactionKey transKey) Retrieve the C2KLocalObject for the Cluster path.getObject(ClusterType type) Retrieve the C2KLocalObject for the ClusterTypegetObject(ClusterType type, TransactionKey transKey) Retrieve the C2KLocalObject for the ClusterType.getOutcome(String schemaName, int schemaVersion, int eventId) Gets the selected Outcome.getOutcome(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) Gets the selected Outcome.getOutcome(Event event) Gets the Outcome associated with the Event.getOutcome(Event event, TransactionKey transKey) Gets the Outcome associated with the Event.getOutcome(Schema schema, int eventId) Gets the selected Outcome,getOutcome(Schema schema, int eventId, TransactionKey transKey) Gets the selected Outcome.getOutcome(Viewpoint view) Gets the Outcome selected by the ViewpointgetOutcome(Viewpoint view, TransactionKey transKey) Gets the Outcome selected by the Viewpoint.getOutcomeAttachment(String schemaName, int schemaVersion, int eventId) Gets the selected OutcomeAttachmentgetOutcomeAttachment(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) Gets the selected OutcomeAttachment.getOutcomeAttachment(Schema schema, int eventId) Gets the selected OutcomeAttachmentgetOutcomeAttachment(Schema schema, int eventId, TransactionKey transKey) Gets the selected OutcomeAttachment.getPath()Return the ItemPath object of the Item this proxy is linked withgetProperty(String name) Retrieves the value of a named propertygetProperty(String name, String defaultValue) Retrieves the values of a named property or returns the defaulValue if no Property was foundgetProperty(String name, String defaultValue, TransactionKey transKey) Retrieves the value of a named property.getProperty(String name, TransactionKey transKey) Retrieves the values of a BuiltInItemPropertygetProperty(BuiltInItemProperties prop, String defaultValue) Retrieves the values of a BuiltInItemProperty or returns the defaulValue if no Property was foundgetProperty(BuiltInItemProperties prop, String defaultValue, TransactionKey transKey) Retrieves the values of a BuiltInItemProperty or returns the defaulValue if no Property was found.getType()Get the type of the Item from its Property called TypegetType(TransactionKey transKey) Get the type of the Item from its Property called Type.Returns the so called UpdateSchema which is used while creating new Items.getUuid()Returns the UUID string of the Item this proxy is linked withgetViewpoint(String schemaName, String viewName) Gets the named ViewpointgetViewpoint(String schemaName, String viewName, TransactionKey transKey) Gets the named Viewpoint.String[]getViewpoints(String schemaName) Reads the list of existing Viewpoint names for the given schemaString[]getViewpoints(String schemaName, TransactionKey transKey) Reads the list of existing Viewpoint names for the given schema.Gets the Workflow object of this ItemgetWorkflow(TransactionKey transKey) Gets the Workflow object of this Item.Query data of the Item located by the ClusterStorage pathqueryData(String path, TransactionKey transKey) Query data of the Item located by the ClusterStorage pathrequestAction(String itemUuid, String agentUuid, String stepPath, int transitionID, String requestData, String fileName, List<Byte> attachment) requestAction(Job thisJob) Executes the given Job of this ItemvoidsetProperty(AgentProxy agent, String name, String value) Sets the value of the given PropertytoString()unmarshall(String obj)
-
Field Details
-
mItem
-
mItemPath
-
transactionKey
Set Transaction key (a.k.a. transKey/locker) when ItemProxy is used in server side scripting
-
-
Constructor Details
-
ItemProxy
- Parameters:
itemPath-
-
ItemProxy
-
-
Method Details
-
getItem
-
getPath
Return the ItemPath object of the Item this proxy is linked with- Returns:
- the ItemPath of the Item
-
getUuid
Returns the UUID string of the Item this proxy is linked with- Returns:
- UUID string of the Item
-
setProperty
public void setProperty(AgentProxy agent, String name, String value) throws AccessRightsException, PersistencyException, InvalidDataException Sets the value of the given Property- Parameters:
agent- the Agent who is setting the Propertyname- the name of the Propertyvalue- the value of the Property- Throws:
AccessRightsException- Agent does not the rights to execute this operationPersistencyException- there was a database problems during this operationsInvalidDataException- data was invalid
-
requestAction
public String requestAction(String itemUuid, String agentUuid, String stepPath, int transitionID, String requestData, String fileName, List<Byte> attachment) throws CriseVertxException - Parameters:
itemUuid-agentUuid-stepPath-transitionID-requestData-fileName-attachment-- Returns:
- Throws:
CriseVertxException
-
requestAction
Executes the given Job of this Item- Parameters:
thisJob- the Job to be executed- Returns:
- the result of the execution
- Throws:
CriseVertxException- if the operation failed
-
getJobs
Get the list of active Jobs of the Item that can be executed by the Agent- Parameters:
agentPath- the Agent requesting the job- Returns:
- list of active Jobs
- Throws:
AccessRightsException- Agent does not the rights to execute this operationPersistencyException- there was a database problems during this operationsObjectNotFoundException- data was invalidCriseVertxException
-
checkJobForAgent
- Throws:
CriseVertxException
-
getJobs
Get the list of active Jobs of the Item that can be executed by the Agent- Parameters:
agent- requesting the job- Returns:
- list of Jobs
- Throws:
CriseVertxException
-
getJobs
Get the list of active Jobs of the Item for the given Activity that can be executed by the Agent.- Parameters:
agent- requesting the jobstepPath- the path of the Activity instance- Returns:
- list of active Jobs of the Item for the given Activity that can be executed by the Agent
- Throws:
CriseVertxException
-
checkCollection
Checks if the given built-in Collection exists- Parameters:
collection- the built-in Collection- Returns:
- true of Collection exists false otherwise
- Throws:
ObjectNotFoundException- if Item does not have any Collections at all
-
checkCollection
public boolean checkCollection(BuiltInCollections collection, TransactionKey transKey) throws ObjectNotFoundException Checks if the given built-in Collection exists- Parameters:
collection- the built-in CollectiontransKey- the transaction key- Returns:
- true of Collection exists false otherwise
- Throws:
ObjectNotFoundException- if Item does not have any Collections at all
-
checkCollection
Checks if the given Collection exists- Parameters:
collection- the name Collection- Returns:
- true of Collection exists false otherwise
- Throws:
ObjectNotFoundException- if Item does not have any Collections at all
-
checkCollection
public boolean checkCollection(String collection, TransactionKey transKey) throws ObjectNotFoundException Checks if the given Collection exists- Parameters:
collection- the name CollectiontransKey- the transaction key- Returns:
- true of Collection exists false otherwise
- Throws:
ObjectNotFoundException- if Item does not have any Collections at all
-
getCollection
Gets the current version of the named Collection- Parameters:
collection- The built-in collection- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
public Collection<?> getCollection(BuiltInCollections collection, TransactionKey transKey) throws ObjectNotFoundException Gets the current version of the named Collection. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
collection- The built-in collectiontransKey- the transaction key- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
public Collection<?> getCollection(BuiltInCollections collection, Integer version) throws ObjectNotFoundException Gets a numbered version (snapshot) of a collection- Parameters:
collection- The built-in Collectionversion- The collection number. Use null to get the 'last' version.- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
public Collection<?> getCollection(BuiltInCollections collection, Integer version, TransactionKey transKey) throws ObjectNotFoundException Gets a numbered version (snapshot) of a collection- Parameters:
collection- The built-in Collectionversion- The collection number. Use null to get the 'last' version.transKey- the transaction key- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
Gets the last version of the named collection- Parameters:
collName- The collection name- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
public Collection<?> getCollection(String collName, TransactionKey transKey) throws ObjectNotFoundException Gets the last version of the named collection. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
collName- The collection nametransKey- the transaction key- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
Gets a numbered version (snapshot) of a collection- Parameters:
collName- The collection nameversion- The collection number. Use null to get the 'last' version.- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getCollection
public Collection<?> getCollection(String collName, Integer version, TransactionKey transKey) throws ObjectNotFoundException Gets a numbered version (snapshot) of a collection. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
collName- The collection nameversion- The collection number. Use null to get the 'last' version.transKey- the transaction key- Returns:
- the Collection object
- Throws:
ObjectNotFoundException- objects were not found
-
getWorkflow
Gets the Workflow object of this Item- Returns:
- the Item's Workflow object
- Throws:
ObjectNotFoundException- objects were not found
-
getWorkflow
Gets the Workflow object of this Item. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
transKey- the transaction key- Returns:
- the Item's Workflow object
- Throws:
ObjectNotFoundException- objects were not found
-
checkViewpoint
Check if the given Viewpoint exists- Parameters:
schemaName- the name of the Schema associated with the ViewpointviewName- the name of the View- Returns:
- true if the ViewPoint exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
checkViewpoint
public boolean checkViewpoint(String schemaName, String viewName, TransactionKey transKey) throws ObjectNotFoundException Check if the given Viewpoint exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema associated with the ViewpointviewName- the name of the ViewtransKey- the transaction key- Returns:
- true if the ViewPoint exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
getViewpoints
Reads the list of existing Viewpoint names for the given schema- Parameters:
schemaName- the name of the schema- Returns:
- array of strings containing the Viewpoint names
- Throws:
ObjectNotFoundException- Object not found
-
getViewpoints
public String[] getViewpoints(String schemaName, TransactionKey transKey) throws ObjectNotFoundException Reads the list of existing Viewpoint names for the given schema. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the schematransKey- the transaction key- Returns:
- array of strings containing the Viewpoint names
- Throws:
ObjectNotFoundException- Object not found
-
getViewpoint
Gets the named Viewpoint- Parameters:
schemaName- the name of the Schema associated with the ViewpointviewName- name if the View- Returns:
- a Viewpoint object
- Throws:
ObjectNotFoundException- objects were not found
-
getViewpoint
public Viewpoint getViewpoint(String schemaName, String viewName, TransactionKey transKey) throws ObjectNotFoundException Gets the named Viewpoint. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema associated with the ViewpointviewName- name if the ViewtransKey- the transaction key- Returns:
- a Viewpoint object
- Throws:
ObjectNotFoundException- objects were not found
-
checkOutcome
public boolean checkOutcome(String schemaName, int schemaVersion, int eventId) throws ObjectNotFoundException Check if the given Outcome exists- Parameters:
schemaName- the name of the Schema used to create the OutcomeschemaVersion- the version of the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was stored- Returns:
- true if the Outcome exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
checkOutcome
public boolean checkOutcome(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) throws ObjectNotFoundException Check if the given Outcome exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema used to create the OutcomeschemaVersion- the version of the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was storedtransKey- the transaction key- Returns:
- true if the Outcome exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
checkOutcome
Check if the given Outcome exists- Parameters:
schema- the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was stored- Returns:
- true if the Outcome exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
checkOutcome
public boolean checkOutcome(Schema schema, int eventId, TransactionKey transKey) throws ObjectNotFoundException Check if the given Outcome exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schema- the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was storedtransKey- transaction key- Returns:
- true if the Outcome exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
getOutcome
public Outcome getOutcome(String schemaName, int schemaVersion, int eventId) throws ObjectNotFoundException Gets the selected Outcome. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema of the OutcomeschemaVersion- the version of the Schema of the OutcomeeventId- the event id- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
public Outcome getOutcome(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) throws ObjectNotFoundException Gets the selected Outcome. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema of the OutcomeschemaVersion- the version of the Schema of the OutcomeeventId- the event idtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
Gets the selected Outcome,- Parameters:
schema- the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was stored- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
public Outcome getOutcome(Schema schema, int eventId, TransactionKey transKey) throws ObjectNotFoundException Gets the selected Outcome. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schema- the Schema used to create the OutcomeeventId- the id of the Event created when the Outcome was storedtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
Gets the Outcome selected by the Viewpoint- Parameters:
view- the Viewpoint to be used- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
Gets the Outcome selected by the Viewpoint. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
view- the Viewpoint to be usedtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcome
Gets the Outcome associated with the Event.- Parameters:
event- the Event to be used- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException
-
getOutcome
Gets the Outcome associated with the Event. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
event- the Event to be usedtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
checkOutcomeAttachment
Check if the given OutcomeAttachment exists- Parameters:
schema- the Schema used to create the Outcome and its OutcomeAttachmenteventId- the id of the Event created when the Outcome and its OutcomeAttachment was stored- Returns:
- true if the OutcomeAttachment exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
checkOutcomeAttachment
public boolean checkOutcomeAttachment(Schema schema, int eventId, TransactionKey transKey) throws ObjectNotFoundException Check if the given OutcomeAttachment exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schema- the Schema used to create the Outcome and its OutcomeAttachmenteventId- the id of the Event created when the Outcome and its OutcomeAttachment was storedtransKey- the transaction key- Returns:
- true if the OutcomeAttachment exist false otherwise
- Throws:
ObjectNotFoundException- Object not found
-
getOutcomeAttachment
public OutcomeAttachment getOutcomeAttachment(String schemaName, int schemaVersion, int eventId) throws ObjectNotFoundException Gets the selected OutcomeAttachment- Parameters:
schemaName- the name of the Schema used to create the Outcome and its OutcomeAttachmentschemaVersion- the version of the Schema of the OutcomeeventId- the event id- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcomeAttachment
public OutcomeAttachment getOutcomeAttachment(String schemaName, int schemaVersion, int eventId, TransactionKey transKey) throws ObjectNotFoundException Gets the selected OutcomeAttachment. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schemaName- the name of the Schema used to create the Outcome and its OutcomeAttachmentschemaVersion- the version of the Schema of the OutcomeeventId- the event idtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcomeAttachment
public OutcomeAttachment getOutcomeAttachment(Schema schema, int eventId) throws ObjectNotFoundException Gets the selected OutcomeAttachment- Parameters:
schema- the Schema used to create the Outcome and its OutcomeAttachmenteventId- the id of the Event created when the Outcome and the OutcomeAttachment was stored- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getOutcomeAttachment
public OutcomeAttachment getOutcomeAttachment(Schema schema, int eventId, TransactionKey transKey) throws ObjectNotFoundException Gets the selected OutcomeAttachment. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
schema- the Schema used to create the Outcome and its OutcomeAttachmenteventId- the id of the Event created when the Outcome and the OutcomeAttachment was storedtransKey- the transaction key- Returns:
- the Outcome object
- Throws:
ObjectNotFoundException- object was not found
-
getJobByName
Finds the first finishing job with the given name for the given Agent in the workflow.- Parameters:
actName- the name of the Activity to look foragent- The agent to fetch jobs for- Returns:
- the JOB object or null if nothing was found
- Throws:
AccessRightsException- Agent has not rightsObjectNotFoundException- objects were not foundPersistencyException- Error loading the relevant objectsCriseVertxException
-
getJobByTransitionName
public Job getJobByTransitionName(String actName, String transName, AgentProxy agent) throws CriseVertxException Finds the Job with the given Activity and Transition name for the Agent in the Items Workflow- Parameters:
actName- the name of the Activity to look fortransName- the name of the Transition to look foragent- The AgentProxy to fetch jobs for- Returns:
- the JOB object or null if nothing was found
- Throws:
AccessRightsException- Agent has not rightsObjectNotFoundException- objects were not foundPersistencyException- Error loading the relevant objectsCriseVertxException
-
getJobByTransitionName
public Job getJobByTransitionName(String actName, String transName, AgentPath agentPath) throws CriseVertxException Finds the Job with the given Activity and Transition name for the Agent in the Items Workflow- Parameters:
actName- the name of the Activity to look fortransName- the name of the Transition to look foragentPath- The agent to fetch jobs for- Returns:
- the JOB object or null if nothing was found
- Throws:
AccessRightsException- Agent has not rightsObjectNotFoundException- objects were not foundPersistencyException- Error loading the relevant objectsCriseVertxException
-
queryData
Query data of the Item located by the ClusterStorage path- Parameters:
path- the ClusterStorage path- Returns:
- the data in XML form
- Throws:
ObjectNotFoundException- path was not correct
-
queryData
Query data of the Item located by the ClusterStorage path- Parameters:
path- the ClusterStorage pathtransKey- the transaction key- Returns:
- the data in XML form
- Throws:
ObjectNotFoundException- path was not correct
-
checkContent
Check if the data of the Item located by the ClusterStorage path is exist- Parameters:
path- the ClusterStorage pathname- the name of the content to be checked- Returns:
- true if there is content false otherwise
- Throws:
ObjectNotFoundException- path was not correct
-
checkContent
Check the root content of the given ClusterType- Parameters:
cluster- the type of the clustername- the name of the content to be checked- Returns:
- true if there is content false otherwise
- Throws:
ObjectNotFoundException- path was not correct
-
checkContent
public boolean checkContent(ClusterType cluster, String name, TransactionKey transKey) throws ObjectNotFoundException Check the root content of the given ClusterType- Parameters:
cluster- the type of the clustername- the name of the content to be checkedtransKey- the transaction key- Returns:
- true if there is content false otherwise
- Throws:
ObjectNotFoundException- path was not correct
-
checkContent
public boolean checkContent(String path, String name, TransactionKey transKey) throws ObjectNotFoundException Check if the data of the Item located by the ClusterStorage path is exist. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
path- the type of the clustername- the name of the content to be checkedtransKey- the transaction key- Returns:
- true if there is content false otherwise
- Throws:
ObjectNotFoundException- path was not correct
-
getContents
List the root content of the given ClusterType.- Parameters:
type- the type of the cluster- Returns:
- list of String of the cluster content
- Throws:
ObjectNotFoundException- Object nt found
-
getContents
public String[] getContents(ClusterType type, TransactionKey transKey) throws ObjectNotFoundException List the root content of the given ClusterType. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
type- the type of the clustertransKey- the transaction key- Returns:
- list of String of the cluster content
- Throws:
ObjectNotFoundException- Object nt found
-
getContents
List the content of the cluster located by the cluster path- Parameters:
path- the ClusterStorage path- Returns:
- list of String of the cluster content
- Throws:
ObjectNotFoundException- Object not found
-
getContents
List the content of the cluster located by the cluster path. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
path- the ClusterStorage pathtransKey- the transaction key- Returns:
- list of String of the cluster content
- Throws:
ObjectNotFoundException- Object not found
-
executeQuery
Executes the Query in the target database. The query can be any of these type: SQL/OQL/XQuery/XPath/etc.- Parameters:
query- the query to be executed- Returns:
- the xml result of the query
- Throws:
PersistencyException- there was a fundamental DB issue
-
getObject
Retrieve the C2KLocalObject for the ClusterType- Parameters:
type- the ClusterTyoe- Returns:
- the C2KLocalObject
- Throws:
ObjectNotFoundException- the type did not result in a C2KLocalObject
-
getObject
public C2KLocalObject getObject(ClusterType type, TransactionKey transKey) throws ObjectNotFoundException Retrieve the C2KLocalObject for the ClusterType. Actually it returns an instance of C2KLocalObjectMap- Parameters:
type- the ClusterTyoe- Returns:
- the C2KLocalObjectMap representing all the Object in the ClusterType
- Throws:
ObjectNotFoundException- the type did not result in a C2KLocalObject
-
getObject
Retrieve the C2KLocalObject for the Cluster path- Parameters:
path- the path to the cluster content- Returns:
- the C2KLocalObject
- Throws:
ObjectNotFoundException- the path did not result in a C2KLocalObject
-
getObject
public C2KLocalObject getObject(String path, TransactionKey transKey) throws ObjectNotFoundException Retrieve the C2KLocalObject for the Cluster path. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
path- the path to the cluster objecttransKey- the transaction key- Returns:
- the C2KLocalObject
- Throws:
ObjectNotFoundException- the path did not result in a C2KLocalObject
-
getProperty
Retrieves the values of a BuiltInItemProperty- Parameters:
prop- one of the Built-In Item Property- Returns:
- the value of the property
- Throws:
ObjectNotFoundException- property was not found
-
getProperty
Retrieves the values of a BuiltInItemProperty or returns the defaulValue if no Property was found- Parameters:
prop- one of the Built-In Item PropertydefaultValue- the value to be used if no Property was found- Returns:
- the value or the defaultValue
-
getProperty
Retrieves the values of a BuiltInItemProperty or returns the defaulValue if no Property was found. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
prop- one of the Built-In Item PropertydefaultValue- the value to be used if no Property was foundtransKey- the transaction key- Returns:
- the value or the defaultValue
-
getProperty
Retrieves the values of a named property or returns the defaulValue if no Property was found- Parameters:
name- of the Item PropertydefaultValue- the value to be used if no Property was found- Returns:
- the value or the defaultValue
-
getProperty
Retrieves the value of a named property. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
name- of the Item PropertydefaultValue- the value to be used if no Property was foundtransKey- the transaction key- Returns:
- the value of the property
-
getProperty
Retrieves the value of a named property- Parameters:
name- of the Item Property- Returns:
- the value of the property
- Throws:
ObjectNotFoundException- property was not found
-
getProperty
- Parameters:
name-transKey-- Returns:
- Throws:
ObjectNotFoundException
-
checkProperty
Check if the given built-in Property exists- Parameters:
prop- the built-in Property- Returns:
- true if the Property exist false otherwise
- Throws:
ObjectNotFoundException- Item does not have any properties at all
-
checkProperty
public boolean checkProperty(BuiltInItemProperties prop, TransactionKey transKey) throws ObjectNotFoundException Check if the given built-in Property exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
prop- the built-in PropertytransKey- the transaction key- Returns:
- true if the Property exist false otherwise
- Throws:
ObjectNotFoundException- Item does not have any properties at all
-
checkProperty
Check if the given Property exists- Parameters:
name- of the Property- Returns:
- true if the Property exist false otherwise
- Throws:
ObjectNotFoundException- Item does not have any properties at all
-
checkProperty
Check if the given Property exists. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
name- of the PropertytransKey- the transaction key- Returns:
- true if the Property exist false otherwise
- Throws:
ObjectNotFoundException- Item does not have any properties at all
-
getName
Get the name of the Item from its Property called Name- Returns:
- the name of the Item or null if no Name Property exists
-
getName
Get the name of the Item from its Property called Name. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
transKey- the transaction key- Returns:
- the name of the Item or null if no Name Property exists
-
getType
Get the type of the Item from its Property called Type- Returns:
- the type of the Item or null if no Type Property exists
-
getType
Get the type of the Item from its Property called Type. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
transKey- the transaction key- Returns:
- the type of the Item or null if no Type Property exists
-
getEvent
Retrieves the Event of the given id.- Parameters:
eventId- the id of the Event- Returns:
- the Event object
- Throws:
ObjectNotFoundException- there is no event for the given id
-
getEvent
Retrieves the Event of the given id. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
eventId- the id of the EventtransKey- the transaction key- Returns:
- the Event object
- Throws:
ObjectNotFoundException- there is no event for the given id
-
getHistory
Retrieves the History of the item.- Returns:
- the History object
- Throws:
ObjectNotFoundException- there is no event for the given id
-
getHistory
Retrieves the History of the item. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
transKey- the transaction key- Returns:
- the History object
- Throws:
ObjectNotFoundException- there is no event for the given id
-
getJob
Retrieves single persistent Job.- Parameters:
id- of the persistent Job- Returns:
- persistent Job of the Item
- Throws:
ObjectNotFoundException- there is no persistent Job for the given id
-
getJob
Retrieves single persistent Job. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
id- of the JobtransKey- the transaction key- Returns:
- persistent Job of the Item
- Throws:
ObjectNotFoundException- there is no Job for the given id
-
getJobs
Retrieves the complete list of Jobs of the Item.- Returns:
- C2KLocalObjectMap of Jobs
-
getJobs
Retrieves the complete list of Jobs of the Item. This method can be used in server side Script to find uncommitted changes during the active transaction.- Parameters:
transKey- the transaction key- Returns:
- C2KLocalObjectMap of Jobs
-
getMasterSchema
Returns the so called Master Schema which can be used to construct master outcome.- Returns:
- the actual Schema
- Throws:
InvalidDataException- the Schema could not be constructedObjectNotFoundException- no Schema was found for the name and version
-
getMasterSchema
public Schema getMasterSchema(String schemaName, Integer schemaVersion) throws InvalidDataException, ObjectNotFoundException Returns the so called Master Schema which can be used to construct master outcome.- Parameters:
schemaName- the name or UUID of the Schema or can be blank. It overwrites the master schema settings in the PropertiesschemaVersion- the version of the schema or can be null. It overwrites the master schema settings in the Properties- Returns:
- the Schema
- Throws:
InvalidDataException- the Schema could not be constructedObjectNotFoundException- no Schema was found for the name and version
-
getUpdateSchema
Returns the so called UpdateSchema which is used while creating new Items. It can be either the "constructor" Schema retrieved from the 'SchemaInitialise' dependency or the Schema used by the Update Activity- Returns:
- schema
- Throws:
InvalidDataException- the Schema could not be constructedObjectNotFoundException- no Schema was found
-
getAggregateScript
Returns the so called Aggregate Script which can be used to construct master outcome.- Returns:
- the script
- Throws:
InvalidDataException- something was wrong with the provided dataObjectNotFoundException- no Script can be found
-
getAggregateScript
public Script getAggregateScript(String scriptName, Integer scriptVersion) throws InvalidDataException, ObjectNotFoundException Returns the so called Aggregate Script which can be used to construct master outcome.- Parameters:
scriptName- the name of the script received in the rest call (can be null)scriptVersion- the version of the script received in the rest call (can be null)- Returns:
- the script or null
- Throws:
InvalidDataExceptionObjectNotFoundException
-
marshall
- Throws:
Exception
-
unmarshall
- Throws:
Exception
-
clearCache
public void clearCache() -
toString
-