com.opensymphony.user.provider.crowd
Class EmbeddedCrowdAccessProvider

java.lang.Object
  extended by com.opensymphony.user.provider.crowd.EmbeddedCrowdAbstractProvider
      extended by com.opensymphony.user.provider.crowd.EmbeddedCrowdAccessProvider
All Implemented Interfaces:
AccessProvider, UserProvider, Serializable

public class EmbeddedCrowdAccessProvider
extends EmbeddedCrowdAbstractProvider
implements AccessProvider

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.opensymphony.user.provider.crowd.EmbeddedCrowdAbstractProvider
logger
 
Constructor Summary
EmbeddedCrowdAccessProvider()
           
 
Method Summary
 boolean addToGroup(String userName, String groupName)
          Add user to group.
 boolean create(String name)
          Create new Entity with given name.
 void flushCaches()
          Flush the providers caches - if it is caching.
 boolean handles(String name)
          Determine whether this UserProvider implementation is responsible for handling this Entity.
 boolean inGroup(String userName, String groupName)
          Find out whether given user is member of given group.
 List<String> list()
          Returns List of names (Strings) of all Entities that can be accessed by this UserProvider If this UserProvider cannot retrieve a list of names, null is to be returned.
 List<String> listGroupsContainingUser(String userName)
          List all groups that contain a user.
 List<String> listUsersInGroup(String groupName)
          List all users that are contained within a group.
 boolean remove(String name)
          Remove Entity with given name.
 boolean removeFromGroup(String userName, String groupName)
          Remove user from group.
 
Methods inherited from class com.opensymphony.user.provider.crowd.EmbeddedCrowdAbstractProvider
getCrowdService, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opensymphony.user.provider.UserProvider
init
 

Constructor Detail

EmbeddedCrowdAccessProvider

public EmbeddedCrowdAccessProvider()
Method Detail

addToGroup

public boolean addToGroup(String userName,
                          String groupName)
Description copied from interface: AccessProvider
Add user to group.

Specified by:
addToGroup in interface AccessProvider
Returns:
Whether user was successfully added to group.

create

public boolean create(String name)
Description copied from interface: UserProvider
Create new Entity with given name.

Specified by:
create in interface UserProvider
Overrides:
create in class EmbeddedCrowdAbstractProvider
Returns:
Whether entity was successfully created.

flushCaches

public void flushCaches()
Description copied from interface: UserProvider
Flush the providers caches - if it is caching. Providers may implement their own caching strategies. This method merely indicates to the provider that it should flush it's caches now.

Specified by:
flushCaches in interface UserProvider
Overrides:
flushCaches in class EmbeddedCrowdAbstractProvider

handles

public boolean handles(String name)
Description copied from interface: UserProvider
Determine whether this UserProvider implementation is responsible for handling this Entity.

Specified by:
handles in interface UserProvider

inGroup

public boolean inGroup(String userName,
                       String groupName)
Description copied from interface: AccessProvider
Find out whether given user is member of given group.

Specified by:
inGroup in interface AccessProvider
Returns:
Whether user is member of group.

list

public List<String> list()
Description copied from interface: UserProvider
Returns List of names (Strings) of all Entities that can be accessed by this UserProvider If this UserProvider cannot retrieve a list of names, null is to be returned. If there are no current Entities stored by this provider, an empty List is to be returned. The order of names returned can be determined by the UserProvider (it may or may not be relevant). This List should be immutable.

Specified by:
list in interface UserProvider
Overrides:
list in class EmbeddedCrowdAbstractProvider

listGroupsContainingUser

public List<String> listGroupsContainingUser(String userName)
Description copied from interface: AccessProvider
List all groups that contain a user.

Specified by:
listGroupsContainingUser in interface AccessProvider
Returns:
List containing Strings of groupnames. If no groups found, empty list should be returned. If feature not supported by UserProvider, null shall be returned. This List should be immutable.

listUsersInGroup

public List<String> listUsersInGroup(String groupName)
Description copied from interface: AccessProvider
List all users that are contained within a group.

Specified by:
listUsersInGroup in interface AccessProvider
Returns:
List containing Strings of usernames. If no users found, empty list should be returned. If feature not supported by UserProvider, null shall be returned. This List should be immutable.

remove

public boolean remove(String name)
Description copied from interface: UserProvider
Remove Entity with given name.

Specified by:
remove in interface UserProvider
Overrides:
remove in class EmbeddedCrowdAbstractProvider
Returns:
Whether entity was successfully removed.

removeFromGroup

public boolean removeFromGroup(String userName,
                               String groupName)
Description copied from interface: AccessProvider
Remove user from group.

Specified by:
removeFromGroup in interface AccessProvider
Returns:
Whether user was successfully removed from group.


Copyright © 2002-2011 Atlassian. All Rights Reserved.