@Component public class GroupManagerImpl extends ManagerHelperImpl<Group> implements GroupManager
| Constructor and Description |
|---|
GroupManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(XInfo groupXinfo,
XInfo memberXinfo)
Add an ASSISTments Principal to a Group.
|
void |
deactivateGroup(XInfo groupXinfo)
Deactivate a Group.
|
Group |
getGroup(XInfo groupXinfo)
Returns a requested Group
|
java.util.List<XInfo> |
getOwnedGroups(java.lang.String appRef)
Returns a list of Groups owned by the specified application.
|
java.util.List<XInfo> |
getOwnedGroups(java.lang.String appRef,
XInfo ownerXinfo)
Returns a list of Groups owned by a user.
|
java.util.List<Group> |
getOwnedGroups(XInfo ownerXinfo)
Returns a list of Groups owned by a user.
|
java.util.List<XInfo> |
getParentGroups(XInfo memberXinfo)
Returns a list of Groups containing a specified member - be it a User or a Group member.
|
Group |
persist(Group group)
Creates a new Group for a particular application
|
Group |
persist(java.lang.String groupName,
User groupOwner) |
void |
removeMember(XInfo groupXinfo,
XInfo memberXinfo)
Removes an ASSISTments Principal from a Group.
|
void |
renameGroup(XInfo xinfo,
java.lang.String newName)
Renames a Group.
|
(package private) GroupRow |
toGroupRow(Group g) |
createExternalReferenceFor@Transactional public Group persist(java.lang.String groupName, User groupOwner)
persist in interface GroupManagerpublic Group persist(Group group)
GroupManager
If group does not contain a name, the SDK generates one.
If group contains members, those are
persist in interface GroupManager@Transactional public Group getGroup(XInfo groupXinfo)
GroupManagergetGroup in interface GroupManagergroupXinfo - A Group's external identifier informationpublic void renameGroup(XInfo xinfo, java.lang.String newName)
GroupManagerrenameGroup in interface GroupManagerxinfo - A Group's external identifier informationnewName - Group's new namepublic void addMember(XInfo groupXinfo, XInfo memberXinfo)
GroupManageraddMember in interface GroupManagergroupXinfo - Target Group's external identifier informationmemberXinfo - External identifier information of the member to addpublic void removeMember(XInfo groupXinfo, XInfo memberXinfo) throws java.lang.IllegalArgumentException
GroupManagerremoveMember in interface GroupManagergroupXinfo - Target Group's external identifier informationmemberXinfo - External identifier information of the member to removejava.lang.IllegalArgumentExceptionpublic void deactivateGroup(XInfo groupXinfo)
GroupManagerFirst deactivates all memberships of the Group, then deactivates the Group itself. Next deactivates the Group's membership in all other Groups.
deactivateGroup() does NOT recursively deactivate child Groups. To accomplish that, call this method explicitly for member Groups.
deactivateGroup in interface GroupManagergroupXinfo - A Group's external identifier informationpublic java.util.List<XInfo> getOwnedGroups(java.lang.String appRef)
GroupManagergetOwnedGroups in interface GroupManagerappRef - The partner application's external referencepublic java.util.List<XInfo> getOwnedGroups(java.lang.String appRef, XInfo ownerXinfo)
GroupManagergetOwnedGroups in interface GroupManagerappRef - The partner application's external referenceownerXinfo - The owner's external identifier information (a user)public java.util.List<Group> getOwnedGroups(XInfo ownerXinfo)
GroupManagergetOwnedGroups in interface GroupManagerownerXinfo - The owner's external identifier information (a user)public java.util.List<XInfo> getParentGroups(XInfo memberXinfo)
GroupManagergetParentGroups in interface GroupManagermemberXinfo - The member's external identifier information