com.atlassian.crowd.directory.hybrid
Class LocalGroupHandler
java.lang.Object
com.atlassian.crowd.directory.hybrid.InternalGroupHandler
com.atlassian.crowd.directory.hybrid.LocalGroupHandler
public class LocalGroupHandler
- extends InternalGroupHandler
Manages local group creation and mutation.
A local group is an accessible group that does NOT exist
in LDAP. If local groups is enabled, then all mutation
operations execute on local groups.
Any group in the internal directory section of a
DbCachingRemoteDirectory
with the shadow attribute set to "false" is an local group.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalGroupHandler
public LocalGroupHandler(InternalRemoteDirectory internalDirectory)
findLocalGroup
public Group findLocalGroup(String groupName)
throws GroupNotFoundException,
OperationFailedException
- Finds a local group.
- Parameters:
groupName
- name of group.
- Returns:
- local group.
- Throws:
GroupNotFoundException
- local group with supplied name does not exist.
OperationFailedException
- underlying directory implementation failed to execute the operation.
createLocalGroup
public Group createLocalGroup(GroupTemplate groupTemplate)
throws InvalidGroupException,
OperationFailedException,
DirectoryNotFoundException
- Creates a local group with the supplied template.
NOTE: if a local group with the same name of groupTemplate already exists,
then the underlying directory may throw a ConstraintViolationException or the
like (in accordance with the InternalDirectory.addGroup implementations).
- Parameters:
groupTemplate
- group to add.
- Returns:
- added group.
- Throws:
InvalidGroupException
- group already exists, either as a local group or as a shadow, with the same name.
OperationFailedException
- underlying directory implementation failed to execute the operation.
DirectoryNotFoundException
updateLocalGroup
public Group updateLocalGroup(GroupTemplate groupTemplate)
throws OperationFailedException,
GroupNotFoundException,
ReadOnlyGroupException,
InvalidGroupException
- Updates a local group.
If the group found is shadow group or does not exist, a GroupNotFoundException will be thrown.
- Parameters:
groupTemplate
- group to update.
- Returns:
- updated group.
- Throws:
OperationFailedException
- underlying directory implementation failed to execute the operation.
GroupNotFoundException
ReadOnlyGroupException
InvalidGroupException
addUserToLocalGroup
public void addUserToLocalGroup(String username,
String groupName)
throws OperationFailedException,
GroupNotFoundException,
ReadOnlyGroupException,
UserNotFoundException
- Throws:
OperationFailedException
GroupNotFoundException
ReadOnlyGroupException
UserNotFoundException
addLocalGroupToLocalGroup
public void addLocalGroupToLocalGroup(String childGroup,
String parentGroup)
throws OperationFailedException,
InvalidMembershipException,
GroupNotFoundException,
ReadOnlyGroupException
- Throws:
OperationFailedException
InvalidMembershipException
GroupNotFoundException
ReadOnlyGroupException
removeUserFromLocalGroup
public void removeUserFromLocalGroup(String username,
String groupName)
throws OperationFailedException,
GroupNotFoundException,
MembershipNotFoundException,
ReadOnlyGroupException,
UserNotFoundException
- Throws:
OperationFailedException
GroupNotFoundException
MembershipNotFoundException
ReadOnlyGroupException
UserNotFoundException
removeLocalGroupFromLocalGroup
public void removeLocalGroupFromLocalGroup(String childGroup,
String parentGroup)
throws OperationFailedException,
InvalidMembershipException,
GroupNotFoundException,
MembershipNotFoundException,
ReadOnlyGroupException
- Throws:
OperationFailedException
InvalidMembershipException
GroupNotFoundException
MembershipNotFoundException
ReadOnlyGroupException
Copyright © 2012 Atlassian. All Rights Reserved.