All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cristalise.kernel.entity._ItemStub Maven / Gradle / Ivy

package org.cristalise.kernel.entity;


/**
* org/cristalise/kernel/entity/_ItemStub.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /home/travis/build/cristal-ise/kernel/src/main/idl/Entity.idl
* Tuesday, July 10, 2018 9:54:20 PM UTC
*/


/**
    * ManageableEntity is the CORBA super-interface for Entities. It is uniquely 
    * identifiable by its system key, and contains XML fragments arranged 
    * in a tree structure. 
    **/
public class _ItemStub extends org.omg.CORBA.portable.ObjectImpl implements org.cristalise.kernel.entity.Item
{


  /**
          * System generated unique key of the Entity. It is a 128 bit UUID, expressed as two 64 bit longs in the IDLs, but as a UUID object in the Java kernel. The ItemPath is used as the Item identifier in the kernel and its API, 
          which can be derived from either a UUID object or a SystemKey structure.
          **/
  public org.cristalise.kernel.common.SystemKey getSystemKey ()
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("getSystemKey", true);
                $in = _invoke ($out);
                org.cristalise.kernel.common.SystemKey $result = org.cristalise.kernel.common.SystemKeyHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return getSystemKey (        );
            } finally {
                _releaseReply ($in);
            }
  } // getSystemKey


  /** Initialises a new Item. Initial properties and the lifecycle are supplied. They should come from the Item's description.
          *
          * @param agentKey the Agent doing the initialisation
          * @param itemProps The XML marshalled {@link org.cristalise.kernel.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
          **/
  public void initialise (org.cristalise.kernel.common.SystemKey agentKey, String itemProps, String workflow, String collections) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.InvalidDataException, org.cristalise.kernel.common.PersistencyException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.InvalidCollectionModification
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("initialise", true);
                org.cristalise.kernel.common.SystemKeyHelper.write ($out, agentKey);
                $out.write_string (itemProps);
                $out.write_string (workflow);
                $out.write_string (collections);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:org.cristalise.kernel/common/AccessRightsException:1.0"))
                    throw org.cristalise.kernel.common.AccessRightsExceptionHelper.read ($in);
                else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidDataException:1.0"))
                    throw org.cristalise.kernel.common.InvalidDataExceptionHelper.read ($in);
                else if (_id.equals ("IDL:org.cristalise.kernel/common/PersistencyException:1.0"))
                    throw org.cristalise.kernel.common.PersistencyExceptionHelper.read ($in);
                else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectNotFoundException:1.0"))
                    throw org.cristalise.kernel.common.ObjectNotFoundExceptionHelper.read ($in);
                else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidCollectionModification:1.0"))
                    throw org.cristalise.kernel.common.InvalidCollectionModificationHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                initialise (agentKey, itemProps, workflow, collections        );
            } finally {
                _releaseReply ($in);
            }
  } // initialise


  /**
          * Returns a chunk of XML which may be a serialized C2KLocalObject, or in the case of Outcomes is merely a fragment of XML.
          * 
          * @param path - 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 modification
  • *
  • Collection/{Name} (Items only): Collection objects defining links between Items
  • *
  • Property/{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 Outcomes
  • *
  • AuditTrail/{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.
  • * * @see org.cristalise.kernel.persistency.ClusterStorage#getPath * * @return The XML string of the data. All fragments except Outcomes will deserialize into objects with the kernel CastorXMLUtility available in the Gateway. * * @exception ObjectNotFoundException when the path is not present in this Entity * @exception AccessRightsException Not currently implemented * @exception PersistencyException when the path could not be loaded because of a problem with the storage subsystem. **/ public String queryData (String path) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.PersistencyException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("queryData", true); $out.write_string (path); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:org.cristalise.kernel/common/AccessRightsException:1.0")) throw org.cristalise.kernel.common.AccessRightsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectNotFoundException:1.0")) throw org.cristalise.kernel.common.ObjectNotFoundExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/PersistencyException:1.0")) throw org.cristalise.kernel.common.PersistencyExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return queryData (path ); } finally { _releaseReply ($in); } } // queryData /** * Requests a transition of an Activity in this Item's workflow. If possible and permitted, an Event is * generated and stored, the Activity's state is updated, which may cause the Workflow to proceed. If * this transition requires Outcome data, this is supplied and stored, and a Viewpoint will be created * or updated to point to this latest version. In the case of PredefinedSteps, additional data changes * may be performed in the server data. * * This method should not be called directly, as there is a large client side to activity execution * implemented in the Proxy objects, such as script execution and schema validation. * * @param agentKey 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. * * @param stepPath The path in the Workflow to the desired Activity * * @param transitionID The transition to be performed * * @param requestData 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. * * @throws 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. * @throws InvalidTransitionException The Activity is not in the correct state to make the requested transition. * @throws ObjectNotFoundException The Activity or a container of it does not exist. * @throws 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. * @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. **/ public String requestAction (org.cristalise.kernel.common.SystemKey agentKey, String stepPath, int transitionID, String requestData) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.InvalidTransitionException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.InvalidDataException, org.cristalise.kernel.common.PersistencyException, org.cristalise.kernel.common.ObjectAlreadyExistsException, org.cristalise.kernel.common.InvalidCollectionModification { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("requestAction", true); org.cristalise.kernel.common.SystemKeyHelper.write ($out, agentKey); $out.write_string (stepPath); $out.write_ulong (transitionID); $out.write_string (requestData); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:org.cristalise.kernel/common/AccessRightsException:1.0")) throw org.cristalise.kernel.common.AccessRightsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidTransitionException:1.0")) throw org.cristalise.kernel.common.InvalidTransitionExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectNotFoundException:1.0")) throw org.cristalise.kernel.common.ObjectNotFoundExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidDataException:1.0")) throw org.cristalise.kernel.common.InvalidDataExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/PersistencyException:1.0")) throw org.cristalise.kernel.common.PersistencyExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectAlreadyExistsException:1.0")) throw org.cristalise.kernel.common.ObjectAlreadyExistsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidCollectionModification:1.0")) throw org.cristalise.kernel.common.InvalidCollectionModificationHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return requestAction (agentKey, stepPath, transitionID, requestData ); } finally { _releaseReply ($in); } } // requestAction public String delegatedAction (org.cristalise.kernel.common.SystemKey agentKey, org.cristalise.kernel.common.SystemKey delegateAgentKey, String stepPath, int transitionID, String requestData) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.InvalidTransitionException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.InvalidDataException, org.cristalise.kernel.common.PersistencyException, org.cristalise.kernel.common.ObjectAlreadyExistsException, org.cristalise.kernel.common.InvalidCollectionModification { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("delegatedAction", true); org.cristalise.kernel.common.SystemKeyHelper.write ($out, agentKey); org.cristalise.kernel.common.SystemKeyHelper.write ($out, delegateAgentKey); $out.write_string (stepPath); $out.write_ulong (transitionID); $out.write_string (requestData); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:org.cristalise.kernel/common/AccessRightsException:1.0")) throw org.cristalise.kernel.common.AccessRightsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidTransitionException:1.0")) throw org.cristalise.kernel.common.InvalidTransitionExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectNotFoundException:1.0")) throw org.cristalise.kernel.common.ObjectNotFoundExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidDataException:1.0")) throw org.cristalise.kernel.common.InvalidDataExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/PersistencyException:1.0")) throw org.cristalise.kernel.common.PersistencyExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectAlreadyExistsException:1.0")) throw org.cristalise.kernel.common.ObjectAlreadyExistsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/InvalidCollectionModification:1.0")) throw org.cristalise.kernel.common.InvalidCollectionModificationHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return delegatedAction (agentKey, delegateAgentKey, stepPath, transitionID, requestData ); } finally { _releaseReply ($in); } } // delegatedAction /** * Returns a set of Jobs for this Agent on this Item. Each Job represents a possible transition * of a particular Activity in the Item's lifecycle. The list may be filtered to only refer to * currently active activities. * * @param agentKey The system key of the Agent requesting Jobs. * @param filter If true, then only Activities which are currently active will be included. * @return An XML marshalled {@link org.cristalise.kernel.entity.agent.JobArrayList JobArrayList} * @throws AccessRightsException - when the Agent doesn't exist * @throws ObjectNotFoundException - when the Item doesn't have a lifecycle * @throws PersistencyException - when there was a storage or other unknown error **/ public String queryLifeCycle (org.cristalise.kernel.common.SystemKey agentKey, boolean filter) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.PersistencyException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("queryLifeCycle", true); org.cristalise.kernel.common.SystemKeyHelper.write ($out, agentKey); $out.write_boolean (filter); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:org.cristalise.kernel/common/AccessRightsException:1.0")) throw org.cristalise.kernel.common.AccessRightsExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/ObjectNotFoundException:1.0")) throw org.cristalise.kernel.common.ObjectNotFoundExceptionHelper.read ($in); else if (_id.equals ("IDL:org.cristalise.kernel/common/PersistencyException:1.0")) throw org.cristalise.kernel.common.PersistencyExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return queryLifeCycle (agentKey, filter ); } finally { _releaseReply ($in); } } // queryLifeCycle // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:org.cristalise.kernel/entity/Item:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { org.omg.CORBA.Object obj = orb.string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } finally { orb.destroy() ; } } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { String str = orb.object_to_string (this); s.writeUTF (str); } finally { orb.destroy() ; } } } // class _ItemStub




© 2015 - 2025 Weber Informatics LLC | Privacy Policy