|
||||||||||
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.
Method Summary | |
---|---|
Group |
addGroup(java.lang.String groupName)
Add a new group. |
Group |
addGroup(java.lang.String groupName,
boolean mapped)
Add a new group and optionally map/replicate it to an external storage manager (if configured). |
void |
addGroupToGroup(Group from,
Group to,
java.lang.String associationName)
Add a hierarchical association between two groups. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupName)
Add a user to a group. |
Group |
getGroup(java.lang.String groupName)
Get a group Group for a given group name. |
java.util.List<java.lang.String> |
getGroupNames(java.lang.String nameFilter)
Retrieves a detached and modifiable List of group names, finding groups matching the corresponding group name filter. |
java.util.List<Group> |
getGroups(java.lang.String nameFilter)
Retrieves a detached and modifiable Group list matching the corresponding
group name filter. |
java.util.List<Group> |
getGroupsAssociatedFrom(Group from,
java.lang.String associationName)
Retrieve all the groups which are associated from the provided group. |
java.util.List<Group> |
getGroupsAssociatedTo(Group to,
java.lang.String associationName)
Retrieve all the groups which are associated to the provided group. |
java.util.List<Group> |
getGroupsForUser(java.lang.String username)
Retrieves a detached and modifiable Group list of all the groups associated to a specific
user. |
java.util.List<Group> |
getGroupsInRole(java.lang.String roleName)
Retrieves a detached and modifiable Group list of all the groups in a specific role. |
boolean |
groupExists(java.lang.String groupName)
Whether or not a group exists. |
boolean |
isUserInGroup(java.lang.String username,
java.lang.String groupName)
Whether or not a user is in a group. |
Group |
newGroup(java.lang.String name,
boolean mapped)
|
Group |
newTransientGroup(java.lang.String name)
|
void |
removeGroup(java.lang.String groupName)
Remove a group. |
void |
removeGroupFromGroup(Group from,
Group to,
java.lang.String associationName)
Remove a hierarchical association between two groups. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
Remove a user from a group. |
void |
updateGroup(Group group)
Updates a group and all its attributes |
Methods inherited from interface org.apache.jetspeed.security.PrincipalTypeManager |
---|
getPrincipalManager, getPrincipalType |
Method Detail |
---|
Group newGroup(java.lang.String name, boolean mapped)
Group newTransientGroup(java.lang.String name)
Group addGroup(java.lang.String groupName) throws SecurityException
Add a new group.
If an external security storage manager is used, the group will be mapped/replicated to it as well.
groupName
- The group name
Group
Throws
- a security exception.
SecurityException
Group addGroup(java.lang.String groupName, boolean mapped) throws SecurityException
Add a new group and optionally map/replicate it to an external storage manager (if configured).
groupName
- The group namemapped
- if the new Group should be mapped/replicated to an external security storage manager (if used) or not.
Group
Throws
- a security exception.
SecurityException
void removeGroup(java.lang.String groupName) throws SecurityException
Remove a group.
groupName
- The group name
Throws
- a security exception.
SecurityException
boolean groupExists(java.lang.String groupName)
Whether or not a group exists.
groupName
- The group name
Group getGroup(java.lang.String groupName) throws SecurityException
Get a group Group
for a given group name.
groupName
-
Group
Throws
- security exception if the group does not exist.
SecurityException
java.util.List<Group> getGroupsForUser(java.lang.String username) throws SecurityException
Retrieves a detached and modifiable Group
list of 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.List<Group> getGroupsInRole(java.lang.String roleName) throws SecurityException
Retrieves a detached and modifiable Group
list of all the groups in a specific role.
roleName
- The role name
Group
.
Throws
- a security exception if the role does not exist.
SecurityException
void addUserToGroup(java.lang.String username, java.lang.String groupName) throws SecurityException
Add a user to a group.
username
- The user name.groupName
- The group name
Throws
- a security exception.
SecurityException
void removeUserFromGroup(java.lang.String username, java.lang.String groupName) throws SecurityException
Remove a user from a group.
username
- The user name.groupName
- The group name
Throws
- a security exception.
SecurityException
boolean isUserInGroup(java.lang.String username, java.lang.String groupName) throws SecurityException
Whether or not a user is in a group.
username
- The user name.groupName
- The group name
Throws
- security exception if the user or group does not exist.
SecurityException
java.util.List<Group> getGroups(java.lang.String nameFilter) throws SecurityException
Group
list matching the corresponding
group name filter.
nameFilter
- The filter used to retrieve matching groups.
Group
SecurityException
java.util.List<java.lang.String> getGroupNames(java.lang.String nameFilter) throws SecurityException
Retrieves a detached and modifiable List of group names, finding groups matching the corresponding group name filter.
nameFilter
- The filter used to retrieve matching groups.
SecurityException
void updateGroup(Group group) throws SecurityException
group
-
SecurityException
void addGroupToGroup(Group from, Group to, java.lang.String associationName) throws SecurityException
Default supported hierarchical associations are JetspeedPrincipalAssociationType.IS_A
and
JetspeedPrincipalAssociationType.IS_PART_OF
, but it will depend on the actual runtime configuration
if the required JetspeedPrincipalAssociationType
is available.
from
- The group for the from side of the associationto
- The group for the to side of the associationassociationName
- The name of the JetspeedAssociationType
to create
SecurityException
void removeGroupFromGroup(Group from, Group to, java.lang.String associationName) throws SecurityException
Default supported hierarchical associations are JetspeedPrincipalAssociationType.IS_A
and
JetspeedPrincipalAssociationType.IS_PART_OF
, but it will depend on the actual runtime configuration
if the required JetspeedPrincipalAssociationType
is available.
from
- The group for the from side of the associationto
- The group for the to side of the associationassociationName
- The name of the JetspeedAssociationType
to create
SecurityException
java.util.List<Group> getGroupsAssociatedTo(Group to, java.lang.String associationName)
Default supported hierarchical associations are JetspeedPrincipalAssociationType.IS_A
and
JetspeedPrincipalAssociationType.IS_PART_OF
, but it will depend on the actual runtime configuration
if the required JetspeedPrincipalAssociationType
is available.
If the corresponding JetspeedPrincipalAssociationType
is not available, this method will simply
return a empty list.
For a JetspeedPrincipalAssociationType.IS_PART_OF
association, this will return all
the nested groups which together represent the provided group.
For a JetspeedPrincipalAssociationType.IS_A
association, this will return all
the groups which extend the provided group.
Note: this method will only return the directly associated groups, not further derived associations.
to
- The group for the to side of the associationassociationName
- The name of the JetspeedAssociationType
to createjava.util.List<Group> getGroupsAssociatedFrom(Group from, java.lang.String associationName)
Default supported hierarchical associations are JetspeedPrincipalAssociationType.IS_A
and
JetspeedPrincipalAssociationType.IS_PART_OF
, but it will depend on the actual runtime configuration
if the required JetspeedPrincipalAssociationType
is available.
If the corresponding JetspeedPrincipalAssociationType
is not available, this method will simply
return a empty list.
For a JetspeedPrincipalAssociationType.IS_PART_OF
association, this will return (at most)
the single group where the provided group is part of.
For a JetspeedPrincipalAssociationType.IS_A
association, this will return all
the groups which the provided group extends.
Note: this method will only return the directly associated group(s), not further derived associations.
from
- The group for the from side of the associationassociationName
- The name of the JetspeedAssociationType
to create
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |