Interface GroupService

All Superinterfaces:
ContextSensitiveSingletonService, Service

public interface GroupService extends ContextSensitiveSingletonService
Provides the main functionality needed to create, update, delete, and get groups. Groups is an collaborative set of users and/or groups that allows mass updates for its members. For example, if a set of users will be working on a project together, and if one wants to give permissions to all these users or notify them, then it is easier to update en masse by granting privilges to the group and emailing the group. There are three group security types: public, personal and team. Public groups are visible to all users, and all users can apply to join. Personal groups are only visible to the group administrators, and all users must be added by the administrator. Team groups are visible to group members and users must be added by the group administrator. Group membership can be set explicitly or by using rules. A sample rule could be: all user's whose username starts with "m" are members. Every group can have at most one parent, as long as it is not recursive. That is A cannot be a parent of B, B a parent of C and C a parent of A. When a child group is created, it is automatically added as a member of the parent group. However, the parent group can have many member groups that do not have it as the parent group. There are three different membership policies: open, exclusive and closed. Open means that anyone can join. Exclusive means users can request to be added by the administrator. Closed means administrators can add. There are two viewing policies: high and low. High means that only administrators can see members, while low means members can see each other. "My Groups" is bookmark for a user's frequently used groups, so that these groups can be accessed quickly. Delegated creation means that a user is granted permission by the group Administrator to create groups with the delegated group as parent.
  • Field Details

    • USER_ROLE_SUPERADMIN

      static final Integer USER_ROLE_SUPERADMIN
    • USER_ROLE_CREATOR

      static final Integer USER_ROLE_CREATOR
    • USER_ROLE_ADMINISTRATOR

      static final Integer USER_ROLE_ADMINISTRATOR
    • USER_ROLE_VIEWER

      static final Integer USER_ROLE_VIEWER
    • USER_ROLE_MEMBER

      static final Integer USER_ROLE_MEMBER
    • USER_ROLE_NONMEMBER

      static final Integer USER_ROLE_NONMEMBER
    • RELATIONSHIP_TYPE_HEIRARCHY

      static final String RELATIONSHIP_TYPE_HEIRARCHY
      See Also:
    • ACTION_GROUP_DELETE_GROUP

      static final Integer ACTION_GROUP_DELETE_GROUP
      Constant for whether the user can delete the group
    • ACTION_GROUP_EDIT_GROUP_ATTRIBUTES

      static final Integer ACTION_GROUP_EDIT_GROUP_ATTRIBUTES
      Constant for whether the user can edit group attributes
    • ACTION_GROUP_ADD_GROUP_MEMBERS

      static final Integer ACTION_GROUP_ADD_GROUP_MEMBERS
      Constant for whether the user can add members to the group
    • ACTION_GROUP_DELETE_GROUP_MEMBERS

      static final Integer ACTION_GROUP_DELETE_GROUP_MEMBERS
      Constant for whether the user can remove group members
    • ACTION_GROUP_ADD_GROUP_RULES

      static final Integer ACTION_GROUP_ADD_GROUP_RULES
      Constant for whether the user can add group membership rules
    • ACTION_GROUP_DELETE_GROUP_RULES

      static final Integer ACTION_GROUP_DELETE_GROUP_RULES
      Constant for whether the user can delete group membership rules
    • ACTION_GROUP_VIEW_GROUP_EXISTENCE

      static final Integer ACTION_GROUP_VIEW_GROUP_EXISTENCE
      Constant for whether the user can check the existence of the group
    • ACTION_GROUP_VIEW_GROUP_ATTRIBUTES

      static final Integer ACTION_GROUP_VIEW_GROUP_ATTRIBUTES
      Constant for whether the user can view the group attributes
    • ACTION_GROUP_VIEW_GROUP_MEMBERS

      static final Integer ACTION_GROUP_VIEW_GROUP_MEMBERS
      Constant for whether the user can view group members
    • ACTION_GROUP_VIEW_GROUP_RULES

      static final Integer ACTION_GROUP_VIEW_GROUP_RULES
      Constant for whether the user can view the membership rules of the group
    • ACTION_GROUP_ADD_SELF_TO_GROUP

      static final Integer ACTION_GROUP_ADD_SELF_TO_GROUP
      Constant for whether the user can add self to group
    • ACTION_GROUP_REMOVE_SELF_FROM_GROUP

      static final Integer ACTION_GROUP_REMOVE_SELF_FROM_GROUP
      Constant for whether the user can remove his/her membership from group
    • ACTION_GROUP_UPDATE_DELEGATED_ADMINISTRATION

      static final Integer ACTION_GROUP_UPDATE_DELEGATED_ADMINISTRATION
      Constant for whether the user can delegate group administration
    • ACTION_GROUP_USE_GROUP_AS_DELEGATED_PARENT

      static final Integer ACTION_GROUP_USE_GROUP_AS_DELEGATED_PARENT
      Constant for whether the group can be delegated to be a parent group for creation of new groups
    • GROUP_TYPE_CHANGE_SUCCESS

      static final Integer GROUP_TYPE_CHANGE_SUCCESS
      Constant for whether changing the group type of group was successful
    • GROUP_TYPE_CHANGE_NO_PRIVILEGE

      static final Integer GROUP_TYPE_CHANGE_NO_PRIVILEGE
      Constant for PrivilegeException where user cannot change group type of group
    • GROUP_TYPE_CHANGE_INVALID_GROUP

      static final Integer GROUP_TYPE_CHANGE_INVALID_GROUP
      Constant for InvalidGroupException where group Id is invalid.
    • GROUP_TYPE_CHANGE_INVALID_GROUPTYPE

      static final Integer GROUP_TYPE_CHANGE_INVALID_GROUPTYPE
      Constant for InvalidGroupTypeException when grouptype of group is invalid
    • createGroup$UPDATES

      static final boolean createGroup$UPDATES
      See Also:
    • createGroups$UPDATES

      static final boolean createGroups$UPDATES
      See Also:
    • updateGroup$UPDATES

      static final boolean updateGroup$UPDATES
      See Also:
    • updateGroups$UPDATES

      static final boolean updateGroups$UPDATES
      See Also:
    • deleteGroup$UPDATES

      static final boolean deleteGroup$UPDATES
      See Also:
    • getGroupName$UPDATES

      static final boolean getGroupName$UPDATES
      See Also:
    • getGroupNames$UPDATES

      static final boolean getGroupNames$UPDATES
      See Also:
    • getGroupNamesList$UPDATES

      static final boolean getGroupNamesList$UPDATES
      See Also:
    • getGroupAttribute$UPDATES

      static final boolean getGroupAttribute$UPDATES
      See Also:
    • getGroup$UPDATES

      static final boolean getGroup$UPDATES
      See Also:
    • getGroups$UPDATES

      static final boolean getGroups$UPDATES
      See Also:
    • getCredentials$UPDATES

      static final boolean getCredentials$UPDATES
      See Also:
    • getCachedCredentials$UPDATES

      static final boolean getCachedCredentials$UPDATES
      See Also:
    • getGroupsOfType$UPDATES

      static final boolean getGroupsOfType$UPDATES
      See Also:
    • getGroupsOfTypePaging$UPDATES

      static final boolean getGroupsOfTypePaging$UPDATES
      See Also:
    • getGroupTypeForGroup$UPDATES

      static final boolean getGroupTypeForGroup$UPDATES
      See Also:
    • getGroupIdsForUserByRole$UPDATES

      static final boolean getGroupIdsForUserByRole$UPDATES
      See Also:
    • getGroupsForUserByRole$UPDATES

      static final boolean getGroupsForUserByRole$UPDATES
      See Also:
    • getGroupsForUserByRolePaging$UPDATES

      static final boolean getGroupsForUserByRolePaging$UPDATES
      See Also:
    • getGroupsOfTypeForMemberUser$UPDATES

      static final boolean getGroupsOfTypeForMemberUser$UPDATES
      See Also:
    • getMemberGroups$UPDATES

      static final boolean getMemberGroups$UPDATES
      See Also:
    • getMemberGroupsPaging$UPDATES

      static final boolean getMemberGroupsPaging$UPDATES
      See Also:
    • getMemberUsers$UPDATES

      static final boolean getMemberUsers$UPDATES
      See Also:
    • getMemberUsersPaging$UPDATES

      static final boolean getMemberUsersPaging$UPDATES
      See Also:
    • getMemberUserCount$UPDATES

      static final boolean getMemberUserCount$UPDATES
      See Also:
    • getMemberGroupCount$UPDATES

      static final boolean getMemberGroupCount$UPDATES
      See Also:
    • addMemberGroup$UPDATES

      static final boolean addMemberGroup$UPDATES
      See Also:
    • addMemberGroups$UPDATES

      static final boolean addMemberGroups$UPDATES
      See Also:
    • addMemberUser$UPDATES

      static final boolean addMemberUser$UPDATES
      See Also:
    • addMemberUsers$UPDATES

      static final boolean addMemberUsers$UPDATES
      See Also:
    • addMyselfToGroup$UPDATES

      static final boolean addMyselfToGroup$UPDATES
      See Also:
    • removeMemberGroup$UPDATES

      static final boolean removeMemberGroup$UPDATES
      See Also:
    • removeMemberGroups$UPDATES

      static final boolean removeMemberGroups$UPDATES
      See Also:
    • removeMemberUser$UPDATES

      static final boolean removeMemberUser$UPDATES
      See Also:
    • removeMemberUsers$UPDATES

      static final boolean removeMemberUsers$UPDATES
      See Also:
    • removeMyselfFromGroup$UPDATES

      static final boolean removeMyselfFromGroup$UPDATES
      See Also:
    • findGroups$UPDATES

      static final boolean findGroups$UPDATES
      See Also:
    • isGroupDescendant$UPDATES

      static final boolean isGroupDescendant$UPDATES
      See Also:
    • isUserMember$UPDATES

      static final boolean isUserMember$UPDATES
      See Also:
    • getRootTrees$UPDATES

      static final boolean getRootTrees$UPDATES
      See Also:
    • getRootTreesSameTypeWithRoles$UPDATES

      static final boolean getRootTreesSameTypeWithRoles$UPDATES
      See Also:
    • getTopLevelGroupsPaging$UPDATES

      static final boolean getTopLevelGroupsPaging$UPDATES
      See Also:
    • getTreeViewForGroup$UPDATES

      static final boolean getTreeViewForGroup$UPDATES
      See Also:
    • getTreeViewForGroupSameTypeWithRoles$UPDATES

      static final boolean getTreeViewForGroupSameTypeWithRoles$UPDATES
      See Also:
    • doesGroupExist$UPDATES

      static final boolean doesGroupExist$UPDATES
      See Also:
    • addGroupsToMyGroups$UPDATES

      static final boolean addGroupsToMyGroups$UPDATES
      See Also:
    • removeGroupsFromMyGroups$UPDATES

      static final boolean removeGroupsFromMyGroups$UPDATES
      See Also:
    • getMyGroupIds$UPDATES

      static final boolean getMyGroupIds$UPDATES
      See Also:
    • getMyGroups$UPDATES

      static final boolean getMyGroups$UPDATES
      See Also:
    • getGroupSecurityTypes$UPDATES

      static final boolean getGroupSecurityTypes$UPDATES
      See Also:
    • getGroupMembershipPolicyTypes$UPDATES

      static final boolean getGroupMembershipPolicyTypes$UPDATES
      See Also:
    • getGroupMemberViewingPolicyTypes$UPDATES

      static final boolean getGroupMemberViewingPolicyTypes$UPDATES
      See Also:
    • getAllAttributeTypes$UPDATES

      static final boolean getAllAttributeTypes$UPDATES
      See Also:
    • findNonMemberAncestorGroups$UPDATES

      static final boolean findNonMemberAncestorGroups$UPDATES
      See Also:
    • findAvailableParentGroups$UPDATES

      static final boolean findAvailableParentGroups$UPDATES
      See Also:
    • findAdminGroups$UPDATES

      static final boolean findAdminGroups$UPDATES
      See Also:
    • getRuleSetForGroup$UPDATES

      static final boolean getRuleSetForGroup$UPDATES
      See Also:
    • updateRuleSetForGroup$UPDATES

      static final boolean updateRuleSetForGroup$UPDATES
      See Also:
    • getGroupSummaryForUser$UPDATES

      static final boolean getGroupSummaryForUser$UPDATES
      See Also:
    • getGroupSummaryForUserPaging$UPDATES

      static final boolean getGroupSummaryForUserPaging$UPDATES
      See Also:
    • isGroupSystemGroup$UPDATES

      static final boolean isGroupSystemGroup$UPDATES
      See Also:
    • getGroupsForUserByRoles$UPDATES

      static final boolean getGroupsForUserByRoles$UPDATES
      See Also:
    • getGroupsForUserByRolesPaging$UPDATES

      static final boolean getGroupsForUserByRolesPaging$UPDATES
      See Also:
    • getGroupActions$UPDATES

      static final boolean getGroupActions$UPDATES
      See Also:
    • canUseGroupName$UPDATES

      static final boolean canUseGroupName$UPDATES
      See Also:
    • getParentGroupsForDelegatedCreation$UPDATES

      static final boolean getParentGroupsForDelegatedCreation$UPDATES
      See Also:
    • getParentGroupsForDelegatedUpdate$UPDATES

      static final boolean getParentGroupsForDelegatedUpdate$UPDATES
      See Also:
    • getParentGroupsForDelegatedCreationPaging$UPDATES

      static final boolean getParentGroupsForDelegatedCreationPaging$UPDATES
      See Also:
    • findGroupsPaging$UPDATES

      static final boolean findGroupsPaging$UPDATES
      See Also:
    • findNonMemberAncestorGroupsPaging$UPDATES

      static final boolean findNonMemberAncestorGroupsPaging$UPDATES
      See Also:
    • findAvailableParentGroupsPaging$UPDATES

      static final boolean findAvailableParentGroupsPaging$UPDATES
      See Also:
    • findAdminGroupsPaging$UPDATES

      static final boolean findAdminGroupsPaging$UPDATES
      See Also:
    • getApplicationName$UPDATES

      static final boolean getApplicationName$UPDATES
      See Also:
    • getWorkspace$UPDATES

      static final boolean getWorkspace$UPDATES
      See Also:
    • getMemberUsernames$UPDATES

      static final boolean getMemberUsernames$UPDATES
      See Also:
    • getGroupIdsForUserByRoles$UPDATES

      static final boolean getGroupIdsForUserByRoles$UPDATES
      See Also:
    • getGroupsList$UPDATES

      static final boolean getGroupsList$UPDATES
      See Also:
    • getMemberGroupsDirect$UPDATES

      static final boolean getMemberGroupsDirect$UPDATES
      See Also:
    • getMemberGroupsDirectPaging$UPDATES

      static final boolean getMemberGroupsDirectPaging$UPDATES
      See Also:
    • getMemberUsersDirect$UPDATES

      static final boolean getMemberUsersDirect$UPDATES
      See Also:
    • getMemberUsersDirectPaging$UPDATES

      static final boolean getMemberUsersDirectPaging$UPDATES
      See Also:
    • getAdminUsersDirectPaging$UPDATES

      static final boolean getAdminUsersDirectPaging$UPDATES
      See Also:
    • getMemberUsernamesDirect$UPDATES

      static final boolean getMemberUsernamesDirect$UPDATES
      See Also:
    • getTopLevelGroupsForHierarchy$UPDATES

      static final boolean getTopLevelGroupsForHierarchy$UPDATES
      See Also:
    • getTopLevelGroupsForHierarchyPaging$UPDATES

      static final boolean getTopLevelGroupsForHierarchyPaging$UPDATES
      See Also:
    • areUsersAddedByRule$UPDATES

      static final boolean areUsersAddedByRule$UPDATES
      See Also:
    • areGroupsAddedByRule$UPDATES

      static final boolean areGroupsAddedByRule$UPDATES
      See Also:
    • suggestGroups$UPDATES

      static final boolean suggestGroups$UPDATES
      See Also:
    • suggestUsersAndGroups$UPDATES

      static final boolean suggestUsersAndGroups$UPDATES
      See Also:
    • suggestGroupsBulk$UPDATES

      static final boolean suggestGroupsBulk$UPDATES
      See Also:
    • suggestUsersAndGroupsBulk$UPDATES

      static final boolean suggestUsersAndGroupsBulk$UPDATES
      See Also:
    • getUserDefaultApplication$UPDATES

      static final boolean getUserDefaultApplication$UPDATES
      See Also:
    • getSystemDefaultApplication$UPDATES

      static final boolean getSystemDefaultApplication$UPDATES
      See Also:
    • getMyHomePage$UPDATES

      static final boolean getMyHomePage$UPDATES
      See Also:
    • setGlobalHomePage$UPDATES

      static final boolean setGlobalHomePage$UPDATES
      See Also:
    • setHomePageForUser$UPDATES

      static final boolean setHomePageForUser$UPDATES
      See Also:
    • setMyHomePage$UPDATES

      static final boolean setMyHomePage$UPDATES
      See Also:
    • getGlobalHomePage$UPDATES

      static final boolean getGlobalHomePage$UPDATES
      See Also:
    • addGroupToFavorites$UPDATES

      static final boolean addGroupToFavorites$UPDATES
      See Also:
    • removeGroupFromFavorites$UPDATES

      static final boolean removeGroupFromFavorites$UPDATES
      See Also:
    • getFavoriteGroups$UPDATES

      static final boolean getFavoriteGroups$UPDATES
      See Also:
    • addAdminUsers$UPDATES

      static final boolean addAdminUsers$UPDATES
      See Also:
    • removeAdminUsers$UPDATES

      static final boolean removeAdminUsers$UPDATES
      See Also:
    • addAdminGroups$UPDATES

      static final boolean addAdminGroups$UPDATES
      See Also:
    • removeAdminGroups$UPDATES

      static final boolean removeAdminGroups$UPDATES
      See Also:
    • getAdminGroupsPaging$UPDATES

      static final boolean getAdminGroupsPaging$UPDATES
      See Also:
    • getAdminUsersPaging$UPDATES

      static final boolean getAdminUsersPaging$UPDATES
      See Also:
    • getAdminUserCount$UPDATES

      static final boolean getAdminUserCount$UPDATES
      See Also:
    • getAdminGroupCount$UPDATES

      static final boolean getAdminGroupCount$UPDATES
      See Also:
    • isMemberOfGroups$UPDATES

      static final boolean isMemberOfGroups$UPDATES
      See Also:
    • isUserMemberOfGroups$UPDATES

      static final boolean isUserMemberOfGroups$UPDATES
      See Also:
    • areUsersMembersOfGroups$UPDATES

      static final boolean areUsersMembersOfGroups$UPDATES
      See Also:
    • getDirectMemberGroupIds$UPDATES

      static final boolean getDirectMemberGroupIds$UPDATES
      See Also:
    • getDirectMemberUsernames$UPDATES

      static final boolean getDirectMemberUsernames$UPDATES
      See Also:
    • getDirectAdminGroupIds$UPDATES

      static final boolean getDirectAdminGroupIds$UPDATES
      See Also:
    • getDirectAdminUsernames$UPDATES

      static final boolean getDirectAdminUsernames$UPDATES
      See Also:
    • suggest$UPDATES

      static final boolean suggest$UPDATES
      See Also:
    • resolveEmailAddress$UPDATES

      static final boolean resolveEmailAddress$UPDATES
      See Also:
    • resolveEmailAddresses$UPDATES

      static final boolean resolveEmailAddresses$UPDATES
      See Also:
    • resolveEmailDestinations$UPDATES

      static final boolean resolveEmailDestinations$UPDATES
      See Also:
    • changeGroupTypeOfGroup$UPDATES

      static final boolean changeGroupTypeOfGroup$UPDATES
      See Also:
    • changeGroupTypesOfGroups$UPDATES

      static final boolean changeGroupTypesOfGroups$UPDATES
      See Also:
    • validateTypedValues$UPDATES

      static final boolean validateTypedValues$UPDATES
      See Also:
  • Method Details

    • createGroup

      Create a new group. groupName must be unique for public and team groups. If the Group is of a group type with attributes, you must pass the correct Attribute list with the correct name and type for each Attribute with the Group. Should be used in conjunction with GroupTypeService.getGroupTypeAttributes(Long groupTypeId) in order to properly fill the setAttributes(Attribute[]) field of the Group passed in. If the Attribute[] does not match the group type's attributes, then an InvalidAttributeException will be thrown.

      Note that when a Group specifies a parent, it automatically becomes a member Group of its parent.

      The Group fields required for creation are: groupName, groupTypeId, creatorName, securityMapId. If groupTypeId points to a GroupType with attributes, then all the attributes fields are required.

      In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the groupName in the Group object be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Note: Personal Groups must have CLOSED membership policy and HIGH member viewing policy and Team Groups cannot have an AUTOMATIC membership policy; otherwise InvalidMemberPolicyException or InvalidViewingPolicyException will be thrown

      Parameters:
      group_ - the Group to create
      Returns:
      the id of the Group created
      Throws:
      DuplicateNameException - Thrown when the group is a public or team group and its name is not unique.
      UnsupportedAttributeTypeException - Thrown when trying to create or update an attribute type that is not supported by the GroupService.
      InvalidAttributeException - Thrown when trying to get, update, or delete an attribute for a GroupType that does not exist.
      InvalidGroupTypeException - This exception may be thrown by service methods detecting that a given GroupType does not exist.
      InvalidParentException - Thrown when user passes in invalid Group as parent.
      InvalidNameException - thrown when the groupname is null or empty.
      InvalidCreatorException - Thrown when a invalid user is passed as creator of Group.
      InvalidSecurityMapException - thrown if the securitymapId field passed in Group object is invalid.
      InvalidMemberPolicyException - Thrown when membership policy is invalid or not applicable to the Group.
      InvalidViewingPolicyException - Thrown when viewing policy is invalid or not applicable to the Group.
      InvalidAttributeValueException - Thrown when incorrect attributes values are passed.
      PrivilegeException - Thrown when the user does not have privileges to create a Group.
      DuplicateUuidException - Thrown when the UUID passed in already exists in the system.
    • createGroups

      Create new groups. groupName must be unique for public and team groups. It does not support creating groups with group types having attributes. If groups with group type having attributes are passed, it simply returns null ids in the corresponding entries for those groups in the return list, as no groups are created for these cases.

      Note that when a Group specifies a parent, it automatically becomes a member Group of its parent.

      The Group fields required for creation are: groupName, groupTypeId, creatorName, securityMapId.

      In order to minimize possible breaks with the user interface, it is HIGHLY recommended that groupName in the Group object be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Note: Personal Groups must have CLOSED membership policy and HIGH member viewing policy and Team Groups cannot have AUTOMATIC membership policy; otherwise InvalidMemberPolicyException or InvalidViewingPolicyException will be thrown

      Parameters:
      groups_ - the groups to create
      Returns:
      the ids of the groups created; null entries for the corresponding groups with group type having attributes.
      Throws:
      UnsupportedAttributeTypeException - Thrown when trying to create or update an attribute type that is not supported by the Personalization service.
      InvalidGroupTypeException - This exception may be thrown by service methods detecting that a given GroupType does not exist.
      InvalidParentException - Thrown when user passes in invalid Group as parent.
      InvalidNameException - thrown when the groupname is null or empty.
      InvalidCreatorException - Thrown when a invalid user is passed as creator of Group.
      InvalidSecurityMapException - thrown if the securitymapId field passed in Group object is invalid.
      InvalidMemberPolicyException - Thrown when membership policy is invalid or not applicable to the Group.
      InvalidViewingPolicyException - Thrown when viewing policy is invalid or not applicable to the Group.
      PrivilegeException - Thrown when the user does not have privileges to create one or more of the Groups.
      InvalidAttributeException - Never thrown. Is only declared for backwards compatibility.
      InvalidAttributeValueException - Never thrown. Is only declared for backwards compatibility.
      DuplicateUuidException - Thrown when the UUID of any of the groups already exists or if the same UUID is passed in for several groups
    • updateGroup

      Updates a Group. groupName must be unique for public and team groups. If the group is of a group type with attributes, you must pass the correct Attribute list with the correct name and type for each Attribute with the Group. Should be used in conjunction with GroupTypeService.getGroupTypeAttributes(Long groupTypeId) in order to properly fill the setAttributes(Attribute[]) field of the Group passed in. If the Attribute[] does not match the Group Type's attributes, then an InvalidAttributeException will be thrown.

      The following fields are set when a Group is created and cannot be changed using this method: id and groupTypeId.

      Only the following fields can be changed: groupName, description, parentId, securityMapId, attributes, memberPolicyId, viewingPolicyId, delegatedCreation.
      If the group does not have a parent then parentId should be set to -1.
      Note that when a group specifies a parent, it automatically becomes a member group of its parent.

      In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the groupName be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Parameters:
      group_ - the group to update. Group id must be populated as well as groupName, groupTypeId, creatorName, securityMapId, viewingPolicyId, memberPolicyId, and parentId. If groupTypeId points to a GroupType with attributes, then all the attributes fields are required.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id or group name is passed into a service method.
      DuplicateNameException - This exception may be thrown by service methods detecting that a given name is not unique.
      RecursiveRelationshipException - Thrown when a relationship is trying to be created that will result in a recursive loop (for instance, if the group is being updated to be a child of itself).
      InvalidParentException - Thrown when user passes in invalid group as parent.
      UnsupportedAttributeTypeException - Thrown when trying to create or update an attribute type that is not supported by the Personalization service.
      InvalidAttributeException - Thrown when trying to get, update, or delete an attribute for a group type that does not exist.
      InvalidGroupTypeException - This exception may be thrown by service methods detecting that a given group type does not exist.
      InvalidSecurityMapException - thrown if the securitymap Id field passed in Group object is invalid.
      InvalidMemberPolicyException - Thrown when membership policy is invalid or not applicable to the group.
      InvalidViewingPolicyException - Thrown when viewing policy is invalid or not applicable to the group.
      InvalidAttributeValueException - Thrown when incorrect attributes values are passed.
      PrivilegeException - Thrown when the user does not have privileges to update the group.
    • updateGroups

      Updates multiple Group objects. groupName must be unique for public and team groups. If the group is of a group type with attributes, you must pass the correct Attribute list with the correct name and type for each Attribute with the group. Should be used in conjunction with GroupTypeService.getGroupTypeAttributes(Long groupTypeId) in order to properly fill the setAttributes(Attribute[]) field of the Group passed in. If the Attribute[] does not match the Group Type's attributes, then an InvalidAttributeException will be thrown.

      The following fields are set when a Group is created and cannot be changed using this method: id and groupTypeId.

      Only the following fields can be changed: groupName, description, parentId, securityMapId, attributes, memberPolicyId, viewingPolicyId, delegatedCreation.
      If the group does not have a parent then parentId should be set to -1.
      Note that when a group specifies a parent, it automatically becomes a member group of its parent.

      In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the groupName be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Parameters:
      groups_ - the groups to update. Group id must be populated as well as groupName, groupTypeId, creatorName, securityMapId, viewingPolicyId, memberPolicyId, and parentId. If groupTypeId points to a GroupType with attributes, then all the attributes fields are required.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id or group name is passed into a service method.
      RecursiveRelationshipException - Thrown when a relationship is trying to be created that will result in a recursive loop (for instance, if the group is being updated to be a child of itself).
      InvalidParentException - Thrown when user passes in invalid group as parent.
      UnsupportedAttributeTypeException - Thrown when trying to create or update an attribute type that is not supported by the Personalization service.
      InvalidAttributeException - Thrown when trying to get, update, or delete an attribute for a group type that does not exist.
      InvalidGroupTypeException - This exception may be thrown by service methods detecting that a given group type does not exist.
      InvalidSecurityMapException - thrown if the securitymap Id field passed in Group object is invalid.
      InvalidMemberPolicyException - Thrown when membership policy is invalid or not applicable to the group.
      InvalidViewingPolicyException - Thrown when viewing policy is invalid or not applicable to the group.
      InvalidAttributeValueException - Thrown when incorrect attributes values are passed.
      PrivilegeException - Thrown when the user does not have privileges to update one or more of the groups.
    • deleteGroup

      Deletes a single group. NOTE: To register in the other (non-personalization) portal applications that a group has been deleted, this call must be followed by a call to AdministrationService.notifyGroupDeletion(java.lang.Long)
      Parameters:
      groupId_ - the id of the group to delete
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      SystemGroupException - Thrown when trying to delete a group that is core to the Personalization service such as Portal Administrators or Collaboration Administrators.
      GroupIsAttributeException - Thrown when trying to delete a group that is being used as an attribute for another group.
    • getGroupName

      String getGroupName(Long groupId_) throws InvalidGroupException
      Gets a group name for a given group id.
      Parameters:
      groupId_ - the id of the group
      Returns:
      the name of the group
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • getGroupNames

      String[] getGroupNames(Long[] groupIds_) throws InvalidGroupException
      Gets a list of group names for a given list of group ids.
      Parameters:
      groupIds_ - the ids of groups
      Returns:
      the matching list of group names
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • getGroupNamesList

      ResultList getGroupNamesList(Long[] groupIds_)
      Gets a list of group names for a given list of group ids.
      Parameters:
      groupIds_ - the ids of groups
      Returns:
      ResultList containing group names and result codes. Each result code will be either CODE_VALID (for valid group ids) or CODE_INVALID (for invalid group ids) from ResultList. The results will only contain the names of the valid groups and thus may have a length less than the number of group ids passed in.
    • getGroupAttribute

      Attribute getGroupAttribute(Long groupId_, String attributeName_) throws InvalidGroupException
      Gets a group attribute for a given group id.
      Parameters:
      groupId_ - the id of the group
      attributeName_ - the name of the desired attribute
      Returns:
      the requested Attribute, or null if the attribute does not exists
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      NullPointerException - if the passed group id and/or the attribute name are null.
    • getGroup

      Group getGroup(Long groupId_) throws InvalidGroupException, PrivilegeException
      Get a group by id.
      Parameters:
      groupId_ - the group id
      Returns:
      the requested group
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the current User does not have rights to view the group
    • getGroups

      Group[] getGroups(Long[] groupIds_) throws InvalidGroupException, PrivilegeException
      Gets a list of groups for a given list of group ids.
      Parameters:
      groupIds_ - the group ids
      Returns:
      the list of groups
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the current user does not have rights to view the one or more of groups.
    • getCredentials

      Credentials getCredentials() throws InvalidUserException
      Returns a Credentials bean directly from the back-end, containing the group membership relations for the user in this Service Context. This is a System-level call not meant to be used externally.
      Returns:
      Credentials bean with the user's membership data.
      Throws:
      InvalidUserException - if the credentials for that user cannot be retrieved.
    • getCachedCredentials

      Credentials getCachedCredentials() throws InvalidUserException
      Returns the cached Credentials bean containing the group membership relations for the user in this Service Context. If the user does not have an entry in the cache, then the Credentials are retrieved from the back-end. Also note that changes made directly on this bean won't be persisted in the system. The Credentials bean is for practical purposed read only. This is a System-level call not meant to be used externally.
      Returns:
      Credentials bean with the user's membership data.
      Throws:
      InvalidUserException - if the credentials for that user cannot be retrieved.
    • getGroupsOfType

      @Deprecated Group[] getGroupsOfType(Long groupTypeId_) throws InvalidGroupTypeException
      Gets a list of groups for a given group type.
      Parameters:
      groupTypeId_ - the group type id
      Returns:
      the groups
      Throws:
      ServiceException - if any system-level error occurs
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getGroupsOfTypePaging

      ResultPage getGroupsOfTypePaging(Long groupTypeId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupTypeException
      Gets a ResultPage containing a list of groups for a given group type
      Parameters:
      groupTypeId_ - the group type id
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of Group objects
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getGroupTypeForGroup

      Long[] getGroupTypeForGroup(Long[] groupIds_) throws InvalidGroupException
      Gets group types for a list of groups.
      Parameters:
      groupIds_ - the group ids
      Returns:
      group type ids. should have always have a type, even if just default.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group ids are passed into a service method.
    • getGroupIdsForUserByRole

      Long[] getGroupIdsForUserByRole(String username_, Integer role_) throws InvalidUserException, UnsupportedRoleException, PrivilegeException
      Gets a list of group ids for which a given user has a given role. Supported roles are:
      Parameters:
      username_ - the unique key for the user
      role_ - the role id
      Returns:
      the list of group ids
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      UnsupportedRoleException - This exception is thrown whenever an invalid role id is passed into a service method.
      PrivilegeException
    • getGroupsForUserByRole

      Group[] getGroupsForUserByRole(String username_, Integer role_) throws InvalidUserException, UnsupportedRoleException, PrivilegeException
      Gets a list of groups for which a given user has a given role. Supported roles are:
      Parameters:
      username_ - the user
      role_ - the role id
      Returns:
      the list of groups
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      UnsupportedRoleException - This exception is thrown whenever an invalid role id is passed into a service method.
      PrivilegeException
    • getGroupsForUserByRolePaging

      ResultPage getGroupsForUserByRolePaging(String username_, Integer role_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidUserException, UnsupportedRoleException, PrivilegeException
      Gets a ResultPage containing list of groups for which a given user has a given role. Supported roles are:
      Parameters:
      username_ - the user
      role_ - the role
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list group objects
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      UnsupportedRoleException - thrown when an invalid role id is passed.
      PrivilegeException
    • getGroupsOfTypeForMemberUser

      @Deprecated Group[] getGroupsOfTypeForMemberUser(Long[] groupTypeIds_, String username_) throws InvalidGroupTypeException, InvalidUserException
      Deprecated.
      Use getGroupsForUserByRolePaging(String, Integer, int, int, Integer, Integer) and extract groups of the desired types from the results.
      Gets a list of groups, for a given list of group types, of which a given user is a memeber
      Parameters:
      groupTypeIds_ - the group type ids
      username_ - the username of the user to get groups for
      Returns:
      the list of groups
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
    • getMemberGroups

      Group[] getMemberGroups(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets a list of members groups of a group
      Parameters:
      groupId_ - the group for which to get members
      Returns:
      the member groups. Note: If the user can see the group but cannot view members of group, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user is not the administrator of the group and the group is not public.
    • getMemberGroupsPaging

      ResultPage getMemberGroupsPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Gets a ResultPage containing a list of group members of a group
      Parameters:
      groupId_ - the group for which to get group members
      startIndex_ - the index of the first Group that will be returned
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the Group objects will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing Group objects, representing the member groups. Note: If the user can see the group but cannot view members of group, the results array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user is not the administrator of the group and the group is not public.
    • getMemberUsers

      User[] getMemberUsers(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets a list of member users of the specified group
      Parameters:
      groupId_ - the group to get members from.
      Returns:
      the member users. Note: If the current user can see the group but cannot view members of group, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user is not the administrator of the group and the group is not public.
    • getMemberUsersPaging

      ResultPage getMemberUsersPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Gets a ResultPage containing a list of member users of the specified group
      Parameters:
      groupId_ - the group for which to get members
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in User
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of User objects. Note: If the current user can see the group but cannot view members of group, the results array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user is not the administrator of the group and the group is not public.
    • getMemberUsers

      User[] getMemberUsers(Long[] groupIds_) throws InvalidGroupException, PrivilegeException
      Gets a list of distinct users that are members of any of the specified groups.
      Parameters:
      groupIds_ - the groups to get members from.
      Returns:
      the member users. Note: If the current user can see a group but cannot view members of the group, the returned list will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method. *
      PrivilegeException - if the user is not the administrator of one of the groups and the group is not public.
    • getMemberUserCount

      int getMemberUserCount(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets a count of distinct users that are members of the specified group.
      Parameters:
      groupId_ - the group whose user members are to be counted
      Returns:
      the count of member users. Note: If the user can see the group but cannot view members of group, the returned member count will be 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user does not have sufficient privileges
    • getMemberGroupCount

      int getMemberGroupCount(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets the number of distinct groups {that are members of the specified group.
      Parameters:
      groupId_ - the group to count group members of.
      Returns:
      the count. Note: If the current user can see the group but cannot view members of group, the returned member count will be 0.
      Throws:
      ServiceException - if any system-level error occurs
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user does not have sufficient privileges
    • addMemberGroup

      void addMemberGroup(Long memgroupId_, Long groupId_) throws InvalidGroupException, RecursiveRelationshipException, PrivilegeException
      Adds a member group to a group.
      Parameters:
      memgroupId_ - id of the group to add
      groupId_ - the group to add the member to
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      RecursiveRelationshipException - Thrown when a relationship is trying to be created that will result in a recursive loop (eg if the member group ID and the group ID refer to the same group).
      PrivilegeException - Thrown when the user does not have privileges to add the group as a member
    • addMemberGroups

      void addMemberGroups(Long[] memgroupIds_, Long groupId_) throws InvalidGroupException, RecursiveRelationshipException, PrivilegeException
      Adds member groups to a group
      Parameters:
      memgroupIds_ - ids of the groups to add
      groupId_ - the group to add members to
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      RecursiveRelationshipException - Thrown when a relationship is trying to be created that will result in a recursive loop (eg if a member group ID and the group ID refer to the same group)..
      PrivilegeException - Thrown when the user does not have privileges to add one or more of the groups as members
    • addMemberUser

      void addMemberUser(String username_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Adds a member user to a group .
      Parameters:
      username_ - username of the user to add to the group
      groupId_ - the group to add the member to
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to add the user as a member
    • addMemberUsers

      void addMemberUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Adds member users to a group
      Parameters:
      usernames_ - the usernames of the users to add
      groupId_ - the group to add members to
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to add one or more the users as members
    • addMyselfToGroup

      void addMyselfToGroup(Long groupId_) throws InvalidGroupException, PrivilegeException
      Adds oneself to the given group
      Parameters:
      groupId_ - the id of the group which the current user wishes to join
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to add himself or herself as a member of the group
    • removeMemberGroup

      void removeMemberGroup(Long memgroupId_, Long groupId_) throws InvalidGroupException, PrivilegeException
      Removes a member group from a group
      Parameters:
      memgroupId_ - id of the member to remove
      groupId_ - id of the group to remove member from
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to remove the group's membership
    • removeMemberGroups

      void removeMemberGroups(Long[] memgroupIds_, Long groupId_) throws InvalidGroupException, PrivilegeException
      Removes a list of member groups from a group
      Parameters:
      memgroupIds_ - the ids of members to remove
      groupId_ - id of the group to remove member from
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to remove any of the group's memberships
    • removeMemberUser

      @Deprecated void removeMemberUser(String username_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Deprecated.
      Use removeMemberUsers(String[], Long) and pass a single user in the array.
      Removes a member user from a group
      Parameters:
      username_ - the username of the member to remove
      groupId_ - the id of the group to remove the member from
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to remove the user's membership
    • removeMemberUsers

      void removeMemberUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Removes a list of member users from a group
      Parameters:
      usernames_ - the usernames of the members to remove
      groupId_ - the id of the group to remove members from
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - Thrown when the user does not have privileges to remove any of the users' membership
    • removeMyselfFromGroup

      void removeMyselfFromGroup(Long groupId_) throws InvalidGroupException
      Removes oneself from the given group
      Parameters:
      groupId_ - the id of the group from which one wants to remove oneself
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • findGroups

      @Deprecated Group[] findGroups(GroupSearch groupSearch_, boolean caseSensitive_) throws UnsupportedOperatorException
      Finds groups based on criteria submitted in the GroupSearch The supported search operators are specified in GroupSearch for a group See getOperatorsForAttributeType() in GroupTypeService to obtain a list of possible operators Operator for a given data type. The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search bean
      caseSensitive_ - false for case insensitive, true for case sensitive.
      Returns:
      a list of groups that matched the search criteria
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • isGroupDescendant

      boolean isGroupDescendant(Long groupId_, Long parentGroupId_) throws InvalidGroupException
      Checks if a group is a descendant of another group (by parent-child relationship).
      Parameters:
      groupId_ - the id of the group
      parentGroupId_ - id of the group for which to check the descendants
      Returns:
      true if given group was descendant of passed in parent group, else false.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • isUserMember

      boolean isUserMember(String username_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Checks if a user is a member of a group
      Parameters:
      username_ - the username
      groupId_ - the group id to check
      Returns:
      true if passed in user is member of given group, else false
      Throws:
      InvalidUserException - This exception is thrown whenever a non-empty invalid username is passed into the service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into the service method.
      NullPointerException - If the passed username is either null or empty.
      PrivilegeException
    • isUserMember

      boolean isUserMember(String[] username_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Checks multiple potential usernames to determine if a user is a member of a group
      Parameters:
      username_ - the usernames
      groupId_ - the group id to check
      Returns:
      true if passed in user is member of given group, else false
      Throws:
      InvalidUserException - This exception is thrown whenever all non-empty/non-null usernames passed into the service method are invalid.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into the service method.
      NullPointerException - If all passed usernames are either null or empty.
      PrivilegeException
    • isUserMember

      boolean isUserMember(String username_, String groupUuid_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Checks if a user is a member of a group
      Parameters:
      username_ - the username
      groupUuid_ - the group UUID to check
      Returns:
      true if passed in user is member of given group, else false
      Throws:
      InvalidUserException - This exception is thrown whenever all non-empty/non-null usernames passed into the service method are invalid.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into the service method.
      NullPointerException - If all passed usernames are either null or empty.
      PrivilegeException
    • isUserMember

      boolean isUserMember(String[] username_, String groupUuid_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Checks multiple potential usernames to determine if a user is a member of a group
      Parameters:
      username_ - the usernames
      groupUuid_ - the group UUID to check
      Returns:
      true if passed in user is member of given group, else false
      Throws:
      InvalidUserException - This exception is thrown whenever all non-empty/non-null usernames passed into the service method are invalid.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into the service method.
      NullPointerException - If all passed usernames are either null or empty.
      PrivilegeException
    • getRootTrees

      Tree[] getRootTrees(Long groupTypeId_, String relationshipType_, boolean singleGroupType_, int descendentDepth_) throws InvalidGroupTypeException
      Get a set of groups structured into one or more trees. Each node in the tree will represent a group. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupTypeId_ - The group type of the root node groups.
      relationshipType_ - The relationship connecting the groups. Currently, the only permissible value is RELATIONSHIP_TYPE_HEIRARCHY.
      singleGroupType_ - true if only groups of the same group type as the root should be returned; false if all groups, regardless of group type, should be returned.
      descendentDepth_ - The number of levels below the root that should be returned.
      Returns:
      The tree representing the root level groups
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getRootTreesSameTypeWithRoles

      Tree[] getRootTreesSameTypeWithRoles(Long groupTypeId_, Integer[] roleTypes_, int descendantDepth_) throws InvalidGroupTypeException
      Get a set of groups Group structured into one or more trees Tree. Only those groups are returned for which the user's privilege matches the specified roles
      Parameters:
      groupTypeId_ - The group type GroupType of the root node groups.
      roleTypes_ - array of roles which should match user's privilege
      descendantDepth_ - The number of levels below the root that should be returned.
      Returns:
      The tree representing the root level groups
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getTopLevelGroupsPaging

      ResultPage getTopLevelGroupsPaging(Long groupTypeId_, String relationshipType_, boolean singleGroupType_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupTypeException
      Get a ResultPage containing a list of groups structured into one or more trees in the result field. Each node in the tree will represent a group. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupTypeId_ - The group type of the root node groups.
      relationshipType_ - The relationship connecting the groups. Currently, the only permissible value is RELATIONSHIP_TYPE_HEIRARCHY.
      singleGroupType_ - true if only groups of the same group type as the root should be returned; false if all groups, regardless of group type, should be returned.
      startIndex_ - the index of the first Group that will be returned
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the Group objects will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing batchSize_ Group objects.
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getRootTrees

      Tree[] getRootTrees(Long groupTypeId_, String relationshipType_, Long[] groupTypeIds_, int descendentDepth_) throws InvalidGroupTypeException
      Get a set of groups structured into one or more trees. * Each node in the tree will represent a group. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupTypeId_ - The group type of the root node groups.
      relationshipType_ - The relationship connecting the groups. Currently, the only permissible value is RELATIONSHIP_TYPE_HEIRARCHY.
      groupTypeIds_ - Only groups of these group types should be returned in the tree.
      descendentDepth_ - The number of levels below the root that should be returned.
      Returns:
      The Trees
      Throws:
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
    • getTreeViewForGroup

      TreePivot getTreeViewForGroup(Long groupId_, boolean singleGroupType_, String relationshipType_, int descendentDepth_) throws InvalidGroupException, PrivilegeException
      Get a view into the tree pivoted at a particular group. Breadcrumbs will be returned in the TreePivot Each node in the tree will represent a group. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupId_ - The id of the group to use as the root of the tree.
      singleGroupType_ - true if only groups of the same group type as the root should be returned; false if all groups, regardless of group type, should be returned.
      relationshipType_ - The relationship connecting the groups. Currently, the only permissible value is RELATIONSHIP_TYPE_HEIRARCHY
      descendentDepth_ - The number of levels below the root that should be returned.
      Returns:
      The view into the tree.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - This exception is thrown when the user is not a member of the received group
      See Also:
    • getTreeViewForGroup

      TreePivot getTreeViewForGroup(Long groupId_, Long[] groupTypeIds_, String relationshipType_, int descendentDepth_) throws InvalidGroupException, InvalidGroupTypeException, PrivilegeException
      Get a view into the tree pivoted at a particular group Each node in the tree will represent a group. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupId_ - The id of the group to use as the root of the tree.
      groupTypeIds_ - Only groups of these group types should be returned in the tree.
      relationshipType_ - The relationship connecting the groups. Currently, the only permissible value is RELATIONSHIP_TYPE_HEIRARCHY.
      descendentDepth_ - The number of levels below the root that should be returned.
      Returns:
      The view into the tree.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      InvalidGroupTypeException - This exception is thrown whenever an invalid group type id is passed into a service method.
      PrivilegeException - This exception is thrown when the user is not a member of the received group
      See Also:
    • getTreeViewForGroupSameTypeWithRoles

      TreePivot getTreeViewForGroupSameTypeWithRoles(Long groupId_, Integer[] roleTypes_, int descendantDepth_) throws InvalidGroupException
      Get a view into the tree pivoted at a particular group Each node in the tree will represent a group. Only those groups are returned for which the user's privilege matches the specified roles. The id, name of the node will be id and groupName of the group, and data field of the node will be the group itself.
      Parameters:
      groupId_ - The id of the group to use as the root of the tree.
      roleTypes_ - array of roles which should match user's privilege
      descendantDepth_ - The number of levels below the root that should be returned.
      Returns:
      The view into the tree.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • doesGroupExist

      boolean doesGroupExist(Long groupId_)
      Checks to see if a given group exists. Returns true if it exists, false if not.
      Parameters:
      groupId_ - id of the group to check for existence in system.
      Returns:
      true if given group exists, else false.
    • addGroupsToMyGroups

      void addGroupsToMyGroups(Long[] groupIds_) throws InvalidGroupException
      Adds a list of groups to My Groups for logged in user. My Groups is a list of groups that the user is tracking and not groups that the user belongs to or administrates
      Parameters:
      groupIds_ - groups to add to My Groups
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • removeGroupsFromMyGroups

      void removeGroupsFromMyGroups(Long[] groupIds_)
      Removes a list of groups from My Groups for logged-in user. My Groups is a bookmarked list of groups, and ARE NOT groups that the user is a member of or an administrator of.
      Parameters:
      groupIds_ - groups to remove from My Groups
      See Also:
    • getMyGroupIds

      Long[] getMyGroupIds()
      Gets Ids for logged-in user's My Groups. My Groups is a bookmarked list of groups, and ARE NOT groups that the user is a member of or an administrator of.
      Returns:
      group Ids in users's My Groups list
    • getMyGroups

      @Deprecated ResultPage getMyGroups(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Deprecated.
      use getFavoriteGroups
      Gets a ResultPage containing a list of groups for logged-in user's My Groups. My Groups is a bookmarked list of groups, and ARE NOT groups that the user is a member of or an administrator of.
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing the Group objects.
    • getGroupSecurityTypes

      GroupSecurityType[] getGroupSecurityTypes(Integer actionId_)
      Gets the list of group security types that are available for a particular action. For example, a basic user will only be able to create personal and team groups.
      Parameters:
      actionId_ - id of the action for which security types are needed. This is one of the ACTION_GROUP_XXX constants
      Returns:
      the list of group security types for a particular action
    • getGroupMembershipPolicyTypes

      GroupMemberPolicy[] getGroupMembershipPolicyTypes(Long groupSecurityTypeId_)
      Gets the list of group membership policy types for a particular group security type. Supported security types are:
      Parameters:
      groupSecurityTypeId_ - id of group security type.
      Returns:
      the list of group membership policy types for a particular group security type
    • getGroupMemberViewingPolicyTypes

      GroupMemberViewingPolicy[] getGroupMemberViewingPolicyTypes(Long groupSecurityTypeId_)
      Gets the list of group member viewing policies for a particular group security type. Supported security types are:
      Parameters:
      groupSecurityTypeId_ - id of group security type.
      Returns:
      the list of group member viewing policies for a particular group security type
    • getAllAttributeTypes

      AttributeType[] getAllAttributeTypes()
      Gets the list of group attribute types in the system
      Returns:
      the list of group attribute types
    • findNonMemberAncestorGroups

      @Deprecated Group[] findNonMemberAncestorGroups(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_) throws UnsupportedOperatorException
      Retrieves a result set that consists list of groups for a group search that are not ancestors (by parent-member relationship) of the given group. This is used to prevent circular member relationships. The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup". The supported search operators are specified in GroupSearch for a group
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      groupId_ - the group id
      Returns:
      the found groups
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • findAvailableParentGroups

      @Deprecated Group[] findAvailableParentGroups(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_) throws UnsupportedOperatorException
      Finds all groups available for setting as parent. These will be groups over which the current user has administrative privileges that are also not members of the given group or members of members of the given group. The supported search operators Operator are specified in GroupSearch GroupSearch The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      groupId_ - the group id
      Returns:
      the found groups
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • findAdminGroups

      @Deprecated Group[] findAdminGroups(GroupSearch groupSearch_, boolean caseSensitive_) throws UnsupportedOperatorException
      Finds groups of which the current user is administrator Supported operators are listed in GroupSearch The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      Returns:
      the list of groups meeting the search criteria
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • getRuleSetForGroup

      RuleSet getRuleSetForGroup(Long groupId_) throws InvalidGroupException
      Gets membership rule set for a Group
      Parameters:
      groupId_ - the group id of the group that all these rules belong to.
      Returns:
      RuleSet for the given roup.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • updateRuleSetForGroup

      void updateRuleSetForGroup(RuleSet ruleSet_) throws InvalidGroupException
      Updates the membership rule set for a Group. Note that there is only one RuleSet for each Group, but each RuleSet may contain multiple rules. This method will replace the current RuleSet with the one passed in.
      Parameters:
      ruleSet_ - adds the given RuleSet to the group.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • getGroupSummaryForUser

      @Deprecated GroupSummary[] getGroupSummaryForUser(String username_) throws InvalidUserException, PrivilegeException
      Gets summaries for the groups of which the given user is a member or administrator. Note: the security on personal groups will further filter out groups of which the user is a member but not an administrator as only administrators of personal groups have permissions to see those groups.
      Parameters:
      username_ - the username
      Returns:
      list of GroupSummary
      Throws:
      InvalidUserException - thrown when an invalid username is passed in.
      PrivilegeException
    • getGroupSummaryForUserPaging

      ResultPage getGroupSummaryForUserPaging(String username_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidUserException, PrivilegeException
      Retrieves GroupSummary beans for every group for which the given User is a member or administrator. Note: the security on personal groups will further filter out groups of which the user is a member but not an administrator as only administrators of personal groups have permissions to see those groups.
      Parameters:
      username_ - The username of the User for which to retrieve the groups.
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted.
      sortOrder_ - the order in which to sort the results. This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      A ResultPage which contains an array of GroupSummary objects.
      Throws:
      InvalidUserException - if the specified User does not exist
      PrivilegeException
    • isGroupSystemGroup

      boolean isGroupSystemGroup(Long groupId_) throws InvalidGroupException
      Checks to see if a given group is a system group. System groups cannot be deleted, and their names may not be edited.
      Parameters:
      groupId_ - the group ID
      Returns:
      true if the given group is a System group, else false.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • getGroupsForUserByRoles

      @Deprecated Group[] getGroupsForUserByRoles(String username_, Integer[] roles_) throws UnsupportedRoleException, InvalidUserException, PrivilegeException
      Retrieves a list of groups for which the given user has any of the given roles. Supported roles are:
      Parameters:
      username_ - the user
      roles_ - ids of roles
      Returns:
      the list of groups
      Throws:
      InvalidUserException - thrown when an invalid username is passed to this service method.
      UnsupportedRoleException - thrown when an invalid role id is passed.
      PrivilegeException
    • getGroupsForUserByRolesPaging

      ResultPage getGroupsForUserByRolesPaging(String username_, Integer[] roles_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws UnsupportedRoleException, InvalidUserException, PrivilegeException
      Retrieves a ResultPage containing the list of groups for which the given user has any of the given roles. Supported roles are:
      Parameters:
      username_ - the user
      roles_ - ids of roles
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing list of Group objects.
      Throws:
      UnsupportedRoleException - thrown when an invalid role id is passed.
      InvalidUserException - thrown when an invalid username is passed to this service method.
      PrivilegeException
    • getGroupActions

      Boolean[] getGroupActions(Long groupId_, Integer[] actionIds_) throws InvalidGroupException
      Gets s Boolean array, representing whether actions with the given ids can be performed on a given group by the current user
      Parameters:
      groupId_ - id of the group
      actionIds_ - ids of actions that are requested to be checked. Each of these is one of the ACTION_GROUP_XXX constants
      Returns:
      Boolean array. An index in the array is Boolean.TRUE if the current user can perform the action at the corresponding index in actionIds_ on the given group
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • canUseGroupName

      boolean canUseGroupName(String groupName_, Long groupSecurityType_) throws InvalidSecurityMapException
      Indicates whether a user can create a new group with the given name of the given group security type. Public group names must be unique.
      Parameters:
      groupName_ - name of the group
      groupSecurityType_ - group security type can be one of the following:
      Returns:
      true if the passed in group name can be used for a group of the given group security type, else false.
      Throws:
      InvalidSecurityMapException - thrown when a invalid groupSecurity Type is passed.
      See Also:
    • getParentGroupsForDelegatedCreation

      Group[] getParentGroupsForDelegatedCreation()
      Gets the groups for which the logged-in user is authorized to set as a parent when creating public child groups. In order to create the public child group, the user must have administrator privileges to the parent group and the parent group must have delegated creation turned on.
      Returns:
      list of groups that can be used as parent groups.
    • getParentGroupsForDelegatedUpdate

      Group[] getParentGroupsForDelegatedUpdate(Long groupId_)
      Gets the groups for which the logged-in user is authorized to set as parent when updating public child groups. This function is similar to getParentGroupsForDelegatedCreation() except that it filters out groups that are members of the passed in group and those that are children or sub-children of the passed in group.
      Parameters:
      groupId_ - the id of the group
      Returns:
      list of groups that can be used as parent groups.
    • getParentGroupsForDelegatedCreationPaging

      ResultPage getParentGroupsForDelegatedCreationPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets a ResultPage of parent groups for which the logged-in user is authorized to create public child groups.
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of Group objects.
    • findGroupsPaging

      ResultPage findGroupsPaging(GroupSearch groupSearch_, boolean caseSensitive_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws UnsupportedOperatorException
      Finds groups based on criteria submitted in the GroupSearch The supported search operators are specified in GroupSearch for a group See getOperatorsForAttributeType() in GroupTypeService to obtain a list of possible operators Operator for a given data type. The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of groups matching search criteria
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • findNonMemberAncestorGroupsPaging

      ResultPage findNonMemberAncestorGroupsPaging(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws UnsupportedOperatorException
      Retrieves a ResultPage of list of groups for a group search that are not ancestors (by parent-member relationship) of the given group. This is used to prevent circular member relationships. The supported search operators are specified in GroupSearch for a group The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      groupId_ - the id of a group
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of Group objects
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • findAvailableParentGroupsPaging

      ResultPage findAvailableParentGroupsPaging(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws UnsupportedOperatorException
      Gets a ResultPage containing a list of all groups available for setting as parent. These will be groups that the user have administrative privileges and are not members of the given group or members of members of the given group. The supported search operators are specified in GroupSearch The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      groupId_ - the id of a Group
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of Groups objects, representing those groups available to be used as parent groups.
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • findAdminGroupsPaging

      ResultPage findAdminGroupsPaging(GroupSearch groupSearch_, boolean caseSensitive_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws UnsupportedOperatorException
      Finds all groups of which you are administrator and which also match the given search criteria. The supported search operators are specified in GroupSearch The GroupSearch object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, the GroupSearch might have the groupName field set to "myGroup" and the operatorGroupName field set to Operator#EQUALS. Such a search will return all groups whose groupName is "myGroup".
      Parameters:
      groupSearch_ - the group search form
      caseSensitive_ - true if search is case sensitive
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of Group objects matching the search criteria.
      Throws:
      UnsupportedOperatorException - Thrown when a given operation is not supported by the Personalization service.
    • getApplicationName

      String getApplicationName()
      Gets the name of the application on which this service is running.
      Returns:
      the name of the application
    • getWorkspace

      String[] getWorkspace()
      Gets the current memory profile for the workspace.
      Returns:
      array of Strings of length 4 describing memory usage:
      • [0]Used - Memory Used by the Server so far for storage
      • [1]Allocated - Memory allocated for use. Often if a large data item was allocated by a server and subsequently freed, this value will be large compared to "Used". If nearly all memory allocated is in use, this value will be close to (but always higher than) "Used"
      • [2]Mapped - is the space used by memory-mapped files
      • [3]Available - is the total available memory for the Server process
      Note: All usage statistics are in Bytes.
    • getMemberUsernames

      String[] getMemberUsernames(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets the usernames of all the member users for given group
      Parameters:
      groupId_ - id of the group to get users for
      Returns:
      a string array of usernames. Note: If the user can see the group but cannot view members of group, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException
    • getGroupIdsForUserByRoles

      Long[][] getGroupIdsForUserByRoles(String username_, Integer[] roles_) throws InvalidUserException, UnsupportedRoleException, PrivilegeException
      Gets the group Ids for which the specified user has any of the specified roles
      Parameters:
      username_ - the user
      roles_ - ids of roles
      Returns:
      ids of groups where user has any of the given roles.
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid username is passed into a service method.
      UnsupportedRoleException - This exception is thrown whenever an invalid role id is passed into a service method.
      PrivilegeException
    • getGroupsList

      ResultList getGroupsList(Long[] groupIds_)
      Returns a ResultList ResultList containing error codes for all Ids and Groups for valid Ids
      Parameters:
      groupIds_ - Ids of groups to retrieve
      Returns:
      ResultList containing Group group objects, and error codes. Each error code will be one of the CODE_XXX constants in ResultList
    • getMemberGroupsDirect

      Group[] getMemberGroupsDirect(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets group members of a group that are explicitly defined, no cascading (group members of subgroups are not included)
      Parameters:
      groupId_ - the group to get group members for
      Returns:
      array of member groups. Note: If the user can see the group but cannot view members of groupg, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getMemberGroupsDirectPaging

      ResultPage getMemberGroupsDirectPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Gets a ResultPage containing a list of groups that are direct members, i.e. group members of subgroups are not included in the result set.
      Parameters:
      groupId_ - the group to get members for
      startIndex_ - the index of the first Group that will be returned
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the Group objects will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing Group objects, representing the group member. Note: If the user can see the group but cannot view members of the group, the results array will be of length 0.
      Throws:
      ServiceException - if any system-level error occurs
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getMemberUsersDirect

      @Deprecated User[] getMemberUsersDirect(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets a list of distinct users that are direct members of the specified group, i.e user members of subgroups are not included.
      Parameters:
      groupId_ - the group to get members for.
      Returns:
      array of member users. Note: If the current user can see the group but cannot view members of group, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getMemberUsersDirectPaging

      ResultPage getMemberUsersDirectPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Gets a ResultPage containing a list of distinct users that are direct members of the specified group i.e user members of subgroups are not included.
      Parameters:
      groupId_ - the group to get members for.
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in User
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of User objects, representing the direct member users of the group. Note: If the current user can see the group but cannot view members of group, the results array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getAdminUsersDirectPaging

      ResultPage getAdminUsersDirectPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Gets a ResultPage containing a list of distinct users that are direct admins of the specified group ie user admins of subgroups are not included.
      Parameters:
      groupId_ - the group to get admins for.
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in User
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing a list of User objects, representing the direct user admins of the group. Note: If the current user can see the group but cannot view members of group, the results array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getMemberUsernamesDirect

      @Deprecated String[] getMemberUsernamesDirect(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets the usernames of all the direct member users for given group ie user members of subgroups are not included.
      Parameters:
      groupId_ - id of the Group to get users for
      Returns:
      a string array of usernames. Note: If the current user can see the group but cannot view members of the group, the returned array will be of length 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if there is a security violation
    • getTopLevelGroupsForHierarchy

      GroupHierarchyBean[] getTopLevelGroupsForHierarchy(Long groupTypeId_, boolean sameType_) throws InvalidGroupTypeException
      Parameters:
      groupTypeId_ -
      sameType_ -
      Returns:
      Throws:
      InvalidGroupTypeException - This exception may be thrown by service methods detecting that a given GroupType does not exist.
      SecurityException - if there is a security violation
    • getTopLevelGroupsForHierarchyPaging

      ResultPage getTopLevelGroupsForHierarchyPaging(Long groupTypeId_, boolean sameType_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupTypeException
      Gets all top level GroupHierarchyBean objects ( Groups without a parent group) given the Group type.
      Parameters:
      groupTypeId_ - The type of the Group to retrieve.
      sameType_ - Affects the value of the hasChildren field. If true, then hasChildren is only true if the Group has children of the same Group type. If false, then hasChildren is true if the Group has any children at all.
      startIndex_ - The index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - The property by which the results will be sorted. This should be one of the SORTY_BY_XXX constants in GroupHierarchyBean.
      sortOrder_ - The order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      A ResultPage containing an array of Group objects.
      Throws:
      InvalidGroupTypeException - If the groupTypeId_ parameter does not correspond to an existing Group type.
    • areUsersAddedByRule

      boolean[] areUsersAddedByRule(Long groupId_, String[] userIds_) throws InvalidUserException, InvalidGroupException
      Checks to see if the given users where added to the group by a rule.
      Parameters:
      groupId_ - The id of the group that contains the users that are being checked.
      userIds_ - The ids of the users being checked to see if they were added by a rule.
      Returns:
      A Boolean array the length of userIds_ that contains as a value in each element either true or false. true means the user was added by a rule, while false means it was not.
      Throws:
      InvalidUserException - This exception is thrown whenever an invalid user id is passed into a service method.
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • areGroupsAddedByRule

      boolean[] areGroupsAddedByRule(Long groupId_, Long[] groupIds_) throws InvalidGroupException
      Checks to see if the given groups were added to the group by a rule.
      Parameters:
      groupId_ - The id of the group that contains the users that are being checked.
      groupIds_ - The ids of the groups being checked to see if they were added by a rule.
      Returns:
      A Boolean array the length of groupIds_ that contains as a value in each element either true or false. true means the user was added by a rule, while false means it was not.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
    • suggestGroups

      @Deprecated String suggestGroups(String query_, int maxSuggestions_)
      Returns a String in a specified format that contains Groups whose name matches or partially matches the query string. The number of suggestions is limited. Format (for Users and Groups: [[4, 'john.user', John User],[5, 32, 'Finance']]
      Parameters:
      query_ - The search query.
      maxSuggestions_ - The maximum number of suggestions to return.
      Returns:
      A String of suggestions in the specified format.
    • suggestUsersAndGroups

      @Deprecated String suggestUsersAndGroups(String query_, int maxSuggestions_)
      Returns a String in a format specified by UI that contains Users whose first, last, or username match or partially match the query string and Groups whose name matches or partially matches the query string. The number of suggestions is limited. Format (for Users and Groups: [[4, 'john.user', John User],[5, 32, 'Finance']]
      Parameters:
      query_ - The search query.
      maxSuggestions_ - The maximum number of suggestions to return.
      Returns:
      A String of suggestions in the specified format.
    • suggestGroupsBulk

      @Deprecated Suggestion[][] suggestGroupsBulk(String[] queries_, int maxSuggestionsPerQuery_)
      Suggests Groups whose name matches each query.
      Parameters:
      queries_ - An array of queries by which to search for Groups.
      maxSuggestionsPerQuery_ - The maximum number of suggestions to return for each query.
      Returns:
      An array of Suggestion[] which are the suggestions corresponding to each query string. The first dimension of the array is equal to the number of queries. The second dimension of the array is less than or equal to the max suggestions per query.
    • suggestUsersAndGroupsBulk

      @Deprecated Suggestion[][] suggestUsersAndGroupsBulk(String[] queries_, int maxSuggestionsPerQuery_)
      Suggests Users whose first, last, and usernames match each query and Groups whose name matches each query.
      Parameters:
      queries_ - An array of queries by which to search for Groups.
      maxSuggestionsPerQuery_ - The maximum number of suggestions to return for each query.
      Returns:
      An array of Suggestion[] which are the suggestions corresponding to each query string. The first dimension of the array is equal to the number of queries. The second dimension of the array is less than or equal to the max suggestions per query.
    • getUserDefaultApplication

      @Deprecated Long getUserDefaultApplication(String username)
      Deprecated.
      Use {@link ApplicationService.getDefaultApplication()} for the site-wide default.
      There are no user-specific default applications. The results of this method should not be used.
      Parameters:
      username - the user for which to fetch the application
      Returns:
      null since there are no user-specific default applications.
    • getSystemDefaultApplication

      @Deprecated Long getSystemDefaultApplication()
      Deprecated.
      Use {@link ApplicationService.getDefaultApplication()}
      Gets the preferred default application for the system
      Returns:
      the default application chosen by the Administrator
    • getMyHomePage

      String getMyHomePage()
      Gets the home page for the current user if he has set one, otherwise returns the global home page.
      Returns:
      the absolute url of the home page for the user (i.e. /portal/home.do).
    • setGlobalHomePage

      void setGlobalHomePage(String url) throws PrivilegeException
      Sets home page for all users (default). Only can be called by system administrators.
      Parameters:
      url - the absolute url of the default home page for all users (i.e. /portal/home.do).
      Throws:
      PrivilegeException - Thrown when the user does not have privileges to create a Group.
    • setHomePageForUser

      void setHomePageForUser(String username_, String url_) throws InvalidUserException, PrivilegeException
      Throws:
      InvalidUserException
      PrivilegeException
    • setMyHomePage

      void setMyHomePage(String url) throws Exception
      Sets home page for current user, overriding the system default for this user.
      Parameters:
      url - the absolute url of the page
      Throws:
      Exception - if there is any error
    • getGlobalHomePage

      String getGlobalHomePage()
      Gets the global home page for the application.
      Returns:
      the absolute url of the default home page for all users (i.e. /portal/home.do).
    • addGroupToFavorites

      void addGroupToFavorites(Long groupId_) throws InvalidGroupException
      Associates Group as one of the current User's favorites
      Parameters:
      groupId_ - the id of the group that is to be added to user's favorites
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id or group name is passed into a service method.
    • removeGroupFromFavorites

      void removeGroupFromFavorites(Long groupId_) throws InvalidGroupException
      removes this group (groupId_) as one of the current user's favorites
      Parameters:
      groupId_ - the id of the group that is to be removed from user's favorites
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id or group name is passed into a service method.
    • getFavoriteGroups

      ResultPage getFavoriteGroups(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets a ResultPage containing a list of groups for the current user's Favorite Groups. Replaces getMyGroups.
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      a ResultPage containing the Group objects.
    • addAdminUsers

      void addAdminUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Adds the users by given username's as administrators of group given by groupId_
      Parameters:
      usernames_ - username's of the users to be added as administrators.
      groupId_ - the group to add the administrator to.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for the groupId_
      PrivilegeException - This exception is thrown when the user does not have privileges to add the group(s) as adminsitrators
      InvalidUserException
    • removeAdminUsers

      void removeAdminUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException
      Removes the users specified by usernames_ as administrators of group
      Parameters:
      usernames_ - username's of the users to be removed.
      groupId_ - the target group whose administrators are updated
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for the groupId_
      PrivilegeException - This exception is thrown when the user does not have privileges to remove the user(s)
      InvalidUserException
    • addAdminGroups

      void addAdminGroups(Long[] adminGroupIds_, Long groupId_) throws InvalidGroupException, PrivilegeException
      Adds the given groups as administrator groups for group given by groupId_
      Parameters:
      adminGroupIds_ - Ids of the group to be added as administrators.
      groupId_ - the group to add the administrator to.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for either the groupId_ or the groups to be added as administrator
      PrivilegeException - This exception is thrown when the user does not have privileges to add the group(s) as adminsitrators
    • removeAdminGroups

      void removeAdminGroups(Long[] adminGroupIds_, Long groupId_) throws InvalidGroupException, PrivilegeException
      Removes the groups specified by adminGroupIds_ as administrators of group
      Parameters:
      adminGroupIds_ - Ids of the group to be removed.
      groupId_ - the target group whose administrators are updated
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for either the groupId_ or the groups to be removed as administrators
      PrivilegeException - This exception is thrown when the user does not have privileges to remove the group(s)
    • getAdminGroupsPaging

      ResultPage getAdminGroupsPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Retrieves the groups that are administrator groups for the given groupId_
      Parameters:
      groupId_ - Id of the group whose administrator groups are requested
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in Group
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      ResultPage containing a list of Group objects that are administrator groups.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for the groupId_
      PrivilegeException - This exception is thrown whenever the user does not have view privileges to group specified by groupId_
    • getAdminUsersPaging

      ResultPage getAdminUsersPaging(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidGroupException, PrivilegeException
      Retrieves the users that are administrator users for the given groupId_
      Parameters:
      groupId_ - Id of the group whose administrator groups are requested
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the SORT_BY_XXX constants in User
      sortOrder_ - the order in which to sort the results. This should be either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING.
      Returns:
      ResultPage containing a list of User objects that are administrator users.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed for the groupId_
      PrivilegeException - This exception is thrown whenever the user does not have view privileges to group specified by groupId_
    • getAdminUserCount

      int getAdminUserCount(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets a count of distinct users that are administrators of the specified group.
      Parameters:
      groupId_ - the group whose user members are to be counted
      Returns:
      the count of member users. Note: If the user can see the group but cannot view members of group, the returned member count will be 0.
      Throws:
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user does not have sufficient privileges
    • getAdminGroupCount

      int getAdminGroupCount(Long groupId_) throws InvalidGroupException, PrivilegeException
      Gets the number of distinct groups {that are administrators of the specified group.
      Parameters:
      groupId_ - the group to count group members of.
      Returns:
      the count. Note: If the current user can see the group but cannot view members of group, the returned member count will be 0.
      Throws:
      ServiceException - if any system-level error occurs
      InvalidGroupException - This exception is thrown whenever an invalid group id is passed into a service method.
      PrivilegeException - if the user does not have sufficient privileges
    • isMemberOfGroups

      boolean[] isMemberOfGroups(Long[] groupId_) throws InvalidUserException
      Determines if the current user is a member of each of the specified groups.
      Parameters:
      groupId_ - array of group ids
      Returns:
      a boolean array of same length as the input parameter. For each group in the list, if the current user is a member of the group a true is returned. If the user is not a member, cannot see the group, the passed group is null or it does not exist, false is returned. If groupId_ is null or empty, an empty boolean array is returned.
      Throws:
      InvalidUserException
    • isMemberOfGroups

      boolean[] isMemberOfGroups(String[] groupUuid_)
      Determines if the current user is a member of each of the specified groups.
      Parameters:
      groupUuid_ - array of group UUIDs.
      Returns:
      a boolean array of same length as the input parameter. For each group in the list, if the current user is a member of the group a true is returned. If the user is not a member, cannot see the group, the passed group is null or it does not exist, false is returned. If groupId_ is null or empty, an empty boolean array is returned.
    • isUserMemberOfGroups

      boolean[] isUserMemberOfGroups(String username_, Long[] groupId_) throws InvalidUserException, NullPointerException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      username_ - username
      groupId_ - array of group ids
      Returns:
      a boolean array of same length as the input parameter. For each group in the list, if the current user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned. If username_ is null or empty, or groupId_ is null or empty, an empty boolean array is returned.
      Throws:
      NullPointerException - If the passed username is either null or empty.
      InvalidUserException - If the passed username is non-null and invalid.
    • isUserMemberOfGroups

      boolean[] isUserMemberOfGroups(String username_, String[] groupUuid_) throws InvalidUserException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      username_ - username
      groupUuid_ - array of group uuids
      Returns:
      a boolean array of same length as the input parameter. For each group in the list, if the current user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned. If username_ is invalid, or groupId_ is null or empty, an empty boolean array is returned.
      Throws:
      NullPointerException - If the passed username is either null or empty.
      InvalidUserException - If the passed username is non-null and invalid.
    • isUserMemberOfGroups

      boolean[] isUserMemberOfGroups(String[] usernames, Long[] groupId_) throws InvalidUserException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      usernames - usernames
      groupId_ - array of group ids
      Returns:
      a boolean array of same length as groupId_. This call presumes that all usernames are potential usernames for the same user. For each group in the list, if the specified user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned. If all usernames are null, or groupId_ is null or empty, an empty boolean array is returned. Multiple passed usernames should not be valid (use areUsersMembersOfGroups to check multiple users), but if so, results for the first will be returned.
      Throws:
      NullPointerException - If all passed usernames are null or empty.
      InvalidUserException - If all passed usernames are invalid.
    • isUserMemberOfGroups

      boolean[] isUserMemberOfGroups(String[] usernames, String[] groupUuid_) throws InvalidUserException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      usernames - usernames
      groupUuid_ - array of group uuids
      Returns:
      a boolean array of same length as groupId_. This call presumes that all usernames are potential usernames for the same user. For each group in the list, if the specified user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned. If all usernames are null, or groupId_ is null or empty, an empty boolean array is returned. Multiple passed usernames should not be valid (use areUsersMembersOfGroups to check multiple users), but if so, results for the first will be returned.
      Throws:
      NullPointerException - If all passed usernames are null or empty.
      InvalidUserException - If all passed usernames are invalid.
    • areUsersMembersOfGroups

      boolean[][] areUsersMembersOfGroups(String[] usernames, Long[] groupIds) throws InvalidUserException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      usernames -
      groupIds - array of group ids
      Returns:
      a 2D boolean array of same length as the input parameter usernames. For each user in the list, for each group in the list, if the user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned.
      Throws:
      NullPointerException - If all passed usernames are null or empty.
      InvalidUserException - If all passed usernames are invalid.
    • areUsersMembersOfGroups

      boolean[][] areUsersMembersOfGroups(String[] usernames, String[] groupUuid_) throws InvalidUserException
      Determines if the specified user is a member of each of the specified groups.
      Parameters:
      usernames -
      groupUuid_ - array of group uuids
      Returns:
      a 2D boolean array of same length as the input parameter usernames. For each user in the list, for each group in the list, if the user is a member of the group a true is returned. If the user is not a member, cannot see the group, or the group does not exist, false is returned.
      Throws:
      NullPointerException - If all passed usernames are null or empty.
      InvalidUserException - If all passed usernames are invalid.
    • getDirectMemberGroupIds

      Long[] getDirectMemberGroupIds(Long groupId) throws InvalidGroupException, PrivilegeException
      Gets the group IDs of all the member groups added directly to a given group (excludes those who are members via rule or via membership in a member group)
      Parameters:
      groupId - id of the group for which to get member groups
      Returns:
      Long array of groupIds
      Throws:
      InvalidGroupException - if the group ID is invalid
      PrivilegeGroupException - if the user does not have rights to view the group
      PrivilegeException
    • getDirectMemberUsernames

      String[] getDirectMemberUsernames(Long groupId) throws InvalidGroupException, PrivilegeException
      Gets the usernames of all the member users added directly to a given group (excludes those who are members via rule or via membership in a member group)
      Parameters:
      groupId - id of the group for which to get member users
      Returns:
      String array of usernames
      Throws:
      InvalidGroupException - if the group ID is invalid
      PrivilegeGroupException - if the user does not have rights to view the group
      PrivilegeException
    • getDirectAdminGroupIds

      Long[] getDirectAdminGroupIds(Long groupId) throws InvalidGroupException, PrivilegeException
      Gets the group IDs of all the administrator groups added directly to a given group (excludes those who are administrators via membership in an administrator group)
      Parameters:
      groupId - id of the group for which to get admin groups
      Returns:
      Long array of groupIds
      Throws:
      InvalidGroupException - if the group ID is invalid
      PrivilegeGroupException - if the user does not have rights to view the group
      PrivilegeException
    • getDirectAdminUsernames

      String[] getDirectAdminUsernames(Long groupId) throws InvalidGroupException, PrivilegeException
      Gets the usernames of all the administrator users added directly to a given group (excludes those who are administrators via membership in an administrator group)
      Parameters:
      groupId - id of the group for which to get admin users
      Returns:
      String array of usernames
      Throws:
      InvalidGroupException - if the group ID is invalid
      PrivilegeGroupException - if the user does not have rights to view the group
      PrivilegeException
    • suggest

      String suggest(String query, int maxItems, SuggestParam[] params, Boolean groupResults)
      Parameters:
      query -
      maxItems -
      params - list of information on what is being suggested and what format the results should be in. valid types are group, user.
      groupResults - if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.
      Returns:
      a JSON formatted string
    • suggest

      String suggest(String query, int maxItems, SuggestParam[] params, Boolean groupResults, Long[] allowList)
      Parameters:
      query -
      maxItems -
      params - list of information on what is being suggested and what format the results should be in. valid types are group, user.
      groupResults - if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.
      allowList - list of IDs that will be automatically added to returned results, filtered by query. Ignored if null or empty.
      Returns:
      a JSON formatted string
    • resolveEmailAddress

      Resolves an email recipient into an email address. Only LocalObjects of types USER, GROUP, and EMAIL_ADDRESS are valid inputs; any other inputs will result in an IllegalArgumentException. All LocalObject inputs must be valid: they all must contain a non-null type and either a non-null id or stringId, depending on the type.
      Parameters:
      emailRecipient_ - the LocalObject representing an email recipient for which to retrieve the email address information.
      Returns:
      the resolved email addresses
      Throws:
      InvalidGroupException - if the recipient type is GROUP and the id is not valid
      InvalidUserException - if the recipient type is USER and the id is not valid
      PrivilegeException - if the user doesn't have rights to see the address
    • resolveEmailAddresses

      @Deprecated ResolvedEmailAddresses resolveEmailAddresses(LocalObject[] emailRecipients_)
      Resolves email recipients into email addresses. Only LocalObjects of types USER, GROUP, and EMAIL_ADDRESS are valid inputs; any other inputs will result in an IllegalArgumentException. All LocalObject inputs must be valid: they all must contain a non-null type and either a non-null id or stringId, depending on the type.
      Parameters:
      emailRecipients_ - the LocalObject[] representing email recipients for which to retrieve the email address information.
      Returns:
      resolved email addresses and information on recipients that failed to resolve
    • resolveEmailDestinations

      ResolvedEmailAddresses[] resolveEmailDestinations(LocalObject[] to_, LocalObject[] cc_, LocalObject[] bcc_)
      Resolves three sets of email recipients, which form the email destination, into email addresses. Only LocalObjects of types USER, GROUP, and EMAIL_ADDRESS are valid inputs; any other inputs will result in an IllegalArgumentException. All LocalObject inputs must be valid: they all must contain a non-null type and either a non-null id or stringId, depending on the type.
      Parameters:
      to_ - the LocalObject[] representing email recipients for the "to" field
      cc_ - the LocalObject[] representing email recipients for the "cc" field
      bcc_ - the LocalObject[] representing email recipients for the "bcc" field
      Returns:
      the resolved email addresses
      See Also:
    • changeGroupTypeOfGroup

      void changeGroupTypeOfGroup(Long groupId, Long newGroupTypeId) throws PrivilegeException, InvalidGroupException, InvalidGroupTypeException
      Changes the GroupType of a Group. NOTE: values of dynamic attributes for group will be lost -- group will have default values for dynamic attributes of new groupType.
      Parameters:
      groupId - id of group to change grouptype of
      newGroupTypeId - newGroupTypeId id of groupType to change group to
      Throws:
      PrivilegeException - if user is not a SystemAdministrator-type user
      InvalidGroupException - if groupId is invalid
      InvalidGroupTypeException - if newGroupTypeId is invalid
    • changeGroupTypesOfGroups

      Integer[] changeGroupTypesOfGroups(Long[] groupIds, Long[] newGroupTypeIds) throws IllegalArgumentException
      Changes the GroupTypes of Groups. NOTE: groupIds should have same length as newGroupTypeIds NOTE: values of dynamic attributes for group will be lost -- groups will have default values for dynamic attributes of new groupTypes
      Parameters:
      groupIds - ids of groups to change grouptypes of
      newGroupTypeIds - ids of groupTypes to change groups to
      Returns:
      Integer array containing success or error codes. This is one of the GROUP_TYPE_CHANGE_XXX Constants
      Throws:
      IllegalArgumentException - if groupIds not unique
    • validateTypedValues

      boolean validateTypedValues(TypedValue[] typedValues) throws InvalidGroupException, InvalidUserException
      Validates given TypedValues. This method is free to throw an exception or to return false if any TypedValue passed is invalid for this engine. This engine supports: AppianType.GROUP AppianType.USERNAME AppianType.USER_OR_GROUP AppianType.EMAIL_RECIPIENT
      Parameters:
      typedValues -
      Returns:
      true if valid, false if invalid
      Throws:
      InvalidGroupException
      InvalidUserException