Class AnyConfigArchiveManager

java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.config.AnyConfigArchiveManager

public class AnyConfigArchiveManager extends AbstractManager
Class to manage groups. Group identifier (group ID) is the group name.
  • Constructor Details

    • AnyConfigArchiveManager

      public AnyConfigArchiveManager(AnySession anySession)
      Instantiates a new groups manager.
      Parameters:
      anySession - the Any user session
  • Method Details

    • exportConfigData

      public List<IApiConfigModule> exportConfigData() throws Exception
      Retrieve the list of the exportable modules
      Returns:
      the list of the exportable modules
      Throws:
      Exception
    • exportConfig

      public InputStream exportConfig(boolean selectAll, List<IApiConfigModule> selectedModules) throws Exception
      Download the configuration archive.
      Parameters:
      selectAll - If true, it will export every configuration item, if false, it will export the ones defined in the 'selectedItems' parameters
      selectedModules - A list of items that will be exported.
      Returns:
      the response
      Throws:
      Exception - the exception if download is not correct or failed
    • importConfig

      public boolean importConfig(File file, ApiImportConfigOptions options) throws Exception
      Import the zip archive with the options passed as parameters.
      Parameters:
      file - the config archive file
      options - Object defining the config import options
      Returns:
      true, if the archive is successfully imported.
      Throws:
      Exception - the exception if you are not authorized to manage attachments of this content or content is not found
    • exportGroups

      public InputStream exportGroups(List<String> applications) throws Exception
      Download the groups archive.
      Parameters:
      applications - applications containing the groups that will be exported. If the list is empty, all groups will be exported
      Returns:
      the response
      Throws:
      Exception - the exception if download is not correct or failed
    • importGroups

      public boolean importGroups(File file, boolean overwriteItems, boolean importUserMembers) throws Exception
      Import the groups described in the zip archive with the options passed as parameters.
      Parameters:
      file - the content
      overwriteItems - Define if an existing group will be replaced by one with the same name coming from the archive.
      importUserMembers - Define if the group definition will be created/updated with the user membership references (users must exist prior to the import).
      Returns:
      true, if the archive is successfully imported.
      Throws:
      Exception - the exception if you are not authorized to manage attachments of this content or content is not found
    • exportRooms

      public InputStream exportRooms(List<String> applications) throws Exception
      Download the rooms archive.
      Parameters:
      applications - applications containing the rooms that will be exported. If the list is empty, all rooms will be exported
      Returns:
      the response
      Throws:
      Exception - the exception if download is not correct or failed
    • importRooms

      public boolean importRooms(File file, boolean overwriteItems, boolean importUserMembers, boolean importGroupMembers) throws Exception
      Import the rooms described in the zip archive with the options passed as parameters.
      Parameters:
      file - the content
      overwriteItems - Define if an existing room will be replaced by one with the same name coming from the archive.
      importUserMembers - Define if the room will be created/updated with the user membership references (users must exist prior to the import).
      importGroupMembers - Define if the room will be created/updated with the group membership references (groups must exist prior to the import).
      Returns:
      true, if the archive is successfully imported.
      Throws:
      Exception - the exception if you are not authorized to manage attachments of this content or content is not found
    • exportSearches

      public InputStream exportSearches(List<String> applications) throws Exception
      Download the public searches archive.
      Parameters:
      applications - applications containing the public searches that will be exported. If the list is empty, all public searches will be exported
      Returns:
      the response
      Throws:
      Exception - the exception if download is not correct or failed
    • importSearches

      public boolean importSearches(File file, boolean overwriteItems) throws Exception
      Import the public searches described in the zip archive with the options passed as parameters.
      Parameters:
      file - the content
      overwriteItems - Define if an existing searches will be replaced by one with the same name coming from the archive.
      Returns:
      true, if the archive is successfully imported.
      Throws:
      Exception - the exception if you are not authorized to manage attachments of this content or content is not found
    • exportTemplates

      public InputStream exportTemplates(List<String> applications) throws Exception
      Download the templates archive.
      Parameters:
      applications - applications containing the templates that will be exported. If the list is empty, all templates will be exported
      Returns:
      the response
      Throws:
      Exception - the exception if download is not correct or failed
    • importTemplates

      public boolean importTemplates(File file, boolean resetAll, List<String> resetedApplications) throws Exception
      Import the templates described in the zip archive with the options passed as parameters.
      Parameters:
      file - the content
      resetAll - Define if all the existing templates will be erased before importing the one coming from the archive.
      resetedApplications - Define a list of applications where the existing templates will be erased before importing the one coming from the archive.
      Returns:
      true, if the archive is successfully imported.
      Throws:
      Exception - the exception if you are not authorized to manage attachments of this content or content is not found