Class AnyPackagesManager

java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.packages.AnyPackagesManager

public class AnyPackagesManager extends AbstractManager
The Class AnyPackagesManager to manage packages.
  • Constructor Details

    • AnyPackagesManager

      public AnyPackagesManager(AnySession anySession)
      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 to
      locationId - A room id, from where you are adding new content from
      folderPath - 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

      public boolean deleteComponent(String packageId, String componentId) throws Exception
      Delete component from package
      Parameters:
      packageId - Id of the package to delete components from
      componentId - Id of the component
      Returns:
      Returns true if the removal is successful
      Throws:
      Exception - the exception
    • deleteComponents

      public boolean deleteComponents(String packageId, List<String> componentsId) throws Exception
      Delete components from package
      Parameters:
      packageId - Id of the package to delete components from
      componentIds - 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 from
      locationId - 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 return
      filters - Optional List of filters, to help narrow the search with
      sortBy - Optional list of fields to sort search results by
      Returns:
      List of items as JSON list
      Throws:
      Exception - the exception