From da731d2bb81666b9c697d9099da632e7dfcdc0f7 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 9 Sep 2014 12:13:21 +0200 Subject: Replaced int sysKey Item identifier with UUID, which is now portable. ItemPath objects are now used to identify Items throughout the kernel, replacing ints and Integers. --- src/main/idl/CommonTypes.idl | 12 +++++++++++- src/main/idl/Entity.idl | 12 +++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src/main/idl') diff --git a/src/main/idl/CommonTypes.idl b/src/main/idl/CommonTypes.idl index 93395eb..09b0767 100644 --- a/src/main/idl/CommonTypes.idl +++ b/src/main/idl/CommonTypes.idl @@ -34,7 +34,17 @@ module common long mSecond; long mTimeOffset; //in seconds }; - + + /************************************************************************** + * Serialized UUID for Item identification + * + * @version 1.0 + **************************************************************************/ + struct SystemKey + { + unsigned long long msb; + unsigned long long lsb; + }; }; //end of module common diff --git a/src/main/idl/Entity.idl b/src/main/idl/Entity.idl index 51884a3..24e5d9c 100644 --- a/src/main/idl/Entity.idl +++ b/src/main/idl/Entity.idl @@ -27,7 +27,7 @@ module entity /** * System generated unique key of the Entity. It is unique in the domain tree of the local centre in which is is contained. **/ - unsigned long getSystemKey(); + common::SystemKey getSystemKey(); /** Initialises a new Item. Initial properties and the lifecycle are supplied. They should come from the Item's description. * @@ -38,7 +38,7 @@ module entity * @param collection The XML marshalled CollectionArrayList of the initial state of the Item's collections * @exception ObjectNotFoundException **/ - void initialise( in unsigned long agentId, + void initialise( in common::SystemKey agentId, in string itemProps, in string workflow, in string collections ) @@ -101,7 +101,7 @@ module entity * @throws PersistencyException There was a problem committing the changes to storage. * @throws ObjectAlreadyExistsException Not normally thrown, but reserved for PredefinedSteps to throw if they need to. **/ - string requestAction( in unsigned long agentID, + string requestAction( in common::SystemKey agentID, in string stepPath, in unsigned long transitionID, in string requestData @@ -126,7 +126,7 @@ module entity * @throws ObjectNotFoundException - when the Item doesn't have a lifecycle * @throws PersistencyException - when there was a storage or other unknown error **/ - string queryLifeCycle( in unsigned long agentId, + string queryLifeCycle( in common::SystemKey agentId, in boolean filter ) raises( common::AccessRightsException, common::ObjectNotFoundException, @@ -149,7 +149,9 @@ module entity * @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 ); + void refreshJobList( in common::SystemKey sysKey, + in string stepPath, + in string newJobs ); /** Add this Agent to the given role * @param roleName the new role to add -- cgit v1.2.3