|
||||||||||
| 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(java.lang.String groupFullPathName)
Add a new group. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupFullPathName)
Add a user to a group. |
Group |
getGroup(java.lang.String groupFullPathName)
Get a group Groupfor a given group full path name. |
java.util.Iterator |
getGroups(java.lang.String filter)
Get all groups available from all group handlers |
java.util.Collection |
getGroupsForUser(java.lang.String username)
A collection of Groupfor all the groups associated to a specific
user. |
java.util.Collection |
getGroupsInRole(java.lang.String roleFullPathName)
A collection of Groupfor all the groups in a specific role. |
boolean |
groupExists(java.lang.String groupFullPathName)
Whether or not a group exists. |
boolean |
isUserInGroup(java.lang.String username,
java.lang.String groupFullPathName)
Whether or not a user is in a group. |
void |
removeGroup(java.lang.String groupFullPathName)
Remove a group. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupFullPathName)
Remove a user from a group. |
void |
setGroupEnabled(java.lang.String groupFullPathName,
boolean enabled)
Enable or disable a group. |
| Method Detail |
|---|
void addGroup(java.lang.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(java.lang.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(java.lang.String groupFullPathName)
Whether or not a group exists.
groupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild)
Group getGroup(java.lang.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
java.util.Collection getGroupsForUser(java.lang.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
java.util.Collection getGroupsInRole(java.lang.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(java.lang.String username,
java.lang.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(java.lang.String username,
java.lang.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(java.lang.String username,
java.lang.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
java.util.Iterator getGroups(java.lang.String filter)
throws SecurityException
filter - The filter used to retrieve matching groups.
Principal
SecurityException
void setGroupEnabled(java.lang.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 | |||||||||