Interface GroupService
- All Superinterfaces:
ContextSensitiveSingletonService
,Service
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 Summary
Modifier and TypeFieldDescriptionstatic final Integer
Constant for whether the user can add members to the groupstatic final Integer
Constant for whether the user can add group membership rulesstatic final Integer
Constant for whether the user can add self to groupstatic final Integer
Constant for whether the user can delete the groupstatic final Integer
Constant for whether the user can remove group membersstatic final Integer
Constant for whether the user can delete group membership rulesstatic final Integer
Constant for whether the user can edit group attributesstatic final Integer
Constant for whether the user can remove his/her membership from groupstatic final Integer
Constant for whether the user can delegate group administrationstatic final Integer
Constant for whether the group can be delegated to be a parent group for creation of new groupsstatic final Integer
Constant for whether the user can view the group attributesstatic final Integer
Constant for whether the user can check the existence of the groupstatic final Integer
Constant for whether the user can view group membersstatic final Integer
Constant for whether the user can view the membership rules of the groupstatic final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final Integer
Constant for InvalidGroupException where group Id is invalid.static final Integer
Constant for InvalidGroupTypeException when grouptype of group is invalidstatic final Integer
Constant for PrivilegeException where user cannot change group type of groupstatic final Integer
Constant for whether changing the group type of group was successfulstatic final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final String
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final boolean
Fields inherited from interface com.appiancorp.services.ContextSensitiveSingletonService
CONFIGURE_METHOD_NAME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdminGroups
(Long[] adminGroupIds_, Long groupId_) Adds the given groups as administrator groups for group given bygroupId_
void
addAdminUsers
(String[] usernames_, Long groupId_) Adds the users by given username's as administrators of group given bygroupId_
void
addGroupsToMyGroups
(Long[] groupIds_) Adds a list of groups to My Groups for logged in user.void
addGroupToFavorites
(Long groupId_) AssociatesGroup
as one of the currentUser
's favoritesvoid
addMemberGroup
(Long memgroupId_, Long groupId_) Adds a member group to a group.void
addMemberGroups
(Long[] memgroupIds_, Long groupId_) Adds member groups to a groupvoid
addMemberUser
(String username_, Long groupId_) Adds a member user to a group .void
addMemberUsers
(String[] usernames_, Long groupId_) Adds member users to a groupvoid
addMyselfToGroup
(Long groupId_) Adds oneself to the given groupboolean[]
areGroupsAddedByRule
(Long groupId_, Long[] groupIds_) Checks to see if the given groups were added to the group by a rule.boolean[]
areUsersAddedByRule
(Long groupId_, String[] userIds_) Checks to see if the given users where added to the group by a rule.boolean[][]
areUsersMembersOfGroups
(String[] usernames, Long[] groupIds) Determines if the specified user is a member of each of the specified groups.boolean[][]
areUsersMembersOfGroups
(String[] usernames, String[] groupUuid_) Determines if the specified user is a member of each of the specified groups.boolean
canUseGroupName
(String groupName_, Long groupSecurityType_) Indicates whether a user can create a new group with the given name of the given group security type.void
changeGroupTypeOfGroup
(Long groupId, Long newGroupTypeId) Changes the GroupType of a Group.Integer[]
changeGroupTypesOfGroups
(Long[] groupIds, Long[] newGroupTypeIds) Changes the GroupTypes of Groups.createGroup
(Group group_) Create a new group.Long[]
createGroups
(Group[] groups_) Create new groups.void
deleteGroup
(Long groupId_) Deletes a single group.boolean
doesGroupExist
(Long groupId_) Checks to see if a given group exists.Group[]
findAdminGroups
(GroupSearch groupSearch_, boolean caseSensitive_) Deprecated.findAdminGroupsPaging
(GroupSearch groupSearch_, boolean caseSensitive_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Finds all groups of which you are administrator and which also match the given search criteria.Group[]
findAvailableParentGroups
(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_) findAvailableParentGroupsPaging
(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing a list of all groups available for setting as parent.Group[]
findGroups
(GroupSearch groupSearch_, boolean caseSensitive_) findGroupsPaging
(GroupSearch groupSearch_, boolean caseSensitive_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Finds groups based on criteria submitted in the GroupSearch The supported search operators are specified in GroupSearch for agroup
SeegetOperatorsForAttributeType()
inGroupTypeService
to obtain a list of possible operatorsOperator
for a given data type.Group[]
findNonMemberAncestorGroups
(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_) findNonMemberAncestorGroupsPaging
(GroupSearch groupSearch_, boolean caseSensitive_, Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Retrieves aResultPage
of list of groups for a group search that are not ancestors (by parent-member relationship) of the given group.int
getAdminGroupCount
(Long groupId_) Gets the number of distinct groups {that are administrators of the specified group.getAdminGroupsPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Retrieves the groups that are administrator groups for the givengroupId_
int
getAdminUserCount
(Long groupId_) Gets a count of distinct users that are administrators of the specified group.getAdminUsersDirectPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) 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.getAdminUsersPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Retrieves the users that are administrator users for the givengroupId_
Gets the list of group attribute types in the systemGets the name of the application on which this service is running.Returns the cached Credentials bean containing the group membership relations for the user in this Service Context.Returns a Credentials bean directly from the back-end, containing the group membership relations for the user in this Service Context.Long[]
getDirectAdminGroupIds
(Long groupId) 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)String[]
getDirectAdminUsernames
(Long groupId) 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)Long[]
getDirectMemberGroupIds
(Long groupId) 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)String[]
getDirectMemberUsernames
(Long groupId) 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)getFavoriteGroups
(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing a list of groups for the current user's Favorite Groups.Gets the global home page for the application.Get a group by id.Boolean[]
getGroupActions
(Long groupId_, Integer[] actionIds_) Gets s Boolean array, representing whether actions with the given ids can be performed on a given group by the current usergetGroupAttribute
(Long groupId_, String attributeName_) Gets a group attribute for a given group id.Long[]
getGroupIdsForUserByRole
(String username_, Integer role_) Gets a list of group ids for which a given user has a given role.Long[][]
getGroupIdsForUserByRoles
(String username_, Integer[] roles_) Gets the group Ids for which the specified user has any of the specified rolesgetGroupMembershipPolicyTypes
(Long groupSecurityTypeId_) Gets the list of group membership policy types for a particular group security type.getGroupMemberViewingPolicyTypes
(Long groupSecurityTypeId_) Gets the list of group member viewing policies for a particular group security type.getGroupName
(Long groupId_) Gets a group name for a given group id.String[]
getGroupNames
(Long[] groupIds_) Gets a list of group names for a given list of group ids.getGroupNamesList
(Long[] groupIds_) Gets a list of group names for a given list of group ids.Group[]
Gets a list of groups for a given list of group ids.getGroupSecurityTypes
(Integer actionId_) Gets the list of group security types that are available for a particular action.Group[]
getGroupsForUserByRole
(String username_, Integer role_) Gets a list of groups for which a given user has a given role.getGroupsForUserByRolePaging
(String username_, Integer role_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing list of groups for which a given user has a given role.Group[]
getGroupsForUserByRoles
(String username_, Integer[] roles_) Deprecated.getGroupsForUserByRolesPaging
(String username_, Integer[] roles_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Retrieves a ResultPage containing the list of groups for which the given user has any of the given roles.getGroupsList
(Long[] groupIds_) Returns a ResultListResultList
containing error codes for all Ids andGroup
s for valid IdsGroup[]
getGroupsOfType
(Long groupTypeId_) Deprecated.Group[]
getGroupsOfTypeForMemberUser
(Long[] groupTypeIds_, String username_) Deprecated.UsegetGroupsForUserByRolePaging(String, Integer, int, int, Integer, Integer)
and extract groups of the desired types from the results.getGroupsOfTypePaging
(Long groupTypeId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing a list of groups for a given group typegetGroupSummaryForUser
(String username_) Deprecated.getGroupSummaryForUserPaging
(String username_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) RetrievesGroupSummary
beans for every group for which the givenUser
is a member or administrator.Long[]
getGroupTypeForGroup
(Long[] groupIds_) Gets group types for a list of groups.int
getMemberGroupCount
(Long groupId_) Gets the number of distinct groups {that are members of the specified group.Group[]
getMemberGroups
(Long groupId_) Gets a list of members groups of a groupGroup[]
getMemberGroupsDirect
(Long groupId_) Gets group members of a group that are explicitly defined, no cascading (group members of subgroups are not included)getMemberGroupsDirectPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) 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.getMemberGroupsPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing a list of group members of a groupint
getMemberUserCount
(Long groupId_) Gets a count of distinct users that are members of the specified group.String[]
getMemberUsernames
(Long groupId_) Gets the usernames of all the member users for given groupString[]
getMemberUsernamesDirect
(Long groupId_) Deprecated.User[]
getMemberUsers
(Long groupId_) Gets a list of member users of the specified groupUser[]
getMemberUsers
(Long[] groupIds_) Gets a list of distinct users that are members of any of the specified groups.User[]
getMemberUsersDirect
(Long groupId_) Deprecated.getMemberUsersDirectPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) 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.getMemberUsersPaging
(Long groupId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets a ResultPage containing a list of member users of the specified groupLong[]
Gets Ids for logged-in user's My Groups.getMyGroups
(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.use getFavoriteGroupsGets the home page for the current user if he has set one, otherwise returns the global home page.Group[]
Gets the groups for which the logged-in user is authorized to set as a parent when creating public child groups.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.Group[]
getParentGroupsForDelegatedUpdate
(Long groupId_) Gets the groups for which the logged-in user is authorized to set as parent when updating public child groups.Tree[]
getRootTrees
(Long groupTypeId_, String relationshipType_, boolean singleGroupType_, int descendentDepth_) Get a set of groups structured into one or more trees.Tree[]
getRootTrees
(Long groupTypeId_, String relationshipType_, Long[] groupTypeIds_, int descendentDepth_) Get a set of groups structured into one or more treesTree[]
getRootTreesSameTypeWithRoles
(Long groupTypeId_, Integer[] roleTypes_, int descendantDepth_) getRuleSetForGroup
(Long groupId_) Gets membership rule set for a GroupDeprecated.Use {@link ApplicationService.getDefaultApplication()}getTopLevelGroupsForHierarchy
(Long groupTypeId_, boolean sameType_) getTopLevelGroupsForHierarchyPaging
(Long groupTypeId_, boolean sameType_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Gets all top levelGroupHierarchyBean
objects (Group
s without a parent group) given theGroup
type.getTopLevelGroupsPaging
(Long groupTypeId_, String relationshipType_, boolean singleGroupType_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Get a ResultPage containing a list of groups structured into one or more trees in theresult
field.getTreeViewForGroup
(Long groupId_, boolean singleGroupType_, String relationshipType_, int descendentDepth_) Get a view into the tree pivoted at a particular group.getTreeViewForGroup
(Long groupId_, Long[] groupTypeIds_, String relationshipType_, int descendentDepth_) Get a view into the tree pivoted at a particular group Each node in the tree will represent a group.getTreeViewForGroupSameTypeWithRoles
(Long groupId_, Integer[] roleTypes_, int descendantDepth_) Get a view into the tree pivoted at a particular group Each node in the tree will represent a group.getUserDefaultApplication
(String username) Deprecated.Use {@link ApplicationService.getDefaultApplication()} for the site-wide default.String[]
Gets the current memory profile for the workspace.boolean
isGroupDescendant
(Long groupId_, Long parentGroupId_) Checks if a group is a descendant of another group (by parent-child relationship).boolean
isGroupSystemGroup
(Long groupId_) Checks to see if a given group is a system group.boolean[]
isMemberOfGroups
(Long[] groupId_) Determines if the current user is a member of each of the specified groups.boolean[]
isMemberOfGroups
(String[] groupUuid_) Determines if the current user is a member of each of the specified groups.boolean
isUserMember
(String[] username_, Long groupId_) Checks multiple potential usernames to determine if a user is a member of a groupboolean
isUserMember
(String[] username_, String groupUuid_) Checks multiple potential usernames to determine if a user is a member of a groupboolean
isUserMember
(String username_, Long groupId_) Checks if a user is a member of a groupboolean
isUserMember
(String username_, String groupUuid_) Checks if a user is a member of a groupboolean[]
isUserMemberOfGroups
(String[] usernames, Long[] groupId_) Determines if the specified user is a member of each of the specified groups.boolean[]
isUserMemberOfGroups
(String[] usernames, String[] groupUuid_) Determines if the specified user is a member of each of the specified groups.boolean[]
isUserMemberOfGroups
(String username_, Long[] groupId_) Determines if the specified user is a member of each of the specified groups.boolean[]
isUserMemberOfGroups
(String username_, String[] groupUuid_) Determines if the specified user is a member of each of the specified groups.void
removeAdminGroups
(Long[] adminGroupIds_, Long groupId_) Removes the groups specified by adminGroupIds_ as administrators of groupvoid
removeAdminUsers
(String[] usernames_, Long groupId_) Removes the users specified byusernames_
as administrators of groupvoid
removeGroupFromFavorites
(Long groupId_) removes this group (groupId_) as one of the current user's favoritesvoid
removeGroupsFromMyGroups
(Long[] groupIds_) Removes a list of groups from My Groups for logged-in user.void
removeMemberGroup
(Long memgroupId_, Long groupId_) Removes a member group from a groupvoid
removeMemberGroups
(Long[] memgroupIds_, Long groupId_) Removes a list of member groups from a groupvoid
removeMemberUser
(String username_, Long groupId_) Deprecated.UseremoveMemberUsers(String[], Long)
and pass a single user in the array.void
removeMemberUsers
(String[] usernames_, Long groupId_) Removes a list of member users from a groupvoid
removeMyselfFromGroup
(Long groupId_) Removes oneself from the given groupresolveEmailAddress
(LocalObject emailRecipient_) resolveEmailAddresses
(LocalObject[] emailRecipients_) resolveEmailDestinations
(LocalObject[] to_, LocalObject[] cc_, LocalObject[] bcc_) Resolves three sets of email recipients, which form the email destination, into email addresses.void
setGlobalHomePage
(String url) Sets home page for all users (default).void
setHomePageForUser
(String username_, String url_) void
setMyHomePage
(String url) Sets home page for current user, overriding the system default for this user.suggest
(String query, int maxItems, SuggestParam[] params, Boolean groupResults) suggest
(String query, int maxItems, SuggestParam[] params, Boolean groupResults, Long[] allowList) suggestGroups
(String query_, int maxSuggestions_) Deprecated.usesuggest(String, int, SuggestParam[], Boolean)
insteadSuggestion[][]
suggestGroupsBulk
(String[] queries_, int maxSuggestionsPerQuery_) Deprecated.usesuggest(String, int, SuggestParam[], Boolean)
insteadsuggestUsersAndGroups
(String query_, int maxSuggestions_) Deprecated.usesuggest(String, int, SuggestParam[], Boolean)
insteadSuggestion[][]
suggestUsersAndGroupsBulk
(String[] queries_, int maxSuggestionsPerQuery_) Deprecated.usesuggest(String, int, SuggestParam[], Boolean)
insteadvoid
updateGroup
(Group group_) Updates aGroup
.void
updateGroups
(Group[] groups_) Updates multipleGroup
objects.void
updateRuleSetForGroup
(RuleSet ruleSet_) Updates the membership rule set for aGroup
.boolean
validateTypedValues
(TypedValue[] typedValues) Validates given TypedValues.Methods inherited from interface com.appiancorp.services.ContextSensitiveSingletonService
configureContextSensitiveSingletonService
-
Field Details
-
USER_ROLE_SUPERADMIN
-
USER_ROLE_CREATOR
-
USER_ROLE_ADMINISTRATOR
-
USER_ROLE_VIEWER
-
USER_ROLE_MEMBER
-
USER_ROLE_NONMEMBER
-
RELATIONSHIP_TYPE_HEIRARCHY
- See Also:
-
ACTION_GROUP_DELETE_GROUP
Constant for whether the user can delete the group -
ACTION_GROUP_EDIT_GROUP_ATTRIBUTES
Constant for whether the user can edit group attributes -
ACTION_GROUP_ADD_GROUP_MEMBERS
Constant for whether the user can add members to the group -
ACTION_GROUP_DELETE_GROUP_MEMBERS
Constant for whether the user can remove group members -
ACTION_GROUP_ADD_GROUP_RULES
Constant for whether the user can add group membership rules -
ACTION_GROUP_DELETE_GROUP_RULES
Constant for whether the user can delete group membership rules -
ACTION_GROUP_VIEW_GROUP_EXISTENCE
Constant for whether the user can check the existence of the group -
ACTION_GROUP_VIEW_GROUP_ATTRIBUTES
Constant for whether the user can view the group attributes -
ACTION_GROUP_VIEW_GROUP_MEMBERS
Constant for whether the user can view group members -
ACTION_GROUP_VIEW_GROUP_RULES
Constant for whether the user can view the membership rules of the group -
ACTION_GROUP_ADD_SELF_TO_GROUP
Constant for whether the user can add self to group -
ACTION_GROUP_REMOVE_SELF_FROM_GROUP
Constant for whether the user can remove his/her membership from group -
ACTION_GROUP_UPDATE_DELEGATED_ADMINISTRATION
Constant for whether the user can delegate group administration -
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
Constant for whether changing the group type of group was successful -
GROUP_TYPE_CHANGE_NO_PRIVILEGE
Constant for PrivilegeException where user cannot change group type of group -
GROUP_TYPE_CHANGE_INVALID_GROUP
Constant for InvalidGroupException where group Id is invalid. -
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
Long createGroup(Group group_) throws DuplicateNameException, UnsupportedAttributeTypeException, InvalidAttributeException, InvalidGroupTypeException, InvalidParentException, InvalidNameException, InvalidCreatorException, InvalidSecurityMapException, InvalidMemberPolicyException, InvalidViewingPolicyException, InvalidAttributeValueException, PrivilegeException, DuplicateUuidException Create a new group.
groupName
must be unique for public and team groups. If theGroup
is of a group type with attributes, you must pass the correctAttribute
list with the correctname
andtype
for eachAttribute
with theGroup
. Should be used in conjunction withGroupTypeService.getGroupTypeAttributes(Long groupTypeId)
in order to properly fill thesetAttributes(Attribute[])
field of theGroup
passed in. If theAttribute[]
does not match the group type's attributes, then anInvalidAttributeException
will be thrown.Note that when a
Group
specifies a parent, it automatically becomes a memberGroup
of its parent.The
Group
fields required for creation are:groupName
,groupTypeId
,creatorName
,securityMapId
. IfgroupTypeId
points to aGroupType
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 theGroup
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
orInvalidViewingPolicyException
will be thrown- Parameters:
group_
- theGroup
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 theGroupService
.InvalidAttributeException
- Thrown when trying to get, update, or delete anattribute
for aGroupType
that does not exist.InvalidGroupTypeException
- This exception may be thrown by service methods detecting that a givenGroupType
does not exist.InvalidParentException
- Thrown when user passes in invalidGroup
as parent.InvalidNameException
- thrown when the groupname is null or empty.InvalidCreatorException
- Thrown when a invalid user is passed as creator ofGroup
.InvalidSecurityMapException
- thrown if the securitymapId field passed inGroup
object is invalid.InvalidMemberPolicyException
- Thrown when membership policy is invalid or not applicable to theGroup
.InvalidViewingPolicyException
- Thrown when viewing policy is invalid or not applicable to theGroup
.InvalidAttributeValueException
- Thrown when incorrect attributes values are passed.PrivilegeException
- Thrown when the user does not have privileges to create aGroup
.DuplicateUuidException
- Thrown when the UUID passed in already exists in the system.
-
createGroups
Long[] createGroups(Group[] groups_) throws UnsupportedAttributeTypeException, InvalidGroupTypeException, InvalidParentException, InvalidNameException, InvalidCreatorException, InvalidSecurityMapException, InvalidMemberPolicyException, InvalidViewingPolicyException, PrivilegeException, InvalidAttributeException, InvalidAttributeValueException, DuplicateUuidException 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 returnsnull
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 memberGroup
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 theGroup
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
orInvalidViewingPolicyException
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 givenGroupType
does not exist.InvalidParentException
- Thrown when user passes in invalidGroup
as parent.InvalidNameException
- thrown when the groupname is null or empty.InvalidCreatorException
- Thrown when a invalid user is passed as creator ofGroup
.InvalidSecurityMapException
- thrown if the securitymapId field passed inGroup
object is invalid.InvalidMemberPolicyException
- Thrown when membership policy is invalid or not applicable to theGroup
.InvalidViewingPolicyException
- Thrown when viewing policy is invalid or not applicable to theGroup
.PrivilegeException
- Thrown when the user does not have privileges to create one or more of theGroup
s.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
void updateGroup(Group group_) throws InvalidGroupException, DuplicateNameException, RecursiveRelationshipException, InvalidParentException, UnsupportedAttributeTypeException, InvalidAttributeException, InvalidGroupTypeException, InvalidSecurityMapException, InvalidMemberPolicyException, InvalidViewingPolicyException, InvalidAttributeValueException, PrivilegeException Updates aGroup
.groupName
must be unique for public and team groups. If thegroup
is of a group type with attributes, you must pass the correctAttribute
list with the correctname
andtype
for eachAttribute
with theGroup
. Should be used in conjunction withGroupTypeService.getGroupTypeAttributes(Long groupTypeId)
in order to properly fill thesetAttributes(Attribute[])
field of theGroup
passed in. If theAttribute[]
does not match the Group Type's attributes, then anInvalidAttributeException
will be thrown.The following fields are set when a
Group
is created and cannot be changed using this method:id
andgroupTypeId
.Only the following fields can be changed:
groupName
,description
,parentId
,securityMapId
,attributes
,memberPolicyId
,viewingPolicyId
,delegatedCreation
.
If the group does not have a parent thenparentId
should be set to -1.
Note that when agroup
specifies a parent, it automatically becomes a membergroup
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_
- thegroup
to update. Groupid
must be populated as well asgroupName
,groupTypeId
,creatorName
,securityMapId
,viewingPolicyId
,memberPolicyId
, andparentId
. IfgroupTypeId
points to aGroupType
withattributes
, then all theattributes
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
void updateGroups(Group[] groups_) throws InvalidGroupException, RecursiveRelationshipException, InvalidParentException, UnsupportedAttributeTypeException, InvalidAttributeException, InvalidGroupTypeException, InvalidSecurityMapException, InvalidMemberPolicyException, InvalidViewingPolicyException, InvalidAttributeValueException, PrivilegeException Updates multipleGroup
objects.groupName
must be unique for public and team groups. If thegroup
is of a group type with attributes, you must pass the correctAttribute
list with the correctname
andtype
for eachAttribute
with thegroup
. Should be used in conjunction withGroupTypeService.getGroupTypeAttributes(Long groupTypeId)
in order to properly fill thesetAttributes(Attribute[])
field of theGroup
passed in. If theAttribute[]
does not match the Group Type's attributes, then anInvalidAttributeException
will be thrown.The following fields are set when a
Group
is created and cannot be changed using this method:id
andgroupTypeId
.Only the following fields can be changed:
groupName
,description
,parentId
,securityMapId
,attributes
,memberPolicyId
,viewingPolicyId
,delegatedCreation
.
If the group does not have a parent thenparentId
should be set to -1.
Note that when agroup
specifies a parent, it automatically becomes a membergroup
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_
- thegroups
to update. Groupid
must be populated as well asgroupName
,groupTypeId
,creatorName
,securityMapId
,viewingPolicyId
,memberPolicyId
, andparentId
. IfgroupTypeId
points to aGroupType
withattributes
, then all theattributes
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
void deleteGroup(Long groupId_) throws InvalidGroupException, SystemGroupException, GroupIsAttributeException Deletes a single group. NOTE: To register in the other (non-personalization) portal applications that agroup
has been deleted, this call must be followed by a call toAdministrationService.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
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
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
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 eitherCODE_VALID
(for valid group ids) orCODE_INVALID
(for invalid group ids) fromResultList
. 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
Gets a group attribute for a given group id.- Parameters:
groupId_
- the id of the groupattributeName_
- 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
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 currentUser
does not have rights to view the group
-
getGroups
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
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
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. TheCredentials
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.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 occursInvalidGroupTypeException
- 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 idstartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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
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:USER_ROLE_CREATOR
USER_ROLE_ADMINISTRATOR
- Note that when using this role, if the user is a System Administrator, only system groups will be returned.USER_ROLE_MEMBER
- Parameters:
username_
- the unique key for the userrole_
- 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:USER_ROLE_CREATOR
USER_ROLE_ADMINISTRATOR
- Note that when using this role, if the user is a System Administrator, only system groups will be returned.USER_ROLE_MEMBER
- Parameters:
username_
- the userrole_
- 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 userrole_
- the rolestartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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.UsegetGroupsForUserByRolePaging(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 idsusername_
- 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
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 membersstartIndex_
- the index of the firstGroup
that will be returnedbatchSize_
- 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 theGroup
objects will be sorted. This is one of theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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
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 membersstartIndex_
- 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 theSORT_BY_XXX
constants inUser
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofUser
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
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
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
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 occursInvalidGroupException
- 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 addgroupId_
- 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 addgroupId_
- 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 groupgroupId_
- 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 addgroupId_
- 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
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 removegroupId_
- 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 removegroupId_
- id of thegroup
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.UseremoveMemberUsers(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 removegroupId_
- 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 removegroupId_
- 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
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 Deprecated.Finds groups based on criteria submitted in theGroupSearch
The supported search operators are specified inGroupSearch
for agroup
SeegetOperatorsForAttributeType()
inGroupTypeService
to obtain a list of possible operatorsOperator
for a given data type. TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search beancaseSensitive_
-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
Checks if a group is a descendant of another group (by parent-child relationship).- Parameters:
groupId_
- the id of the groupparentGroupId_
- 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 usernamegroupId_
- 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 usernamesgroupId_
- 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 usernamegroupUuid_
- 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 usernamesgroupUuid_
- 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. Theid
,name
of the node will beid
andgroupName
of the group, anddata
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 isRELATIONSHIP_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 groupsGroup
structured into one or more treesTree
. Only those groups are returned for which the user's privilege matches the specified roles- Parameters:
groupTypeId_
- The group typeGroupType
of the root node groups.roleTypes_
- array of roles which should match user's privilegedescendantDepth_
- 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 theresult
field. Each node in the tree will represent a group. Theid
,name
of the node will beid
andgroupName
of the group, anddata
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 isRELATIONSHIP_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 firstGroup
that will be returnedbatchSize_
- 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 theGroup
objects will be sorted. This is one of theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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. Theid
,name
of the node will beid
andgroupName
of the group, anddata
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 isRELATIONSHIP_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
Tree
s - 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 theTreePivot
Each node in the tree will represent a group. Theid
,name
of the node will beid
andgroupName
of the group, anddata
field of the node will be the group itself.- Parameters:
groupId_
- The id of thegroup
to use as the root of thetree
.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 isRELATIONSHIP_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. Theid
,name
of the node will beid
andgroupName
of the group, anddata
field of the node will be the group itself.- Parameters:
groupId_
- The id of thegroup
to use as the root of thetree
.groupTypeIds_
- Only groups of these group types should be returned in the tree.relationshipType_
- The relationship connecting the groups. Currently, the only permissible value isRELATIONSHIP_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. Theid
,name
of the node will beid
andgroupName
of the group, anddata
field of the node will be the group itself.- Parameters:
groupId_
- The id of thegroup
to use as the root of thetree
.roleTypes_
- array of roles which should match user's privilegedescendantDepth_
- 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
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
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
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 getFavoriteGroupsGets 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing theGroup
objects.
-
getGroupSecurityTypes
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 theACTION_GROUP_XXX
constants- Returns:
- the list of group security types for a particular action
-
getGroupMembershipPolicyTypes
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
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 Deprecated.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. TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup". The supported search operators are specified in GroupSearch for a group- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivegroupId_
- 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 Deprecated.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 operatorsOperator
are specified in GroupSearchGroupSearch
TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivegroupId_
- 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 Deprecated.Finds groups of which the current user is administrator Supported operators are listed inGroupSearch
TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- 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
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
Updates the membership rule set for aGroup
. Note that there is only oneRuleSet
for eachGroup
, but eachRuleSet
may contain multiple rules. This method will replace the currentRuleSet
with the one passed in.- Parameters:
ruleSet_
- adds the givenRuleSet
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 Deprecated.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 RetrievesGroupSummary
beans for every group for which the givenUser
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 theUser
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. UseConstants.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 ofConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
- Returns:
- A
ResultPage
which contains an array ofGroupSummary
objects. - Throws:
InvalidUserException
- if the specifiedUser
does not existPrivilegeException
-
isGroupSystemGroup
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 Deprecated.Retrieves a list of groups for which the given user has any of the given roles. Supported roles are:- Parameters:
username_
- the userroles_
- 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 userroles_
- ids of rolesstartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing list ofGroup
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
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 groupactionIds_
- ids of actions that are requested to be checked. Each of these is one of theACTION_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 inactionIds_
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 groupgroupSecurityType_
- 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
Gets the groups for which the logged-in user is authorized to set as parent when updating public child groups. This function is similar togetParentGroupsForDelegatedCreation()
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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofGroup
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 agroup
SeegetOperatorsForAttributeType()
inGroupTypeService
to obtain a list of possible operatorsOperator
for a given data type. TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivestartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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 aResultPage
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 TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivegroupId_
- the id of a groupstartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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 TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivegroupId_
- the id of a GroupstartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofGroups
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 TheGroupSearch
object should be populated with the group fields to be searched on, and the criteria to be used in performing the search. For example, theGroupSearch
might have thegroupName
field set to "myGroup" and theoperatorGroupName
field set toOperator#EQUALS
. Such a search will return all groups whosegroupName
is "myGroup".- Parameters:
groupSearch_
- the group search formcaseSensitive_
- true if search is case sensitivestartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofGroup
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
-
getMemberUsernames
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 userroles_
- 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
Returns a ResultListResultList
containing error codes for all Ids andGroup
s for valid Ids- Parameters:
groupIds_
- Ids of groups to retrieve- Returns:
ResultList
containingGroup
group objects, and error codes. Each error code will be one of theCODE_XXX
constants inResultList
-
getMemberGroupsDirect
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 forstartIndex_
- the index of the firstGroup
that will be returnedbatchSize_
- 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 theGroup
objects will be sorted. This is one of theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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 occursInvalidGroupException
- 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 Deprecated.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 theSORT_BY_XXX
constants inUser
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofUser
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 theSORT_BY_XXX
constants inUser
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofUser
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 Deprecated.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 givenGroupType
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 levelGroupHierarchyBean
objects (Group
s without a parent group) given theGroup
type.- Parameters:
groupTypeId_
- The type of theGroup
to retrieve.sameType_
- Affects the value of thehasChildren
field. Iftrue
, thenhasChildren
is only true if theGroup
has children of the sameGroup
type. Iffalse
, thenhasChildren
is true if theGroup
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 inGroupHierarchyBean
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing an array ofGroup
objects. - Throws:
InvalidGroupTypeException
- If thegroupTypeId_
parameter does not correspond to an existingGroup
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
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.usesuggest(String, int, SuggestParam[], Boolean)
insteadReturns a String in a specified format that containsGroup
s whose name matches or partially matches the query string. The number of suggestions is limited. Format (forUser
s andGroup
s: [[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.usesuggest(String, int, SuggestParam[], Boolean)
insteadReturns a String in a format specified by UI that containsUser
s whose first, last, or username match or partially match the query string andGroup
s whose name matches or partially matches the query string. The number of suggestions is limited. Format (forUser
s andGroup
s: [[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.usesuggest(String, int, SuggestParam[], Boolean)
insteadSuggestsGroup
s whose name matches each query.- Parameters:
queries_
- An array of queries by which to search forGroup
s.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_) Deprecated.usesuggest(String, int, SuggestParam[], Boolean)
insteadSuggestsUser
s whose first, last, and usernames match each query andGroup
s whose name matches each query.- Parameters:
queries_
- An array of queries by which to search forGroup
s.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.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.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
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 aGroup
.
-
setHomePageForUser
void setHomePageForUser(String username_, String url_) throws InvalidUserException, PrivilegeException -
setMyHomePage
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
AssociatesGroup
as one of the currentUser
'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
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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing theGroup
objects.
-
addAdminUsers
void addAdminUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException Adds the users by given username's as administrators of group given bygroupId_
- 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 thegroupId_
PrivilegeException
- This exception is thrown when the user does not have privileges to add the group(s) as adminsitratorsInvalidUserException
-
removeAdminUsers
void removeAdminUsers(String[] usernames_, Long groupId_) throws InvalidUserException, InvalidGroupException, PrivilegeException Removes the users specified byusernames_
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 thegroupId_
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 bygroupId_
- 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 administratorPrivilegeException
- 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 administratorsPrivilegeException
- 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 givengroupId_
- Parameters:
groupId_
- Id of the group whose administrator groups are requestedstartIndex_
- 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 theSORT_BY_XXX
constants inGroup
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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 thegroupId_
PrivilegeException
- This exception is thrown whenever the user does not have view privileges to group specified bygroupId_
-
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 givengroupId_
- Parameters:
groupId_
- Id of the group whose administrator groups are requestedstartIndex_
- 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 theSORT_BY_XXX
constants inUser
sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.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 thegroupId_
PrivilegeException
- This exception is thrown whenever the user does not have view privileges to group specified bygroupId_
-
getAdminUserCount
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
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 occursInvalidGroupException
- 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
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
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_
- usernamegroupId_
- 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
Determines if the specified user is a member of each of the specified groups.- Parameters:
username_
- usernamegroupUuid_
- 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
Determines if the specified user is a member of each of the specified groups.- Parameters:
usernames
- usernamesgroupId_
- 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
Determines if the specified user is a member of each of the specified groups.- Parameters:
usernames
- usernamesgroupUuid_
- 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
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 invalidPrivilegeGroupException
- if the user does not have rights to view the groupPrivilegeException
-
getDirectMemberUsernames
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 invalidPrivilegeGroupException
- if the user does not have rights to view the groupPrivilegeException
-
getDirectAdminGroupIds
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 invalidPrivilegeGroupException
- if the user does not have rights to view the groupPrivilegeException
-
getDirectAdminUsernames
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 invalidPrivilegeGroupException
- if the user does not have rights to view the groupPrivilegeException
-
suggest
- 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
@Deprecated ResolvedEmailAddresses resolveEmailAddress(LocalObject emailRecipient_) throws InvalidGroupException, InvalidUserException, PrivilegeException 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 validInvalidUserException
- if the recipient type is USER and the id is not validPrivilegeException
- if the user doesn't have rights to see the address
-
resolveEmailAddresses
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" fieldcc_
- the LocalObject[] representing email recipients for the "cc" fieldbcc_
- 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 ofnewGroupTypeId
- newGroupTypeId id of groupType to change group to- Throws:
PrivilegeException
- if user is not a SystemAdministrator-type userInvalidGroupException
- if groupId is invalidInvalidGroupTypeException
- 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 ofnewGroupTypeIds
- 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
-
findAdminGroupsPaging(com.appiancorp.suiteapi.personalization.GroupSearch, boolean, int, int, java.lang.Integer, java.lang.Integer)
instead