Difference between revisions of "Storage Management(porttype)"
(Created page with 'This page describes the new portype offered by the SMS service. =StorageManagementCall= The use of the new port type has been simplified by a wrapper clas…') |
(→retrieveFilteredIOs) |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
==retrieveFilteredIOs== | ==retrieveFilteredIOs== | ||
The method ''retrieveFilteredIOs'' retrieves all the [[Storage Management#Reference_Model|IO]] selected by the specified filtering criteria. | The method ''retrieveFilteredIOs'' retrieves all the [[Storage Management#Reference_Model|IO]] selected by the specified filtering criteria. | ||
− | |||
The filtering criteria are expressed through a list of SMSFilter. | The filtering criteria are expressed through a list of SMSFilter. | ||
+ | |||
+ | The method returns a RS locator. | ||
All filters applied in 'and' conjunction. | All filters applied in 'and' conjunction. | ||
Line 19: | Line 20: | ||
** '''ReferenceSourceFilter''': accepts the IO which is target in a reference with the specified IO. | ** '''ReferenceSourceFilter''': accepts the IO which is target in a reference with the specified IO. | ||
** '''ReferenceTargetFilter''': accepts the IO which is target in a reference with the specified IO. | ** '''ReferenceTargetFilter''': accepts the IO which is target in a reference with the specified IO. | ||
+ | |||
+ | Example code: | ||
+ | <source lang="java5"> | ||
+ | //the filtering criteria | ||
+ | List<SMSFilter> filters = new LinkedList<SMSFilter>(); | ||
+ | |||
+ | //a reference filter expressing the collection membership | ||
+ | ReferenceTargetFilter targetFilter = new ReferenceTargetFilter("contentmanagement:is-member-of", null, collectionID); | ||
+ | filters.add(targetFilter); | ||
+ | |||
+ | //a property filter based on IO creation time | ||
+ | PropertyBetweenLongFilter creationTimeFilter = new PropertyBetweenLongFilter("contentmanagement:ObjectCreatedMillis", startTimestamp, endTimestamp); | ||
+ | filters.add(creationTimeFilter); | ||
+ | |||
+ | //we want back IO with content in attachment | ||
+ | SMSResponseConfig responseConfig = InformationObjectResponse.plainInformationObjectWithContentInMessage(); | ||
+ | |||
+ | String locator = call.retrieveFilteredIOs(responseConfig, filters); | ||
+ | </source> | ||
+ | |||
+ | ==Functions response== | ||
+ | Some SMS methods returns an RS locator. The type of response can be configured through a ''SMSResponseConfig'' parameter. | ||
+ | |||
+ | The possible response configurations are: | ||
+ | * '''OIDResponse''': the RS return strings representing the IOs id. | ||
+ | * '''InformationObjectResponse''': the RS return InformationObjectDescriptions representing the IOs. | ||
+ | |||
+ | The InformationObjectResponse configuration accept some parameters to set how object are filled with IO informations. | ||
+ | To help on setting the required parameters a set of static method have been created: | ||
+ | * '''plainInformationObject''': only basic informations, name, type and IO, are returned | ||
+ | * '''plainInformationObjectWithProperties''': basic informations and properties | ||
+ | * '''completeInformationObject''': basic informations, properties and references, but not content | ||
+ | * '''completeInformationObjectWithContent''': complete object information plus IO content. The ''location'' parameter specify where save the content. | ||
+ | * '''completeInformationObjectWithContentInMessage''': complete object information plus IO content. The content is attached to the message. | ||
+ | * '''plainInformationObjectWithContent''': basic object informations with the IO content in specified location. | ||
+ | * '''plainInformationObjectWithContentInMessage''': basic object information with the IO content attached to the message. |
Latest revision as of 18:05, 4 May 2010
This page describes the new portype offered by the SMS service.
StorageManagementCall
The use of the new port type has been simplified by a wrapper class (StorageManagementCall). The StorageManagementCall hide the WSRF implementation.
Functions
retrieveFilteredIOs
The method retrieveFilteredIOs retrieves all the IO selected by the specified filtering criteria. The filtering criteria are expressed through a list of SMSFilter.
The method returns a RS locator.
All filters applied in 'and' conjunction. The available filters:
- Property Filters, set of filters based on the properties values:
- PropertyEqualFilter: accepts the IO with a property with the specified name and value.
- PropertyBetweenLongFilter: accepts the IO if the specified property values is into the specified bounds.
- Reference Filters, set of filters based on IO references:
- ReferenceSourceFilter: accepts the IO which is target in a reference with the specified IO.
- ReferenceTargetFilter: accepts the IO which is target in a reference with the specified IO.
Example code:
//the filtering criteria List<SMSFilter> filters = new LinkedList<SMSFilter>(); //a reference filter expressing the collection membership ReferenceTargetFilter targetFilter = new ReferenceTargetFilter("contentmanagement:is-member-of", null, collectionID); filters.add(targetFilter); //a property filter based on IO creation time PropertyBetweenLongFilter creationTimeFilter = new PropertyBetweenLongFilter("contentmanagement:ObjectCreatedMillis", startTimestamp, endTimestamp); filters.add(creationTimeFilter); //we want back IO with content in attachment SMSResponseConfig responseConfig = InformationObjectResponse.plainInformationObjectWithContentInMessage(); String locator = call.retrieveFilteredIOs(responseConfig, filters);
Functions response
Some SMS methods returns an RS locator. The type of response can be configured through a SMSResponseConfig parameter.
The possible response configurations are:
- OIDResponse: the RS return strings representing the IOs id.
- InformationObjectResponse: the RS return InformationObjectDescriptions representing the IOs.
The InformationObjectResponse configuration accept some parameters to set how object are filled with IO informations. To help on setting the required parameters a set of static method have been created:
- plainInformationObject: only basic informations, name, type and IO, are returned
- plainInformationObjectWithProperties: basic informations and properties
- completeInformationObject: basic informations, properties and references, but not content
- completeInformationObjectWithContent: complete object information plus IO content. The location parameter specify where save the content.
- completeInformationObjectWithContentInMessage: complete object information plus IO content. The content is attached to the message.
- plainInformationObjectWithContent: basic object informations with the IO content in specified location.
- plainInformationObjectWithContentInMessage: basic object information with the IO content attached to the message.