diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-05-07 17:33:13 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-05-08 16:37:39 +0200 |
| commit | a1f0ecbb6a2bea6aa214322c412af2f3c5ce124b (patch) | |
| tree | 4d74229b6dd9cfd7ce054e06bf740b9a63a578d6 /src/main/idl | |
| parent | 6dfa1bbe05a712174e937af89d5223e98d9d7d06 (diff) | |
Agent now extends Item, so they can have workflows. All traces of the
old 'Entity' superclasses should be removed, including proxies and
paths. Very large change, breaks API compatibility with CRISTAL 2.x.
Fixes #135
Diffstat (limited to 'src/main/idl')
| -rw-r--r-- | src/main/idl/Entity.idl | 132 |
1 files changed, 56 insertions, 76 deletions
diff --git a/src/main/idl/Entity.idl b/src/main/idl/Entity.idl index f94bdf4..2aa9188 100644 --- a/src/main/idl/Entity.idl +++ b/src/main/idl/Entity.idl @@ -21,7 +21,7 @@ module entity * in a tree structure.
**/
- abstract interface ManageableEntity
+ interface Item
{
/**
@@ -29,7 +29,24 @@ module entity **/
unsigned long getSystemKey();
-
+ /** Initialises a new Item. Initial properties and the lifecycle are supplied. They should come from the Item's description.
+ *
+ * @param agentId the Agent doing the initialisation
+ * @param itemProps The XML marshalled {@link com.c2kernel.Property.PropertyArrayList PropertyArrayList} containing the initial
+ * Property objects of the Item
+ * @param workflow The XML marshalled new lifecycle of the Item
+ * @param collection The XML marshalled CollectionArrayList of the initial state of the Item's collections
+ * @exception ObjectNotFoundException
+ **/
+ void initialise( in unsigned long agentId,
+ in string itemProps,
+ in string workflow,
+ in string collections )
+ raises( common::AccessRightsException,
+ common::InvalidDataException,
+ common::PersistencyException,
+ common::ObjectNotFoundException );
+
/**
* Returns a chunk of XML which may be a serialized C2KLocalObject, or in the case of Outcomes is merely a fragment of XML.
*
@@ -54,77 +71,6 @@ module entity raises( common::AccessRightsException,
common::ObjectNotFoundException,
common::PersistencyException );
- };
-
-
- /**************************************************************************
- * Agent is a ManageableEntity that represents an Activity executor in the
- * system. It holds a job list, which are persistent requests for execution
- * from waiting activities assigned to a role that has such Job pushing enabled.
- **************************************************************************/
- interface Agent : ManageableEntity
- {
- /** Initialises a new Agent. Should not be done by client processes - they
- * should use an Agent factory such as a Server item.
- * @param agentProps - XML marshalled {@link com.c2kernel.Property.PropertyArrayList PropertyArrayList} containing the initial
- * Property objects of the Agent
- * @throws AccessRightsException not yet implemented, reserved for future access control
- * @throws InvalidDataException when the data supplied couldn't be unmarshalled
- * @throws PersistencyException when there was a problem communicating with storage
- **/
- void initialise( in string agentProps )
- raises( common::AccessRightsException,
- common::InvalidDataException,
- common::PersistencyException );
-
- /** Supplies the new set of jobs for the given item and activity. The Agent should replace all existing jobs for that activity
- * with the given set. This method should generally only be called by a workflow while performing an execution.
- *
- * @param sysKey the item which generated the jobs
- * @param stepPath the activity within the lifecycle of the item which the jobs relate to
- * @param newJobs an XML marshalled {@link com.c2kernel.entity.agent.JobArrayList JobArrayList} containing the new Jobs
- **/
- void refreshJobList( in unsigned long sysKey, in string stepPath, in string newJobs );
-
- /** Add this Agent to the given role
- * @param roleName the new role to add
- * @throws ObjectNotFoundException when the role doesn't exist
- * @throws CannotManageException when an error occurs writing the data to LDAP
- **/
- void addRole( in string roleName )
- raises( common::ObjectNotFoundException,
- common::CannotManageException );
-
- /** Remove this Agent from the given role
- * @param the role name to remove
- * @throws CannotManageException when an error occurs writing the data to LDAP
- **/
- void removeRole( in string roleName )
- raises( common::ObjectNotFoundException,
- common::CannotManageException );
- };
-
-
- /**************************************************************************
- * Item is an ManageableEntity which has a lifecycle, and as a consequence
- * generates Events, Outcomes and Viewpoints.
- **************************************************************************/
- interface Item : ManageableEntity
- {
- /** Initialises a new Item. Initial properties and the lifecycle are supplied. They should come from the Item's description.
- *
- * @param agentId the Agent doing the initialisation
- * @param itemProps The XML marshalled {@link com.c2kernel.Property.PropertyArrayList PropertyArrayList} containing the initial
- * Property objects of the Agent
- * @param workflow The XML marshalled new lifecycle of the Item
- * @exception ObjectNotFoundException
- **/
- void initialise( in unsigned long agentId,
- in string itemProps,
- in string workflow )
- raises( common::AccessRightsException,
- common::InvalidDataException,
- common::PersistencyException );
/**
* Requests a transition of an Activity in this Item's workflow. If possible and permitted, an Event is
@@ -158,7 +104,7 @@ module entity void requestAction( in unsigned long agentID,
in string stepPath,
in unsigned long transitionID,
- in string requestData
+ in string requestData
)
raises( common::AccessRightsException,
common::InvalidTransitionException,
@@ -184,10 +130,44 @@ module entity in boolean filter )
raises( common::AccessRightsException,
common::ObjectNotFoundException,
- common::PersistencyException );
+ common::PersistencyException );
+ };
+
+ /**************************************************************************
+ * Agent is a ManageableEntity that represents an Activity executor in the
+ * system. It holds a job list, which are persistent requests for execution
+ * from waiting activities assigned to a role that has such Job pushing enabled.
+ **************************************************************************/
+ interface Agent : Item
+ {
+
+ /** Supplies the new set of jobs for the given item and activity. The Agent should replace all existing jobs for that activity
+ * with the given set. This method should generally only be called by a workflow while performing an execution.
+ *
+ * @param sysKey the item which generated the jobs
+ * @param stepPath the activity within the lifecycle of the item which the jobs relate to
+ * @param newJobs an XML marshalled {@link com.c2kernel.entity.agent.JobArrayList JobArrayList} containing the new Jobs
+ **/
+ void refreshJobList( in unsigned long sysKey, in string stepPath, in string newJobs );
+
+ /** Add this Agent to the given role
+ * @param roleName the new role to add
+ * @throws ObjectNotFoundException when the role doesn't exist
+ * @throws CannotManageException when an error occurs writing the data to LDAP
+ **/
+ void addRole( in string roleName )
+ raises( common::ObjectNotFoundException,
+ common::CannotManageException );
- }; //end of Item
+ /** Remove this Agent from the given role
+ * @param the role name to remove
+ * @throws CannotManageException when an error occurs writing the data to LDAP
+ **/
+ void removeRole( in string roleName )
+ raises( common::ObjectNotFoundException,
+ common::CannotManageException );
+ };
}; //end of module entity
|
