Interface OrganizationManager
OrganizationManager API exposes the methods to manage an
Organization. To manage an Organization, it provides functionality to create,
modify, enable, disable and delete the Organization. It also provides the
support for bulk enable, disable and delete Organization operations.- Author:
- abhimanyu seth
-
Method Summary
Modifier and TypeMethodDescriptioncreate(Organization org) Creates a new Organization entity in the backend data store.voidDeletes an already existing Organization entity.voidDeletes an already existing Organization entity.voidDeletes an already existing Organization entity.Deletes existing Organizations in bulk.Deletes existing Organizations in bulk.voidDisables an already existing Organization entity.voidDisables an already existing Organization entity.Disables existing Organizations in bulk.voidEnables an already existing Organization entity.voidEnables an already existing Organization entity.Enables existing Organizations in bulk.Returns list of children of the Organization identified by orgKey.getDetails(String attributeName, Object attributeValue, Set<String> retAttrs) Looks up an already existing Organization entity.getDetails(String orgID, Set<String> retAttrs, boolean isOrgName) Looks up an already existing Organization entity.getDetails(String orgID, Set<String> retAttrs, boolean isOrgName, OperationContext opContext) Looks up an already existing Organization entity.longAPI to return the Organization Count depending on the search criteria.getOrganizationMemberIds(String orgKey) Returns list of User member Ids of the Organization identified by orgkey.getOrganizationMembers(String orgKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) Returns list of User members of the Organization identified by orgkey.getOrganizationMembersRelations(String orgKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) Returns the User-Org memberships along with the relationship details.getRolesAvailableToOrganization(String orgKey, SearchCriteria sc, Set<String> retAttrs, Map<String, Object> configParams) returns the available roles to the specified OrganizationgetUserMembershipRelations(String userKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) Returns the User-Org memberships along with the relationship details.getUserMembershipRule(String orgKey) Gets the value of act_user_membership_rule attribute of the specified organization.getUserMemberships(String userKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) Returns list of Organizations of which the User identified by userKey is a member.booleanhasStaticUserMembers(String orgKey) Checks whether an organization (identified by orgKey) contains any static user members.booleanisUserMemberOf(String orgKey, String userKey) Returns true if user identified by userKey is a member of the organization identified by orgKey.Modifies an already existing Organization entity.modify(Organization org) Modifies an already existing Organization entity.previewDynamicUserMembership(String orgKey, SearchRule userMembershipRule, Set<String> retAttrs, Map<String, Object> configParam) Returns list of User members computed by the membership rule.Searches for Organization entities matching the specified SearchCriteria.voidsetUserMembershipRule(String orgKey, SearchRule userMembershipRule) Sets the value of "User Membership Rule" attribute of the specified organization.setUserMembershipRule(String orgKey, SearchRule userMembershipRule, boolean evaluateMembershipLater) Sets the value of "User Membership Rule" attribute of the specified organization.
-
Method Details
-
create
Creates a new Organization entity in the backend data store.- Parameters:
org- The Organization value Object containing attributes of the organization to be created.- Returns:
- Status of the operation.
- Throws:
OrganizationManagerException- If the operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
search
List<Organization> search(SearchCriteria sc, Set<String> retAttrs, Map<String, Object> config) throws OrganizationManagerException, AccessDeniedExceptionSearches for Organization entities matching the specified SearchCriteria.- Parameters:
sc- The search criteria based on which entries will be retrieved from the backend.retAttrs- The list of attributes which are to be returned for each Organization.config- Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.
The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional and is set to 'User Login' by default.
The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING. This parameter is optional and is set to SortOrder.ASCENDING by default.
- Returns:
- List of organization entities matching the search criteria.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getDetails
Organization getDetails(String orgID, Set<String> retAttrs, boolean isOrgName) throws OrganizationManagerException, AccessDeniedException Looks up an already existing Organization entity.- Parameters:
orgID- The id of the Organization entity to be looked up. The isOrgName flag determines what does orgID represent.retAttrs- The list of attributes of the Organization to be returnedisOrgName- Set to true, if the orgID contains Organization name and false if the orgID is Organization key.- Returns:
- An Organization entity matching the given
orgID. - Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getDetails
Organization getDetails(String orgID, Set<String> retAttrs, boolean isOrgName, OperationContext opContext) throws OrganizationManagerException, AccessDeniedException Looks up an already existing Organization entity.- Parameters:
orgID- The id of the Organization entity to be looked up. The isOrgName flag determines what does orgID represent.retAttrs- The list of attributes of the Organization to be returnedisOrgName- Set to true, if the orgID contains Organization name and false if the orgID is Organization key.opContext- Context of a request.- Returns:
- An Organization entity matching the given
orgID. - Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getDetails
Organization getDetails(String attributeName, Object attributeValue, Set<String> retAttrs) throws OrganizationManagerException, AccessDeniedException, SearchKeyNotUniqueException Looks up an already existing Organization entity.- Parameters:
attributeName- The attribute name for the search criteria.attributeValue- The attribute value for the search criteria.retAttrs- The list of attributes of the Organization to be returned- Returns:
- An Organization entity matching the given search criteria.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.SearchKeyNotUniqueException- If more than one Organization forattributeNameandattributeValuewere found.
-
modify
Modifies an already existing Organization entity.- Parameters:
org- The Organization value Object containing attributes and entity id of the Organization to be modified.- Returns:
- Status of the operation.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
modify
String modify(String attributeName, Object attributeValue, HashMap<String, Object> attributes) throws OrganizationManagerException, AccessDeniedException, SearchKeyNotUniqueExceptionModifies an already existing Organization entity.- Parameters:
attributeName- The attribute name for the search criteria.attributeValue- The attribute value for the search criteria.attributes- The attributes of the Organization to modify along with their new values- Returns:
- Status of the operation.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.SearchKeyNotUniqueException- If more than one Organization forattributeNameandattributeValuewere found.
-
delete
void delete(String orgID, boolean isOrgName) throws OrganizationDeleteException, NoSuchOrganizationException, OrganizationAlreadyDeletedException, OrganizationDeleteSubOrgsExistException, OrganizationDeleteSubOrgsUsersExistException, OrganizationDeleteUsersExistException, OrganizationOrphanedPublishedEntitiesException, AccessDeniedException Deletes an already existing Organization entity. This is a soft delete and doesn't remove the Organization from the data store. It just marks the Organization entity as 'deleted'.- Parameters:
orgID- The id of the Organization entity to be deleted. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, if the orgID contains Organization name and false if the orgID is Organization key.- Throws:
NoSuchOrganizationException- If the Organization with keyorgIDdoes not exist.OrganizationAlreadyDeletedException- If the Organization entity is already deleted.OrganizationDeleteSubOrgsExistException- If the Organization has child Organizations which are not yet deleted.OrganizationDeleteSubOrgsUsersExistException- If the Organization has child Organization whose users are not yet deleted.OrganizationDeleteUsersExistException- If the organization has users which are not yet deleted.AccessDeniedException- If the logged-in user does not have the required authorization.OrganizationDeleteException- If operation fails due to some internal reason.OrganizationOrphanedPublishedEntitiesException- If published entities will be orphaned.
-
delete
void delete(String attributeName, Object attributeValue) throws OrganizationDeleteException, NoSuchOrganizationException, OrganizationAlreadyDeletedException, OrganizationDeleteSubOrgsExistException, OrganizationDeleteSubOrgsUsersExistException, OrganizationDeleteUsersExistException, AccessDeniedException, OrganizationOrphanedPublishedEntitiesException, SearchKeyNotUniqueException Deletes an already existing Organization entity. This is a soft delete and doesn't remove the Organization from the data store. It just marks the Organization entity as 'deleted'.- Parameters:
attributeName- The attribute name for the search criteria.attributeValue- The attribute value for the search criteria.- Throws:
NoSuchOrganizationException- If the Organization with attribute nameattributeNameand valueattributeValuedoes not exist.OrganizationAlreadyDeletedException- If the Organization entity is already deleted.OrganizationDeleteSubOrgsExistException- If the Organization has child Organizations which are not yet deleted.OrganizationDeleteSubOrgsUsersExistException- If the Organization has child Organization whose users are not yet deleted.OrganizationDeleteUsersExistException- If the Organization has users which are not yet deleted.AccessDeniedException- If the logged-in user does not have the required authorization.OrganizationDeleteException- If operation fails due to some internal reason.SearchKeyNotUniqueException- If more than one Organization forattributeNameandattributeValuewere found.OrganizationOrphanedPublishedEntitiesException- If published entities will be orphaned.
-
delete
void delete(String orgID, Map<String, Object> controlParams) throws OrganizationDeleteException, NoSuchOrganizationException, OrganizationAlreadyDeletedException, OrganizationDeleteSubOrgsExistException, OrganizationDeleteSubOrgsUsersExistException, OrganizationDeleteUsersExistException, OrganizationOrphanedPublishedEntitiesException, AccessDeniedExceptionDeletes an already existing Organization entity. This is a soft delete and doesn't remove the Organization from the data store. It just marks the Organization entity as 'deleted'.- Parameters:
orgID- The id of the Organization entity to be deleted.controlParams- Parameters to control the method logic. Currently may contain the following: If 'isOrgName' flag is set to true, the orgID argument contains Organization name and false if the orgID is Organization key. 'ignoreOrphanedPublishedEntities' flag is set to true if org should be deleted even if deletion will result in orphaned published entities and false if an exception should be thrown if there are orphanable published entities.- Throws:
NoSuchOrganizationException- If the Organization with keyorgIDdoes not exist.OrganizationAlreadyDeletedException- If the Organization entity is already deleted.OrganizationDeleteSubOrgsExistException- If the Organization has child Organizations which are not yet deleted.OrganizationDeleteSubOrgsUsersExistException- If the Organization has child Organization whose users are not yet deleted.OrganizationDeleteUsersExistException- If the organization has users which are not yet deleted.AccessDeniedException- If the logged-in user does not have the required authorization.OrganizationDeleteException- If operation fails due to some internal reason.OrganizationOrphanedPublishedEntitiesException- If published entities will be orphaned and ignoreOrphanedPublishedEntities is set to false;
-
enable
void enable(String orgID, boolean isOrgName) throws OrganizationEnableException, OrganizationAlreadyDeletedException, NoSuchOrganizationException, AccessDeniedException Enables an already existing Organization entity.- Parameters:
orgID- The id of the Organization entity to be enabled. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, if the orgID contains Organization name and false if the orgID is Organization key.- Throws:
OrganizationAlreadyDeletedException- If the Organization entity is in deleted state.NoSuchOrganizationException- If the Organization with keyorgIDdoes not exist.AccessDeniedException- If the logged-in user does not have the required authorization.OrganizationEnableException- If operation fails due to some internal reason.
-
enable
void enable(String attributeName, Object attributeValue) throws OrganizationEnableException, OrganizationAlreadyDeletedException, NoSuchOrganizationException, AccessDeniedException, SearchKeyNotUniqueException Enables an already existing Organization entity.- Parameters:
attributeName- The attribute name for the search criteria.attributeValue- The attribute value for the search criteria.- Throws:
OrganizationAlreadyDeletedException- If the Organization entity is in deleted state.NoSuchOrganizationException- If the Organization with attribute nameattributeNameand valueattributeValuedoes not exist.AccessDeniedException- If the logged-in user does not have the required authorization.OrganizationEnableException- If operation fails due to some internal reason.SearchKeyNotUniqueException- If more than one Organization forattributeNameandattributeValuewere found.
-
disable
void disable(String orgID, boolean isOrgName) throws OrganizationDisableException, NoSuchOrganizationException, OrganizationAlreadyDeletedException, OrganizationDisableSubOrgsExistException, OrganizationDisableSubOrgsUsersExistException, OrganizationDisableUsersExistException, AccessDeniedException Disables an already existing Organization entity.- Parameters:
orgID- The id of the Organization entity to be disabled. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, if the orgID contains Organization name and false if the orgID is Organization key.- Throws:
NoSuchOrganizationException- If the Organization with keyorgIDdoes not exist.OrganizationAlreadyDeletedException- If the Organization entity is in deleted state.OrganizationDisableSubOrgsExistException- If the Organization has one or more child Organizations and atleast one child Organization in enabled state.OrganizationDisableSubOrgsUsersExistException- If the Organization has one or more child Organizations and atleast one user of any of the child Organization is enabled.OrganizationDisableUsersExistException- If the Organization has atleast one user enabled.OrganizationDisableException- If operation fails due to some internal reason.AccessDeniedException- If the logged-in user does not have the required authorization.
-
disable
void disable(String attributeName, Object attributeValue) throws OrganizationDisableException, NoSuchOrganizationException, OrganizationAlreadyDeletedException, OrganizationDisableSubOrgsExistException, OrganizationDisableSubOrgsUsersExistException, OrganizationDisableUsersExistException, AccessDeniedException, SearchKeyNotUniqueException Disables an already existing Organization entity.- Parameters:
attributeName- The attribute name for the search criteria.attributeValue- The attribute value for the search criteria.- Throws:
NoSuchOrganizationException- If the Organization with attribute nameattributeNameand valueattributeValuedoes not exist.OrganizationAlreadyDeletedException- If the Organization entity is in deleted state.OrganizationDisableSubOrgsExistException- If the Organization has one or more child Organizations and atleast one child Organization in enabled state.OrganizationDisableSubOrgsUsersExistException- If the Organization has one or more child Organizations and atleast one user of any of the child Organization is enabled.OrganizationDisableUsersExistException- If the Organization has atleast one user enabled.OrganizationDisableException- If operation fails due to some internal reason.AccessDeniedException- If the logged-in user does not have the required authorization.SearchKeyNotUniqueException- If more than one Organization forattributeNameandattributeValuewere found.
-
enable
OrganizationManagerBulkResult enable(Set<String> orgIDs, boolean isOrgName) throws OrganizationStatusChangeException, NoSuchOrganizationException, AccessDeniedException Enables existing Organizations in bulk.- Parameters:
orgIDs- The ids of the Organizations to be enabled. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, iforgIDscontains Organization names and false if theorgIDsare Organization keys.- Returns:
- OrganizationManagerBulkResult containing operation result for all organizations.
- Throws:
OrganizationStatusChangeException- If the Organizations can not be enabled due to some internal reason.NoSuchOrganizationException- If atleast one of the Organization specified in theorgIDslist does not exist.AccessDeniedException- If the logged-in user does not have the required authorization.
-
disable
OrganizationManagerBulkResult disable(Set<String> orgIDs, boolean isOrgName) throws OrganizationStatusChangeException, NoSuchOrganizationException, AccessDeniedException Disables existing Organizations in bulk.- Parameters:
orgIDs- The ids of the Organizations to be disabled. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, iforgIDscontains Organization names and false if theorgIDsare Organization keys.- Returns:
- OrganizationManagerBulkResult containing operation result for all Organizations.
- Throws:
OrganizationStatusChangeException- If the Organizations can not be disabled due to some internal reason.NoSuchOrganizationException- If atleast one of the Organization specified in theorgIDslist does not exist.AccessDeniedException- If the logged-in user does not have the required authorization.
-
delete
OrganizationManagerBulkResult delete(Set<String> orgIDs, boolean isOrgName) throws OrganizationStatusChangeException, NoSuchOrganizationException, AccessDeniedException Deletes existing Organizations in bulk. This is a soft delete and doesn't remove the Organizations from the data store. It just marks the Organization entities as 'deleted'.- Parameters:
orgIDs- The ids of the Organizations to be deleted. The isOrgName flag determines what does orgID represent.isOrgName- Set to true, iforgIDscontains Organization names and false if theorgIDsare Organization keys.- Returns:
- OrganizationManagerBulkResult containing operation result for all Organizations.
- Throws:
OrganizationStatusChangeException- If the Organizations can not be deleted due to some internal reason.NoSuchOrganizationException- If atleast one of the Organization specified in theorgIDslist does not exist.AccessDeniedException- If the logged-in user does not have the required authorization.
-
delete
OrganizationManagerBulkResult delete(Set<String> orgIDs, Map<String, Object> controlParams) throws OrganizationStatusChangeException, NoSuchOrganizationException, AccessDeniedExceptionDeletes existing Organizations in bulk. This is a soft delete and doesn't remove the Organizations from the data store. It just marks the Organization entities as 'deleted'.- Parameters:
orgIDs- The ids of the Organizations to be deleted.controlParams- Parameters to control the method logic. Currently may contain the following: If 'isOrgName' flag is set to true, if the orgID contains Organization name and false if the orgID is Organization key. If 'ignoreOrphanedPublishedEntities' flag is set to true if org should be deleted even if deletion will result in orphaned published entities and false if an exception should be thrown if there are orphaned published entities.- Returns:
- OrganizationManagerBulkResult containing operation result for all Organizations.
- Throws:
OrganizationStatusChangeException- If the Organizations can not be deleted due to some internal reason.NoSuchOrganizationException- If atleast one of the Organization specified in theorgIDslist does not exist.AccessDeniedException- If the logged-in user does not have the required authorization.
-
setUserMembershipRule
String setUserMembershipRule(String orgKey, SearchRule userMembershipRule) throws OrganizationManagerException, AccessDeniedException Sets the value of "User Membership Rule" attribute of the specified organization. Refreshes the dynamic user members of the organization as per the new rule (during post processing). Does not immediately refresh the Dynamic Org memberships (as per org-user membership rules) which should be granted to newly added users. Internally, this is as good as callingsetUserMembershipRule(orgKey, userMembershipRule, false) ;- Parameters:
orgKey- The id of the OrganizationuserMembershipRule- The membership rule- Returns:
- Status of the operation.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
setUserMembershipRule
String setUserMembershipRule(String orgKey, SearchRule userMembershipRule, boolean evaluateMembershipLater) throws OrganizationManagerException, AccessDeniedException Sets the value of "User Membership Rule" attribute of the specified organization. Refreshes the dynamic user members of the organization as per the new rule (during post processing).- Parameters:
orgKey- The id of the OrganizationuserMembershipRule- The membership ruleevaluateMembershipLater- Flag to control whether to refresh org-user memberships. Iftrue, then The evaluation of the user memberships as per the new rule will happen via a scheduled task. Iffalse, then The evaluation of the user memberships as per the new rule will happen immediately after this method returns (as a post process step).- Returns:
- Status of the operation.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getUserMembershipRule
SearchRule getUserMembershipRule(String orgKey) throws OrganizationManagerException, AccessDeniedException Gets the value of act_user_membership_rule attribute of the specified organization.- Parameters:
orgKey- The id of the Organization- Returns:
- The membership rule.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
isUserMemberOf
boolean isUserMemberOf(String orgKey, String userKey) throws OrganizationManagerException, AccessDeniedException Returns true if user identified by userKey is a member of the organization identified by orgKey.- Parameters:
orgKey- The id of the OrganizationuserKey- The id of the user.- Returns:
- boolean true if user is a member, false if not.
- Throws:
OrganizationManagerException- If user or organization does not exist.AccessDeniedException
-
getOrganizationMembers
List<User> getOrganizationMembers(String orgKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionReturns list of User members of the Organization identified by orgkey.- Parameters:
orgKey- The id of the OrganizationretAttrs- Names of User attributes to be returned- Returns:
- List of direct, non-deleted User members
- Throws:
OrganizationManagerExceptionAccessDeniedException
-
getOrganizationMemberIds
List<String> getOrganizationMemberIds(String orgKey) throws OrganizationManagerException, AccessDeniedException Returns list of User member Ids of the Organization identified by orgkey.- Parameters:
orgKey- The id of the Organization- Returns:
- List of direct, non-deleted User member Ids
- Throws:
OrganizationManagerExceptionAccessDeniedException
-
getUserMemberships
List<Organization> getUserMemberships(String userKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionReturns list of Organizations of which the User identified by userKey is a member.- Parameters:
userKey- The id of the UserretAttrs- Names of Organization attributes to be returned- Returns:
- List of Organizations of which the User is a member.
- Throws:
OrganizationManagerExceptionAccessDeniedException
-
previewDynamicUserMembership
List<User> previewDynamicUserMembership(String orgKey, SearchRule userMembershipRule, Set<String> retAttrs, Map<String, Object> configParam) throws OrganizationManagerException, AccessDeniedExceptionReturns list of User members computed by the membership rule.- Parameters:
orgKey- Key of the organization for which memberships are being previewed.userMembershipRule- The dynamic membership rule to be evaluated.- Returns:
- List of User members
- Throws:
OrganizationManagerExceptionAccessDeniedException
-
hasStaticUserMembers
Checks whether an organization (identified by orgKey) contains any static user members. It means, whether there are users in the system who have their home organization set to a given organization key.- Parameters:
orgKey- The Entity ID of the organization- Returns:
- True: if the organization contains some static members False: otherwise
- Throws:
OrganizationManagerException
-
getChildOrganizations
List<Organization> getChildOrganizations(String orgKey, Set<String> retAttrs, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionReturns list of children of the Organization identified by orgKey.- Parameters:
orgKey- The parent organization key.retAttrs- Names of Organization attributes to be returned.configParams- Sorting and paging parameters.- Returns:
- Throws:
OrganizationManagerExceptionAccessDeniedException
-
setUdfInMds
void setUdfInMds() -
getRolesAvailableToOrganization
List<Role> getRolesAvailableToOrganization(String orgKey, SearchCriteria sc, Set<String> retAttrs, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionreturns the available roles to the specified Organization- Parameters:
orgKey- The organization key.sc- SearchCriteria to filter out specific Roles only.retAttrs- The list of attributes which are to be returned for all Roles.configParams- Sorting and pagination parameters. Usage similar to configParams in RoleManager.search() method.- Returns:
- List of all available roles.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getUserMembershipRelations
List<OrgUserRelationship> getUserMembershipRelations(String userKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionReturns the User-Org memberships along with the relationship details. This method should be invoked from the context of the user (i.e. to get the list of organizations that the user has).- Parameters:
userKey- The id of the UserretAttrs- Names of Organization attributes to be returned- Returns:
- List of Organizations of which the User is a member.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authoriza
-
getOrganizationMembersRelations
List<OrgUserRelationship> getOrganizationMembersRelations(String orgKey, Set<String> retAttrs, SearchCriteria sc, Map<String, Object> configParams) throws OrganizationManagerException, AccessDeniedExceptionReturns the User-Org memberships along with the relationship details. This method should be invoked from the context of the Organization (i.e. to get the list of users that the Organization has).- Parameters:
orgKey- - The id of the OrganizationretAttrs- - Names of User attributes to be returnedsc- - SearchCriteria to filter out specific members onlyconfigParams- - Sorting and pagination parameters. Usage similar to configParams in OrganizationManager.search() method.- Returns:
- - List of OrgUserRelationship object, containing the relationship details.
- Throws:
OrganizationManagerException- If operation fails.AccessDeniedException- If the logged-in user does not have the required authorization.
-
getOrganizationCount
API to return the Organization Count depending on the search criteria. This API should be used when a requirement of organization count for a particular criteria is required without calling search and getting all the organization result to just get a count.- Parameters:
sc- - SearchCriteria for which the total organization count is expected- Returns:
- Count of organizations depending on criteria passed.
-