|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GroupService
Service that provides methods to manage lifecycle of a group within SAS Drug Development.
A group is a collection of principals (users or other groups) and may be identified by a
name and context. Group is associated with and scoped to a context where it is defined.
Group contexts are objects that are implement the GroupContext interface. See
GroupContext
. Examples of group contexts are Organization, Project and Analysis.
Method Summary | |
---|---|
Group |
createGroup(GroupContext groupContext,
String groupName,
String groupDescription,
Set<Principal> members)
Create a new group. |
void |
deleteGroup(GroupDescriptor groupDescriptor)
Delete a group. |
Set<GroupDescriptor> |
getAllGroupsByMember(Principal member)
Get all groups that have the specified principal as a member. |
Group |
getGroup(GroupDescriptor groupDescriptor)
Get the client representation of a group given its descriptor. |
Group |
getGroupByIdentifier(String identifier)
Get the client representation of a group given its identifier. |
Group |
getGroupByName(GroupContext groupContext,
String name)
Get the client representation of a group given its name and context.. |
GroupDescriptor |
getGroupDescriptorByIdentifier(String identifier)
Get the light-weight representation of a group given its identifier. |
Set<GroupDescriptor> |
getGroupDescriptors(GroupContext groupContext)
Get the light-weight representation of all groups defined in a given context |
Set<GroupDescriptor> |
getGroupDescriptorsByIdentifiers(Set<String> identifiers)
Get the light-weight representation of a group given its identifier. |
Set<Group> |
getGroups(GroupContext groupContext)
Get all the groups defined in a given context |
Set<Group> |
getGroupsByIdentifiers(Set<String> identifiers)
Get all the groups specified by the list of identifiers |
Set<GroupDescriptor> |
getGroupsByMember(GroupContext groupContext,
Principal member)
Get all groups in a given context that have the specified principal as a member. |
boolean |
groupExists(GroupContext groupContext,
String name)
Does a group exist? |
void |
removeFromGroupContextGroups(GroupContext groupContext,
Set<Principal> members)
Remove the specified members from all groups in a specific context. |
void |
removeFromGroups(Principal member)
Remove the specified member from all groups. |
Group |
updateGroup(Group group)
Update the definition of an existing group. |
Method Detail |
---|
Group createGroup(GroupContext groupContext, String groupName, String groupDescription, Set<Principal> members) throws GroupContextNotFoundException, GroupExistsException, PrincipalNotFoundException
groupContext
- The context of the groupgroupName
- The name of the group.groupDescription
- Description of this group.members
- The members of this group.
GroupContextNotFoundException
- The specified context could not be found.
GroupExistsException
- A group by this name already exists in the provided context.
PrincipalNotFoundException
- Some principal in the membership list could not be found on the server.Group updateGroup(Group group) throws GroupNotFoundException, GroupExistsException, PrincipalNotFoundException
group
- the group to update
GroupNotFoundException
- The group could not be found on the server.
GroupExistsException
- When a new name specified in the update request already exists for the context
PrincipalNotFoundException
- Some principal in the updated membership list could not be found on the server.void deleteGroup(GroupDescriptor groupDescriptor) throws GroupNotFoundException
groupDescriptor
- the group to delete
GroupNotFoundException
- Thrown when the group to be deleted could not be found.void removeFromGroups(Principal member)
member
- the member to remove from all groups.void removeFromGroupContextGroups(GroupContext groupContext, Set<Principal> members)
groupContext
- The context of the groups that should be modified.members
- The members to remove from those modified groups.boolean groupExists(GroupContext groupContext, String name)
groupContext
- The context of the group.name
- The name of the group.
Group getGroup(GroupDescriptor groupDescriptor) throws GroupNotFoundException
groupDescriptor
- the descriptor of the desired group.
GroupNotFoundException
- The specified group could not be found.Group getGroupByIdentifier(String identifier) throws GroupNotFoundException
identifier
- the identifier of the desired group.
GroupNotFoundException
- The specified group could not be found.Group getGroupByName(GroupContext groupContext, String name) throws GroupNotFoundException
groupContext
- the context of the groupname
- the name of the group
GroupNotFoundException
- The specified group could not be found.GroupDescriptor getGroupDescriptorByIdentifier(String identifier) throws GroupNotFoundException
identifier
- the identifier of the desired group
GroupNotFoundException
- The specified group could not be found.Set<GroupDescriptor> getGroupDescriptorsByIdentifiers(Set<String> identifiers)
identifiers
- the identifiers of the desired groups
Set<Group> getGroups(GroupContext groupContext)
groupContext
- the context of the desired groups
Set<GroupDescriptor> getGroupDescriptors(GroupContext groupContext)
groupContext
- the context of the desired groups
Set<Group> getGroupsByIdentifiers(Set<String> identifiers)
identifiers
- the identifiers of the desired groups
Set<GroupDescriptor> getAllGroupsByMember(Principal member)
member
- the principal in question
Set<GroupDescriptor> getGroupsByMember(GroupContext groupContext, Principal member) throws GroupContextNotFoundException
groupContext
- the context to searchmember
- the principal in question
GroupContextNotFoundException
- Thrown when the specified context could not be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |