|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.impl.ReadOnlyGroupManager
public abstract class ReadOnlyGroupManager
| Constructor Summary | |
|---|---|
ReadOnlyGroupManager()
|
|
| Method Summary | |
|---|---|
void |
addMembership(Group group,
User user)
Adds the user to the specified group. |
Group |
createGroup(String groupName)
Create a new group with the specified name. |
List<Group> |
getWritableGroups()
Gets all editable groups. |
boolean |
isCreative()
Used to detemine whether an entity can be added (eg, can call UserManager.createUser(String)
orGroupManager.createGroup(String) |
boolean |
isReadOnly(Group group)
Returns true if the specified group and membership of the
specified group cannot be modified in the repository. |
void |
removeGroup(Group group)
Remove the group specified, if it exists in this repository. |
void |
removeMembership(Group group,
User user)
Removes the user from the specified group. |
void |
saveGroup(Group group)
|
boolean |
supportsExternalMembership()
Returns true if the repository supports users in other
repositories being members of groups in this repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.user.GroupManager |
|---|
getExternalMemberNames, getGroup, getGroups, getGroups, getLocalMemberNames, getMemberNames, hasMembership |
| Methods inherited from interface com.atlassian.user.EntityManager |
|---|
getIdentifier, getRepository |
| Constructor Detail |
|---|
public ReadOnlyGroupManager()
| Method Detail |
|---|
public List<Group> getWritableGroups()
GroupManager
getWritableGroups in interface GroupManagerGroups that can be edited.
public Group createGroup(String groupName)
throws EntityException
GroupManager
createGroup in interface GroupManagerDuplicateEntityException - if a group with the provided name already exists.
EntityException - if the Group could not be created.
public void removeGroup(Group group)
throws EntityException
GroupManagerIllegalArgumentException will be thrown.
If required to maintain the consistency of the repository, the group manager
should remove users from the group before removing the group itself.
removeGroup in interface GroupManagerEntityException - if the Group could not be removed.
public void saveGroup(Group group)
throws EntityException
EntityException
public void addMembership(Group group,
User user)
throws EntityException
GroupManagerGroupManager.supportsExternalMembership()
returns true, the user will be added as an external user.
addMembership in interface GroupManagerEntityException
public void removeMembership(Group group,
User user)
throws EntityException
GroupManager
removeMembership in interface GroupManagerEntityException - if the membership could not be removed.public boolean isCreative()
UserManager.createUser(String)
orGroupManager.createGroup(String)
isCreative in interface EntityManagerEntity objects can be created by this manager, or false to indicate
not.public boolean isReadOnly(Group group)
GroupManagertrue if the specified group and membership of the
specified group cannot be modified in the repository.
If this returns true, invoking methods which attempt to
modify the group or membership of the group will fail with
UnsupportedOperationException.
isReadOnly in interface GroupManager
public boolean supportsExternalMembership()
throws EntityException
GroupManagertrue if the repository supports users in other
repositories being members of groups in this repository.
Typically this is true of an application-specific Hibernate repository, but
not of a company's LDAP server. It is designed to allow the LDAP users to
be members of the application's groups for flexible application-level
security.
supportsExternalMembership in interface GroupManagerEntityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||