|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.impl.GroupManagerImpl
public class GroupManagerImpl
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
PreferencesAPI.
| Constructor Summary | |
|---|---|
GroupManagerImpl(SecurityProvider securityProvider)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroupManagerImpl(SecurityProvider securityProvider)
securityProvider - The security provider.| Method Detail |
|---|
public void addGroup(java.lang.String groupFullPathName)
throws SecurityException
GroupManagerAdd 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.
addGroup in interface GroupManagergroupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild).
SecurityExceptionGroupManager.addGroup(java.lang.String)
public void removeGroup(java.lang.String groupFullPathName)
throws SecurityException
GroupManagerRemove 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.
removeGroup in interface GroupManagergroupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild)
SecurityExceptionGroupManager.removeGroup(java.lang.String)public boolean groupExists(java.lang.String groupFullPathName)
GroupManagerWhether or not a group exists.
groupExists in interface GroupManagergroupFullPathName - The group name full path (e.g.
theGroupName.theGroupNameChild)
GroupManager.groupExists(java.lang.String)
public Group getGroup(java.lang.String groupFullPathName)
throws SecurityException
GroupManager
Get a group Groupfor a given group full path name.
getGroup in interface GroupManagergroupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
Preferencesnode.
SecurityExceptionGroupManager.getGroup(java.lang.String)
public java.util.Collection getGroupsForUser(java.lang.String username)
throws SecurityException
GroupManager
A collection of Groupfor all the groups associated to a specific
user.
getGroupsForUser in interface GroupManagerusername - The user name.
Group.
SecurityExceptionGroupManager.getGroupsForUser(java.lang.String)
public java.util.Collection getGroupsInRole(java.lang.String roleFullPathName)
throws SecurityException
GroupManager
A collection of Groupfor all the groups in a specific role.
getGroupsInRole in interface GroupManagerroleFullPathName - The role full path (e.g.
theRoleName.theRoleChildName)..
Group.
SecurityExceptionGroupManager.getGroupsInRole(java.lang.String)
public void addUserToGroup(java.lang.String username,
java.lang.String groupFullPathName)
throws SecurityException
GroupManagerAdd a user to a group.
addUserToGroup in interface GroupManagerusername - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityExceptionGroupManager.addUserToGroup(java.lang.String,
java.lang.String)
public void removeUserFromGroup(java.lang.String username,
java.lang.String groupFullPathName)
throws SecurityException
GroupManagerRemove a user from a group.
removeUserFromGroup in interface GroupManagerusername - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityExceptionGroupManager.removeUserFromGroup(java.lang.String,
java.lang.String)
public boolean isUserInGroup(java.lang.String username,
java.lang.String groupFullPathName)
throws SecurityException
GroupManagerWhether or not a user is in a group.
isUserInGroup in interface GroupManagerusername - The user name.groupFullPathName - The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityExceptionGroupManager.isUserInGroup(java.lang.String,
java.lang.String)
public java.util.Iterator getGroups(java.lang.String filter)
throws SecurityException
GroupManager
getGroups in interface GroupManagerfilter - The filter used to retrieve matching groups.
Principal
SecurityExceptionGroupManager.getGroups(java.lang.String)
public void setGroupEnabled(java.lang.String groupFullPathName,
boolean enabled)
throws SecurityException
GroupManager
setGroupEnabled in interface GroupManagergroupFullPathName - The group name full path
theGroupName.theGroupChildName).enabled - enabled flag for the group
SecurityExceptionGroupManager.setGroupEnabled(java.lang.String, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||