public interface OrganizationAPI
Modifier and Type | Method and Description |
---|---|
void |
deleteOrganization()
Deletes the organization.
|
String |
exportOrganization()
Exports the organization.
|
void |
importOrganization(String organizationContent)
Imports the organization using the
ImportPolicy.MERGE_DUPLICATES policy. |
void |
importOrganization(String organizationContent,
ImportPolicy policy)
Deprecated.
since 7.5.2, use
importOrganizationWithWarnings(String, ImportPolicy) instead. |
List<String> |
importOrganizationWithWarnings(String organizationContent,
ImportPolicy policy)
Imports the organization.
|
void deleteOrganization() throws DeletionException
It deletes all user memberships, roles, groups, users and custom user info.
Use this method with caution: some artifacts like Application
s and DesignProcessDefinition
s may present display problems in the Bonita
BPM Portal if the referenced user was deleted. Note that you can disable a user instead of deleting it. To do so, use the method
UserAPI.updateUser(long, UserUpdater)
to set the attribute 'enabled' to false
DeletionException
- If an exception occurs during the organization deletionInvalidSessionException
- If the session is invalid (expired, unknown, ...)UserAPI.updateUser(long, UserUpdater)
,
Application
,
DesignProcessDefinition
void importOrganization(String organizationContent) throws OrganizationImportException
ImportPolicy.MERGE_DUPLICATES
policy.
An organization is composed by users, roles, groups and user memberships.
organizationContent
- the XML content of the organizationOrganizationImportException
- If an exception occurs during the organization importInvalidSessionException
- If the session is invalid (expired, unknown, ...)@Deprecated void importOrganization(String organizationContent, ImportPolicy policy) throws OrganizationImportException
importOrganizationWithWarnings(String, ImportPolicy)
instead.An organization is composed by users, roles, groups and user memberships.
organizationContent
- the XML content of the organizationpolicy
- the import policyOrganizationImportException
- If an exception occurs during the organization importInvalidSessionException
- If the session is invalid (expired, unknown, ...)List<String> importOrganizationWithWarnings(String organizationContent, ImportPolicy policy) throws OrganizationImportException
importOrganization(String, ImportPolicy)
but allows
to inform the end-user of particular non-critical events that occured during the import.
Ex: If a group in the organization contains an illegal character in their name, the method will import all the other groups in the organization, and return a List with one String : "The group name (...) contains the illegal character (...). The group has not been imported"
An organization is composed by users, roles, groups and user memberships.
organizationContent
- the XML content of the organizationpolicy
- the import policyOrganizationImportException
- If an exception occurs during the organization importInvalidSessionException
- If the session is invalid (expired, unknown, ...)importOrganizationWithWarnings(String, ImportPolicy)
String exportOrganization() throws OrganizationExportException
An organization is composed by users, roles, groups and user memberships.
OrganizationExportException
- If an exception occurs during the organization exportInvalidSessionException
- If the session is invalid (expired, unknown, ...)Copyright © 2018 Bonitasoft S.A.. All rights reserved.