|
||||||||||
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 Group
collection.
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.
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 Group for 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 Group for all the groups associated to a specific
user. |
java.util.Collection |
getGroupsInRole(java.lang.String roleFullPathName)
A collection of Group for 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
GroupManager
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.
addGroup
in interface GroupManager
groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupNameChild).
SecurityException
GroupManager.addGroup(java.lang.String)
public void removeGroup(java.lang.String groupFullPathName) throws SecurityException
GroupManager
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.
removeGroup
in interface GroupManager
groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupNameChild)
SecurityException
GroupManager.removeGroup(java.lang.String)
public boolean groupExists(java.lang.String groupFullPathName)
GroupManager
Whether or not a group exists.
groupExists
in interface GroupManager
groupFullPathName
- 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 Group
for a given group full path name.
getGroup
in interface GroupManager
groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupChildName).
Preferences
node.
SecurityException
GroupManager.getGroup(java.lang.String)
public java.util.Collection getGroupsForUser(java.lang.String username) throws SecurityException
GroupManager
A collection of Group
for all the groups associated to a specific
user.
getGroupsForUser
in interface GroupManager
username
- The user name.
Group
.
SecurityException
GroupManager.getGroupsForUser(java.lang.String)
public java.util.Collection getGroupsInRole(java.lang.String roleFullPathName) throws SecurityException
GroupManager
A collection of Group
for all the groups in a specific role.
getGroupsInRole
in interface GroupManager
roleFullPathName
- The role full path (e.g.
theRoleName.theRoleChildName)..
Group
.
SecurityException
GroupManager.getGroupsInRole(java.lang.String)
public void addUserToGroup(java.lang.String username, java.lang.String groupFullPathName) throws SecurityException
GroupManager
Add a user to a group.
addUserToGroup
in interface GroupManager
username
- The user name.groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityException
GroupManager.addUserToGroup(java.lang.String,
java.lang.String)
public void removeUserFromGroup(java.lang.String username, java.lang.String groupFullPathName) throws SecurityException
GroupManager
Remove a user from a group.
removeUserFromGroup
in interface GroupManager
username
- The user name.groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityException
GroupManager.removeUserFromGroup(java.lang.String,
java.lang.String)
public boolean isUserInGroup(java.lang.String username, java.lang.String groupFullPathName) throws SecurityException
GroupManager
Whether or not a user is in a group.
isUserInGroup
in interface GroupManager
username
- The user name.groupFullPathName
- The group name full path (e.g.
theGroupName.theGroupChildName).
SecurityException
GroupManager.isUserInGroup(java.lang.String,
java.lang.String)
public java.util.Iterator getGroups(java.lang.String filter) throws SecurityException
GroupManager
getGroups
in interface GroupManager
filter
- The filter used to retrieve matching groups.
Principal
SecurityException
GroupManager.getGroups(java.lang.String)
public void setGroupEnabled(java.lang.String groupFullPathName, boolean enabled) throws SecurityException
GroupManager
setGroupEnabled
in interface GroupManager
groupFullPathName
- The group name full path
theGroupName.theGroupChildName).enabled
- enabled flag for the group
SecurityException
GroupManager.setGroupEnabled(java.lang.String, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |