com.opensymphony.user.provider.crowd
Class EmbeddedCrowdAbstractProvider

java.lang.Object
  extended by com.opensymphony.user.provider.crowd.EmbeddedCrowdAbstractProvider
All Implemented Interfaces:
UserProvider, Serializable
Direct Known Subclasses:
EmbeddedCrowdAccessProvider, EmbeddedCrowdCredentialsProvider, EmbeddedCrowdProfileProvider

public abstract class EmbeddedCrowdAbstractProvider
extends Object
implements UserProvider

See Also:
Serialized Form

Field Summary
protected  org.slf4j.Logger logger
           
 
Constructor Summary
EmbeddedCrowdAbstractProvider()
           
 
Method Summary
 boolean create(String name)
          Create new Entity with given name.
 void flushCaches()
          Flush the providers caches - if it is caching.
protected  com.atlassian.crowd.embedded.api.CrowdService getCrowdService()
          Get a fresh version of the Crowd Read Write service from pico.
 boolean init(Properties properties)
          Called by UserManager before any other method.
 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.
 boolean remove(String name)
          Remove Entity with given name.
 
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
handles
 

Field Detail

logger

protected final org.slf4j.Logger logger
Constructor Detail

EmbeddedCrowdAbstractProvider

public EmbeddedCrowdAbstractProvider()
Method Detail

getCrowdService

protected com.atlassian.crowd.embedded.api.CrowdService getCrowdService()
Get a fresh version of the Crowd Read Write service from pico. This is done because UserManager is a singleton and otherwise may cache a stale version, especially in func tests.

Returns:
fresh version of the Crowd Read Write service from pico.

create

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

Specified by:
create in interface UserProvider
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

init

public boolean init(Properties properties)
Description copied from interface: UserProvider
Called by UserManager before any other method. Allows for UserProvider specific initialization.

Specified by:
init in interface UserProvider
Parameters:
properties - Extra properties passed across by UserManager.

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

remove

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

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


Copyright © 2002-2011 Atlassian. All Rights Reserved.