Interface GroupMgr
-
- All Superinterfaces:
Manageable
- All Known Implementing Classes:
GroupMgrImpl
,GroupMgrRestImpl
public interface GroupMgr extends Manageable
This interface prescribes CRUD methods used to manage groups stored within the ldap directory.This class is thread safe.
- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Group
add(Group group)
Create a new group node.,Group
add(Group group, String key, String value)
Add a property to an existing group node.Group
assign(Group group, String member)
Assign a user to an existing group node.Group
deassign(Group group, String member)
Deassign a member from an existing group node.Group
delete(Group group)
Delete existing group node.Group
delete(Group group, String key, String value)
Delete existing group node.List<Group>
find(Group group)
Search using a full or partial group node.List<Group>
find(User user)
Search for groups by userId.List<UserRole>
groupRoles(Group group)
Read an existing group node's roles.Group
read(Group group)
Read an existing group node.List<Group>
roleGroups(Role role)
Search for groups by role name.Group
update(Group group)
Modify existing group node.-
Methods inherited from interface org.apache.directory.fortress.core.Manageable
setAdmin, setContextId
-
-
-
-
Method Detail
-
add
Group add(Group group) throws SecurityException
Create a new group node.,- Parameters:
group
- containsGroup
.- Returns:
Group
containing entity just added.- Throws:
SecurityException
- in the event system error.
-
update
Group update(Group group) throws SecurityException
Modify existing group node. The name is required. Does not update members or properties. Useadd( Group group, String key, String value )
,delete( Group group, String key, String value )
,assign( Group group, String member)
, ordeassign( Group group, String member)
for multivalued attributes.- Parameters:
group
- containsGroup
.- Returns:
Group
containing entity just modified.- Throws:
SecurityException
- in the event system error.
-
delete
Group delete(Group group) throws SecurityException
Delete existing group node. The name is required.- Parameters:
group
- containsGroup
.- Returns:
Group
containing entity just removed.- Throws:
SecurityException
- in the event system error.
-
add
Group add(Group group, String key, String value) throws SecurityException
Add a property to an existing group node. Must have a name and at least one member.- Parameters:
group
- containsGroup
.key
- contains the property key.value
- contains contains the property value.- Returns:
Group
containing entity just modified.- Throws:
SecurityException
- in the event system error.
-
delete
Group delete(Group group, String key, String value) throws SecurityException
Delete existing group node. The name is required.- Parameters:
group
- containsGroup
.key
- contains the property key.value
- contains contains the property value.- Returns:
Group
containing entity just modified.- Throws:
SecurityException
- in the event system error.
-
read
Group read(Group group) throws SecurityException
Read an existing group node. The name is required.- Parameters:
group
- containsGroup
with name field set with an existing group name.- Returns:
Group
containing entity found.- Throws:
SecurityException
- in the event system error.
-
find
List<Group> find(Group group) throws SecurityException
Search using a full or partial group node. The name is required.- Parameters:
group
- containsGroup
.- Returns:
- List of type
Group
containing entities found. - Throws:
SecurityException
- in the event system error.
-
find
List<Group> find(User user) throws SecurityException
Search for groups by userId. Member (maps to userId) and is required.- Parameters:
user
- contains userId that maps to Group member attribute.- Returns:
Group
containing entity just added.- Throws:
SecurityException
- in the event system error.
-
roleGroups
List<Group> roleGroups(Role role) throws SecurityException
Search for groups by role name. Member (maps to role name) is required.- Parameters:
role
- contains userId that maps to Group member attribute.- Returns:
Group
containing entity just added.- Throws:
SecurityException
- in the event system error.
-
groupRoles
List<UserRole> groupRoles(Group group) throws SecurityException
Read an existing group node's roles. The name is required.- Parameters:
group
- containsGroup
with name field set with an existing group name.- Returns:
- list of
UserRole
for given group. Will return empty list if Group has no roles assigned. - Throws:
SecurityException
- in the event system error.
-
assign
Group assign(Group group, String member) throws SecurityException
Assign a user to an existing group node. The group name and member are required.- Parameters:
group
- containsGroup
.member
- is the relative distinguished name (rdn) of an existing user in ldap.- Returns:
Group
containing entity to assign.- Throws:
SecurityException
- in the event entry already present or other system error.
-
deassign
Group deassign(Group group, String member) throws SecurityException
Deassign a member from an existing group node. The group name and member are required.- Parameters:
group
- containsGroup
.member
- is the relative distinguished name (rdn) of an existing user in ldap.- Returns:
Group
containing entity to deassign- Throws:
SecurityException
- in the event entry already present or other system error.
-
-