|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.user.impl.ReadOnlyGroupManager
Constructor Summary | |
ReadOnlyGroupManager()
|
Method Summary | |
void |
addMembership(Group group,
User user)
Adds the user to the specified group. |
Group |
createGroup(java.lang.String groupName)
Create a new group with the specified name. |
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 Group createGroup(java.lang.String groupName) throws EntityException
GroupManager
createGroup
in interface GroupManager
EntityException
- if the Group
could not be created.public void removeGroup(Group group) throws EntityException
GroupManager
IllegalArgumentException
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 GroupManager
EntityException
- if the Group
could not be removed.public void saveGroup(Group group) throws EntityException
EntityException
public void addMembership(Group group, User user) throws EntityException
GroupManager
GroupManager.supportsExternalMembership()
returns true
, the user will be added as an external user.
addMembership
in interface GroupManager
EntityException
public void removeMembership(Group group, User user) throws EntityException
GroupManager
removeMembership
in interface GroupManager
EntityException
- if the membership could not be removed.public boolean isCreative()
UserManager.createUser(String)
orGroupManager.createGroup(String)
isCreative
in interface EntityManager
Entity
objects can be created by this manager, or false to indicate
not.public boolean isReadOnly(Group group)
GroupManager
true
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
GroupManager
true
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 GroupManager
EntityException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |