|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GroupManager
Describes the service interface for managing groups.
Group hierarchy elements are being returned as a Groupcollection.
The backing implementation must appropriately map the group hierarchy to a
preferences sub-tree.
The convention {principal}.{subprincipal} has been chosen to name groups hierachies. Implementation follow the conventions enforced by the Preferences API.
| Method Summary | |
|---|---|
void |
addGroup(String groupFullPathName)
Add a new group. |
void |
addUserToGroup(String username,
String groupFullPathName)
Add a user to a group. |
Group |
getGroup(String groupFullPathName)
Get a group Groupfor a given group full path name. |
Iterator |
getGroups(String filter)
Get all groups available from all group handlers |
Collection |
getGroupsForUser(String username)
A collection of Groupfor all the groups associated to a specific
user. |
Collection |
getGroupsInRole(String roleFullPathName)
A collection of Groupfor all the groups in a specific role. |
boolean |
groupExists(String groupFullPathName)
Whether or not a group exists. |
boolean |
isUserInGroup(String username,
String groupFullPathName)
Whether or not a user is in a group. |
void |
removeGroup(String groupFullPathName)
Remove a group. |
void |
removeUserFromGroup(String username,
String groupFullPathName)
Remove a user from a group. |
void |
setGroupEnabled(String groupFullPathName,
boolean enabled)
Enable or disable a group. |
| Method Detail |
|---|
void addGroup(String groupFullPathName)
throws SecurityException
Add a new group.
Group principal names are expressed as {principal}.{subprincipal} where "." is the separator expressing the hierarchical nature of a group.
Group principal path names are stored leveraging the Preferences
api. Groups will be stored under /group/theGroupName/theGroupNameChild
when given the full path name theGroupName.theGroupNameChild.
groupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild).
Throws - a security exception.
SecurityException
void removeGroup(String groupFullPathName)
throws SecurityException
Remove a group.
Group principal names are expressed as {principal}.{subprincipal} where "." is the separator expressing the hierarchical nature of a group.
Group principal path names are stored leveraging the Preferences
api. Groups will be stored under /group/theGroupName/theGroupNameChild
when given the full path name theGroupName.theGroupNameChild.
groupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild)
Throws - a security exception.
SecurityExceptionboolean groupExists(String groupFullPathName)
Whether or not a group exists.
groupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild)
Group getGroup(String groupFullPathName)
throws SecurityException
Get a group Groupfor a given group full path name.
groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
Preferencesnode.
Throws - security exception if the group does not exist.
SecurityException
Collection getGroupsForUser(String username)
throws SecurityException
A collection of Groupfor all the groups associated to a specific
user.
username - The user name.
Group.
Throws - security exception if the user does not exist.
SecurityException
Collection getGroupsInRole(String roleFullPathName)
throws SecurityException
A collection of Groupfor all the groups in a specific role.
roleFullPathName - The role full path (e.g.
theRoleName.theRoleChildName)..
Group.
Throws - a security exception if the role does not exist.
SecurityException
void addUserToGroup(String username,
String groupFullPathName)
throws SecurityException
Add a user to a group.
username - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
Throws - a security exception.
SecurityException
void removeUserFromGroup(String username,
String groupFullPathName)
throws SecurityException
Remove a user from a group.
username - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
Throws - a security exception.
SecurityException
boolean isUserInGroup(String username,
String groupFullPathName)
throws SecurityException
Whether or not a user is in a group.
username - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
Throws - security exception if the user or group does not exist.
SecurityException
Iterator getGroups(String filter)
throws SecurityException
filter - The filter used to retrieve matching groups.
Principal
SecurityException
void setGroupEnabled(String groupFullPathName,
boolean enabled)
throws SecurityException
groupFullPathName - The group name full path
theGroupName.theGroupChildName).enabled - enabled flag for the group
SecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||