public interface GroupManager
Group
objects.
NOTES & CAUTIONS: TODO TODO TODO: This belongs at the Manager package level
#persist(GroupBuilder)
, the returned Group
domain object contains
several ID values set there by the GroupManger. Those values include external information
(aka xinfo) contained in an XInfo
, available by calling XInfoImpl.getXinfo()
, as well
as an internal database ID. How to use (or not) those IDs:
ExternalReference
,
XInfo
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.
|
@Transactional Group persist(Group group)
If group does not contain a name, the SDK generates one.
If group contains members, those are
builder
- The Group to createxOwnerId
- The owner of the group@Transactional Group getGroup(XInfo groupXinfo)
groupXinfo
- A Group's external identifier information@Transactional void deactivateGroup(XInfo groupXinfo)
First 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.
groupXinfo
- A Group's external identifier informationvoid renameGroup(XInfo xinfo, java.lang.String newName)
xinfo
- A Group's external identifier informationnewName
- Group's new namevoid addMember(XInfo groupXinfo, XInfo memberXinfo)
groupXinfo
- Target Group's external identifier informationmemberXinfo
- External identifier information of the member to addvoid removeMember(XInfo groupXinfo, XInfo memberXinfo)
groupXinfo
- Target Group's external identifier informationmemberXinfo
- External identifier information of the member to removejava.util.List<XInfo> getOwnedGroups(java.lang.String appRef)
appRef
- The partner application's external referencejava.util.List<XInfo> getOwnedGroups(java.lang.String appRef, XInfo ownerXinfo)
appRef
- The partner application's external referenceownerXinfo
- The owner's external identifier information (a user)java.util.List<Group> getOwnedGroups(XInfo ownerXinfo)
ownerXinfo
- The owner's external identifier information (a user)java.util.List<XInfo> getParentGroups(XInfo memberXinfo)
memberXinfo
- The member's external identifier information