Storage Management(porttype1)

From Gcube Wiki
Jump to: navigation, search

This page describes the old SMS porttype1.

Functions

The main functions supported by the Storage Management Service are:

  • createInfoObject() – which takes as input parameter a message containing the name and the type of the new Information Object to be created and returns the Information Object ID assigned to it;
  • removeInfoObject() – which takes as input parameter a message containing the Information Object ID and removes it and its related relations from the Information Objects space managed by this service (that is, the information space of the whole gCube infrastructure);
  • removeInfoObjects() – which takes as input parameter a message containing the list of Information Object IDs to be removed and returns the list of Information Object IDs representing the object that have not been removed and the error occurred;
  • hasRawContent() – which takes as input parameter a message containing the Information Object ID and returns a Boolean value indicating whether the Information Object contains raw content associated to it or not;
  • getInfoObject() – which takes as input parameter a message containing the Information Object ID, the URI representing a location the object will be stored and some storage hints and returns the relative Information Object;
  • getInfoObjects() – which takes as input parameter a message containing a list of Information Object IDs, the URI representing a location each object will be stored and some storage hints and returns the relative Information Objects;
  • associateRawDocument() – which takes as input parameter a message containing the Information Object ID, the URI the raw content can be downloaded or the raw content itself, and some storage hints and returns the storage hints consumed during the storage of the raw content;
  • updateRawDocument() – which takes as input parameter a message containing the Information Object ID, the URI the raw content can be downloaded or the raw content itself, and some storage hints and returns the storage hints consumed during the update of the raw content;
  • removeRawDocument() – which takes as input parameter a message containing the Information Object ID and removes the raw content associated to it;
  • addReference() – which takes as input parameter a message containing a specification of the reference in terms of the reference source and target Information Object (their IDs), the role of the referencing Information Object, the secondary role of the referencing Information Object (optional), the position this reference occupies in the referencing Information Object (optional) and the criteria governing the removal and creates this new reference between existing Information Objects;
  • addReferences() – which takes as input parameter a message containing a list of reference specifications in terms of the reference source and target Information Object (their IDs), the role of the referencing Information Object, the secondary role of the referencing Information Object (optional), the position this reference occupies in the referencing Information Object (optional) and the criteria governing the removal; it returns a report on the result of the references requested by producing a list equal to the input parameter in which entries are enriched with a Boolean value indicating whether the operation has been successfully or not, the error message (if any) and the sequence number of the entry in the list;
  • removeReference() – which takes as input parameter a message containing a specification of the reference in terms of the reference source and target Information Object (their IDs), the role of the referencing Information Object and, optionally, the secondary role of the referencing Information Object and removes the so identified reference from the existing references;
  • removeReferences() – which takes as input parameter a message containing a list of reference specifications in terms of the reference source and target Information Object (their IDs), the role of the referencing Information Object and, optionally, the secondary role of the referencing Information Object and returns a report on the result of the reference removals requested by producing a list equal to the input parameter in which entries are enriched with a Boolean value indicating whether the operation has been successfully or not, the error message (if any) and the sequence number of the entry in the list;
  • retrieveReferences() – which takes as input parameter a message containing the source Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns the list of references matching these characteristics by specifying the source and target Information Object IDs, the role, the secondary role and the criteria governing the removal;
  • retrieveReferencesBulk() – which takes as input parameter a message containing a list of reference specifications expressed in terms of the source Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns the list of references matching these characteristics. As this is a bulk operation, it might fail only for some of the elements requested. For this reason, each entry in the result list specifies, besides the source and target Information Object IDs, the role, the secondary role, the criteria governing the operation and the sequence number of the entry in the list, also a Boolean flag denoting whether the operation was successful for the corresponding element and a field reporting an eventual related error message. For each entry, a client should first check the success flag and handle the entry according to its value;
  • retrieveReferenceTargetOIDs() – which takes as input parameter a message containing a reference specification expressed in terms of the source Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns the list of Information Object IDs of those objects referenced by the specified reference;
  • retrieveReferenceTargetOIDsBulk() – which takes as input parameter a message containing a list reference specifications expressed in terms of the source Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns the list of reference specifications expressed in terms of source Information Object ID, role of the reference, secondary role of the reference, target Information Object ID or error message, and sequence number of the entry in the list of those objects matching the specified criteria;
  • retrieveReferredAll() – which takes as input parameter a message containing a reference specifications expressed in terms of the target Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns the list of all the references currently existing that have the specified object as target specified in terms of the source and target Information Object IDs, the role, the secondary role, the criteria governing the removal;
  • retrieveReferredAllBulk() – which takes as input parameter a message containing a reference specifications expressed in terms of the target Information Object ID, the role of the reference and, optionally, the secondary role of the reference (these last two parameters are used to apply a filtering to the result) and returns the list of all the references currently existing that have the specified object as target; As this is a bulk operation, it might fail only for some of the elements requested. For this reason, each entry in the result list specifies, besides the source and target Information Object IDs, the role, the secondary role, the criteria governing the removal and the sequence number of the entry in the list, also a Boolean flag denoting whether the operation was successful for the corresponding element and a field reporting an eventual related error message. For each entry, a client should first check the success flag and handle the entry according to its value;
  • retrieveReferredSourceOIDs() – which takes as input parameter a message containing a reference specifications expressed in terms of the target Information Object ID, the role of the reference and, optionally, the secondary role of the reference (these last two parameters are used to apply a filtering to the result) and returns the list of all the Information Object IDs that are in a reference with the specified object as target;
  • retrieveReferredSourceOIDsBulk() – which takes as input parameter a message containing a list of reference specifications expressed in terms of the target Information Object ID, the role of the reference and, optionally, the secondary role of the reference (these last two parameters are used to apply a filtering to the result) and returns the list of references having the specified objects as target; this list of references is specified in terms of the target Information Object ID, the role, the secondary role, the source Information Object ID or an error message, and the sequence number of the entries in the list;
  • retrieveOIDInRelationWithAll() – which takes as input parameter a message containing a reference specification consisting of a list of a Boolean value indicating whether the searched object is source or target in the reference, the Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns a list on Information Object IDs of those objects that have a reference with all the objects in the specification;
  • retrieveObjectInRelationWithAll() – which takes as input parameter a message containing a reference specification consisting of a list of a Boolean value indicating whether the searched object is source or target in the reference, the Information Object ID, the role of the reference and, optionally, the secondary role of the reference and returns a list on Information Object descriptions excluding their raw content;
  • setStorageProperty() – which takes as input parameter a message containing the Information Object ID, the property name, the property type and the property value and sets the given property on the specified Information Object;
  • unsetStorageProperty() – which takes as input parameter a message containing the Information Object ID and the property name and removes the given property of the specified Information Object;
  • retrieveStorageProperties() – which takes as input parameter a message containing the Information Object ID and returns the properties attached to the given Information Object;
  • retrieveStorageProperty() – which takes as input parameter a message containing the Information Object ID and the property name and returns the property name, value and type of the specified property;
  • retrieveOIDsByStorageProperty() – which takes as input parameter a message containing the property name and the property value and returns the list of Information Object IDs of those objects having the specified property attached;
  • retrieveObjectsByStorageProperty() – which takes as input parameter a message containing the property name and the property value and returns the list of Information Object Descriptions of those objects having the specified property attached;
  • retrieveOIDsHavingAllStorageProperties() – which takes as input parameter a message containing a list of property names and property values and returns the list of Information Object IDs of those objects having all the specified properties attached;
  • retrieveObjectsHavingAllStorageProperties() – which takes as input parameter a message containing a list of property names and property values and returns the list of Information Object Descriptions of those objects having all the specified properties attached;
  • createInfoObjectWithContent() – which takes as input parameter a message containing the name and the type of the new Information Object to be created, the URI the raw content can be downloaded from or the raw content itself, some storage hints, a list of references with other Information Objects, and a list of properties and returns the Information Object ID of the just created object together with the consumed storage hints and a Boolean flag indicating whether the operation is successful or not;
  • createInfoObjectsWithContent() – which takes as input parameter a message containing a list of Information Object specifications expressed in terms of the name and the type of each Information Object to be created, the URI the raw content can be downloaded from or the raw content itself, some storage hints, a list of references with other Information Objects, and a list of properties and returns the list of Information Object IDs of the just created object together with the consumed storage hints;