public class ItemProxy extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Object |
mIOR |
protected Item |
mItem |
protected ItemPath |
mItemPath |
| Modifier | Constructor and Description |
|---|---|
protected |
ItemProxy(Object ior,
ItemPath itemPath) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkContent(String path,
String name)
Check if the data of the Item located by the ClusterStorage path is exist
|
boolean |
checkOutcome(Schema schema,
int eventId)
Check if the given Outcome exists
|
boolean |
checkOutcome(String schemaName,
int schemaVersion,
int eventId)
Check if the given Outcome exists
|
boolean |
checkViewpoint(String schemaName,
String viewName)
Check if the given Viewvpoint exists
|
void |
dumpSubscriptions(int logLevel) |
String |
executeQuery(Query query)
Executes the Query in the target database.
|
protected void |
finalize()
If this is reaped, clear out the cache for it too.
|
Collection<?> |
getCollection(BuiltInCollections collection)
Gets the current version of the named Collection
|
Collection<?> |
getCollection(BuiltInCollections collection,
Integer version)
Gets a numbered version (snapshot) of a collection
|
Collection<?> |
getCollection(String collName)
Gets the last version of the named collection
|
Collection<?> |
getCollection(String collName,
Integer version)
Gets a numbered version (snapshot) of a collection
|
String[] |
getContents(ClusterType type)
List the root content of the given ClusterType
|
String[] |
getContents(String path)
List the content of the cluster located by the cluster path
|
protected Item |
getItem()
Returns the CORBA Item this proxy is linked with
|
Job |
getJobByName(String actName,
AgentProxy agent)
Finds the first finishing job with the given name for the given Agent in the workflow.
|
Job |
getJobByTransitionName(String actName,
String transName,
AgentPath agentPath)
Finds the Job with the given Activity and Transition name for the Agent in the Items Workflow
|
Job |
getJobByTransitionName(String actName,
String transName,
AgentProxy agent)
Finds the Job with the given Activity and Transition name for the Agent in the Items Workflow
|
ArrayList<Job> |
getJobList(AgentProxy agent)
Get the list of Job if the Item that can be executed by the Agent
|
String |
getName()
Get the name of the Item from its Property called Name
|
C2KLocalObject |
getObject(ClusterType type)
Retrieve the C2KLocalObject for the ClusterType
|
C2KLocalObject |
getObject(String path)
Retrieve the C2KLocalObject for the Cluster path
|
Outcome |
getOutcome(Schema schema,
int eventId)
Gets the selected Outcome
|
Outcome |
getOutcome(String schemaName,
int schemaVersion,
int eventId)
Gets the selected Outcome
|
ItemPath |
getPath()
Return the ItemPath object of the Item this proxy is linked with
|
String |
getProperty(BuiltInItemProperties prop)
Retrieves the values of a BuiltInItemProperty
|
String |
getProperty(String name)
Retrieves the values of a named property
|
String |
getProperty(String name,
String defaultValue)
Retrieves the values of a named property or returns the defaulValue if no Property was found
|
String |
getType()
Get the type of the Item from its Property called Type
|
Viewpoint |
getViewpoint(String schemaName,
String viewName)
Gets the named Viewpoint
|
String[] |
getViewpoints(String schemaName)
Reads the list of existing Viewpoint names for the given schema
|
Workflow |
getWorkflow()
Gets the Workflow object of this Item
|
void |
initialise(AgentPath agentId,
PropertyArrayList itemProps,
CompositeActivity workflow,
CollectionArrayList colls)
Initialise the new Item with instance data which is normally is created from descriptions
|
Item |
narrow()
Narrows the CORBA Item this proxy is linked with
|
void |
notify(ProxyMessage message) |
String |
queryData(String path)
Query data of the Item located by the ClusterStorage path
|
String |
requestAction(Job thisJob)
Executes the given Job
|
void |
setProperty(AgentProxy agent,
String name,
String value)
Sets the vlaue of the given Property
|
void |
subscribe(MemberSubscription<?> newSub) |
void |
unsubscribe(ProxyObserver<?> observer) |
protected Item mItem
protected ItemPath mItemPath
protected Object mIOR
public ItemPath getPath()
protected Item getItem() throws ObjectNotFoundException
ObjectNotFoundException - there was a problem connecting with the Itempublic Item narrow() throws ObjectNotFoundException
ObjectNotFoundException - there was a problem connecting with the Itempublic void initialise(AgentPath agentId, PropertyArrayList itemProps, CompositeActivity workflow, CollectionArrayList colls) throws AccessRightsException, InvalidDataException, PersistencyException, ObjectNotFoundException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException, org.exolab.castor.mapping.MappingException, InvalidCollectionModification
agentId - the Agent who is creating the ItemitemProps - initial list of Properties of the Itemworkflow - new Lifecycle of the Itemcolls - the initial state of the Item's collectionsAccessRightsException - Agent does not the rights to create an ItemInvalidDataException - data was invalidPersistencyException - there was a database probles during Item initialisationObjectNotFoundException - Object not foundorg.exolab.castor.xml.MarshalException - there was a problem converting those objects to XMLorg.exolab.castor.xml.ValidationException - XML was not validIOException - IO errorsorg.exolab.castor.mapping.MappingException - errors in XML marshall/unmarshall mappingInvalidCollectionModification - invalid Collectionpublic void setProperty(AgentProxy agent, String name, String value) throws AccessRightsException, PersistencyException, InvalidDataException
agent - the Agent who is setting the Propertyname - the name of the Propertyvalue - the value of the PropertyAccessRightsException - Agent does not the rights to execute this operationPersistencyException - there was a database problems during this operationsInvalidDataException - data was invalidpublic String requestAction(Job thisJob) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
thisJob - the Job to be executedAccessRightsException - Agent does not the rights to execute this operationPersistencyException - there was a database problems during this operationsInvalidDataException - data was invalidInvalidTransitionException - the Transition cannot be executedObjectNotFoundException - Object not foundObjectAlreadyExistsException - Object already existsInvalidCollectionModification - Invalid collectionpublic ArrayList<Job> getJobList(AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException
agent - the Agent requesting the jobAccessRightsException - Agent does not the rights to execute this operationPersistencyException - there was a database problems during this operationsObjectNotFoundException - data was invalidpublic Collection<?> getCollection(BuiltInCollections collection) throws ObjectNotFoundException
collection - The built-in collectionObjectNotFoundException - objects were not foundpublic Collection<?> getCollection(BuiltInCollections collection, Integer version) throws ObjectNotFoundException
collection - The built-in Collectionversion - The collection number. Use null to get the 'last' version.ObjectNotFoundException - objects were not foundpublic Collection<?> getCollection(String collName) throws ObjectNotFoundException
collName - The collection nameObjectNotFoundException - objects were not foundpublic Collection<?> getCollection(String collName, Integer version) throws ObjectNotFoundException
collName - The collection nameversion - The collection number. Use null to get the 'last' version.ObjectNotFoundException - objects were not foundpublic Workflow getWorkflow() throws ObjectNotFoundException
ObjectNotFoundException - objects were not foundpublic boolean checkViewpoint(String schemaName, String viewName) throws ObjectNotFoundException
schemaName - the name of the Schema associated with the ViewpointviewName - the name of the ViewObjectNotFoundException - Object not foundpublic String[] getViewpoints(String schemaName) throws ObjectNotFoundException
schemaName - the name of the schemaObjectNotFoundException - Object not foundpublic Viewpoint getViewpoint(String schemaName, String viewName) throws ObjectNotFoundException
schemaName - the name of the Schema associated with the ViewpointviewName - name if the ViewObjectNotFoundException - objects were not foundpublic boolean checkOutcome(String schemaName, int schemaVersion, int eventId) throws ObjectNotFoundException
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 storedObjectNotFoundException - Object not foundpublic boolean checkOutcome(Schema schema, int eventId) throws ObjectNotFoundException
schema - the Schema used to create the OutcomeeventId - the id of the Event created when the Outcome was storedObjectNotFoundException - Object not foundpublic Outcome getOutcome(String schemaName, int schemaVersion, int eventId) throws ObjectNotFoundException
schemaName - the name of the Schema of the OutcomeschemaVersion - the version of the Schema of the OutcomeeventId - the event idObjectNotFoundException - object was not foundpublic Outcome getOutcome(Schema schema, int eventId) throws ObjectNotFoundException
schema - the Schema used to create the OutcomeeventId - the id of the Event created when the Outcome was storedObjectNotFoundException - object was not foundpublic Job getJobByName(String actName, AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException
actName - the name of the Activity to look foragent - The agent to fetch jobs forAccessRightsException - Agent has not rightsObjectNotFoundException - objects were not foundPersistencyException - Error loading the relevant objectspublic Job getJobByTransitionName(String actName, String transName, AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException
actName - the name of the Activity to look fortransName - the name of the Transition to look foragent - The AgentProxy to fetch jobs forAccessRightsException - Agent has not rightsObjectNotFoundException - objects were not foundPersistencyException - Error loading the relevant objectspublic Job getJobByTransitionName(String actName, String transName, AgentPath agentPath) throws AccessRightsException, ObjectNotFoundException, PersistencyException
actName - the name of the Activity to look fortransName - the name of the Transition to look foragentPath - The agent to fetch jobs forAccessRightsException - Agent has not rightsObjectNotFoundException - objects were not foundPersistencyException - Error loading the relevant objectsprotected void finalize()
throws Throwable
public String queryData(String path) throws ObjectNotFoundException
path - the ClusterStorage pathObjectNotFoundException - path was not correctpublic boolean checkContent(String path, String name) throws ObjectNotFoundException
path - the ClusterStorage pathname - the name of the content to be checkedObjectNotFoundException - path was not correctpublic String[] getContents(ClusterType type) throws ObjectNotFoundException
type - the type of the clusterObjectNotFoundException - Object nt foundpublic String[] getContents(String path) throws ObjectNotFoundException
path - the ClusterStorage pathObjectNotFoundException - Object not foundpublic String executeQuery(Query query) throws PersistencyException
query - the query to be executedPersistencyException - there was a fundamental DB issuepublic C2KLocalObject getObject(ClusterType type) throws ObjectNotFoundException
type - the ClusterTyoeObjectNotFoundException - the type did not result in a C2KLocalObjectpublic C2KLocalObject getObject(String path) throws ObjectNotFoundException
path - the path to the cluster contentObjectNotFoundException - the path did not result in a C2KLocalObjectpublic String getProperty(BuiltInItemProperties prop) throws ObjectNotFoundException
prop - one of the Built-In Item PropertyObjectNotFoundException - property was not foundpublic String getProperty(String name, String defaultValue)
name - of the Item PropertydefaultValue - the value to be used if no Property was foundpublic String getProperty(String name) throws ObjectNotFoundException
name - of the Item PropertyObjectNotFoundException - property was not foundpublic String getName()
public String getType()
public void subscribe(MemberSubscription<?> newSub)
public void unsubscribe(ProxyObserver<?> observer)
public void dumpSubscriptions(int logLevel)
public void notify(ProxyMessage message)
Copyright © 1997–2018 CRISTAL-iSE. All rights reserved.