Class AnyConfigArchiveManager
java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.config.AnyConfigArchiveManager
Class to manage groups. Group identifier (group ID) is the group name.
-
Field Summary
Fields inherited from class eu.c6.gibraltar.api.common.AbstractManager
APPLICATION_XLS, APPLICATION_XLS_TYPE, APPLICATION_XLSX, APPLICATION_XLSX_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionAnyConfigArchiveManager(AnySession anySession) Instantiates a new groups manager. -
Method Summary
Modifier and TypeMethodDescriptionexportConfig(boolean selectAll, List<IApiConfigModule> selectedModules) Download the configuration archive.Retrieve the list of the exportable modulesexportGroups(List<String> applications) Download the groups archive.exportRooms(List<String> applications) Download the rooms archive.exportSearches(List<String> applications) Download the public searches archive.exportTemplates(List<String> applications) Download the templates archive.booleanimportConfig(File file, ApiImportConfigOptions options) Import the zip archive with the options passed as parameters.booleanimportGroups(File file, boolean overwriteItems, boolean importUserMembers) Import the groups described in the zip archive with the options passed as parameters.booleanimportRooms(File file, boolean overwriteItems, boolean importUserMembers, boolean importGroupMembers) Import the rooms described in the zip archive with the options passed as parameters.booleanimportSearches(File file, boolean overwriteItems) Import the public searches described in the zip archive with the options passed as parameters.booleanimportTemplates(File file, boolean resetAll, List<String> resetedApplications) Import the templates described in the zip archive with the options passed as parameters.
-
Constructor Details
-
AnyConfigArchiveManager
Instantiates a new groups manager.- Parameters:
anySession- the Any user session
-
-
Method Details
-
exportConfigData
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' parametersselectedModules- A list of items that will be exported.- Returns:
- the response
- Throws:
Exception- the exception if download is not correct or failed
-
importConfig
Import the zip archive with the options passed as parameters.- Parameters:
file- the config archive fileoptions- 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
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 contentoverwriteItems- 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
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 contentoverwriteItems- 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
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
Import the public searches described in the zip archive with the options passed as parameters.- Parameters:
file- the contentoverwriteItems- 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
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 contentresetAll- 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
-