Class AnyPackagesManager
java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.packages.AnyPackagesManager
The Class AnyPackagesManager to manage packages.
-
Field Summary
Fields inherited from class eu.c6.gibraltar.api.common.AbstractManager
APPLICATION_XLS, APPLICATION_XLS_TYPE, APPLICATION_XLSX, APPLICATION_XLSX_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionAnyPackagesManager(AnySession anySession) Instantiates a new Any packages manager. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddComponents(String packageId, String locationId, String folderPath, List<String> rootObjectIds, List<String> objectIds) Add component to packagebooleandeleteComponent(String packageId, String componentId) Delete component from packagebooleandeleteComponents(String packageId, List<String> componentsId) Delete components from packagegetPackagedItems(String packageId, String locationId, List<String> fields, List<IPredicate> filters, List<String> sortBy) Get package items
-
Constructor Details
-
AnyPackagesManager
Instantiates a new Any packages manager.- Parameters:
anySession- the Any user session
-
-
Method Details
-
addComponents
public boolean addComponents(String packageId, String locationId, String folderPath, List<String> rootObjectIds, List<String> objectIds) throws Exception Add component to package- Parameters:
packageid- Id of the package to add component tolocationId- A room id, from where you are adding new content fromfolderPath- folderPath A folder path, from where you are adding new content from. Set to NULL or empty if not used.rootObjectIds- An list of root object ids corresponding to the content to add as component.objectIds- An array of object ids corresponding to the content to add as component.- Returns:
- Returns true if all components are successfully added to the package
- Throws:
Exception- the exception
-
deleteComponent
Delete component from package- Parameters:
packageId- Id of the package to delete components fromcomponentId- Id of the component- Returns:
- Returns true if the removal is successful
- Throws:
Exception- the exception
-
deleteComponents
Delete components from package- Parameters:
packageId- Id of the package to delete components fromcomponentIds- List of components Id- Returns:
- Returns true if the removal is successful
- Throws:
Exception- the exception
-
getPackagedItems
public List<ICObject> getPackagedItems(String packageId, String locationId, List<String> fields, List<IPredicate> filters, List<String> sortBy) throws Exception Get package items- Parameters:
packageid- Id of the package to list items fromlocationId- A room id, from where you are listing package's content from. Returned fields will come form the corresponding column preferences of the location.filters- List of fields to returnfilters- Optional List of filters, to help narrow the search withsortBy- Optional list of fields to sort search results by- Returns:
- List of items as JSON list
- Throws:
Exception- the exception
-