com.atlassian.crowd.integration.osuser
Class DelegatingProfileProvider

java.lang.Object
  extended by com.atlassian.crowd.integration.osuser.DelegatingProfileProvider
All Implemented Interfaces:
com.opensymphony.user.provider.ProfileProvider, com.opensymphony.user.provider.UserProvider, Serializable

public class DelegatingProfileProvider
extends Object
implements com.opensymphony.user.provider.ProfileProvider

Copyright 2007 Atlassian Software. All rights reserved.

See Also:
Serialized Form

Constructor Summary
DelegatingProfileProvider()
           
 
Method Summary
 boolean create(String name)
          Create new Entity with given name using first delegate and return the result value.
 void flushCaches()
          Flushes the caches on all providers.
 com.opensymphony.module.propertyset.PropertySet getPropertySet(String name)
          Creates new instance of PrioritizedCompositePropertySet that is instantiated with the same set of profile provides that this class holds.
 boolean handles(String name)
          Checks if the delegated profile providers handle the profile with given name.
 boolean init(Properties props)
          Initializes this provider.
 List list()
          Returns List of names (Strings) of all Entities that can be accessed by this UserProvider.
 boolean load(String name, com.opensymphony.user.Entity.Accessor accessor)
          Load Entity using the first delegate profile provider.
 boolean remove(String name)
          Remove Entity with given name using the first delegate profile provider.
 boolean store(String name, com.opensymphony.user.Entity.Accessor accessor)
          Stores changes to Entity using the first delegate profile provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingProfileProvider

public DelegatingProfileProvider()
Method Detail

getPropertySet

public com.opensymphony.module.propertyset.PropertySet getPropertySet(String name)
Creates new instance of PrioritizedCompositePropertySet that is instantiated with the same set of profile provides that this class holds.

Specified by:
getPropertySet in interface com.opensymphony.user.provider.ProfileProvider
Parameters:
name - name
Returns:
prioritized composite property set

flushCaches

public void flushCaches()
Flushes the caches on all providers.

Specified by:
flushCaches in interface com.opensymphony.user.provider.UserProvider

init

public boolean init(Properties props)
Initializes this provider. The given properties are parsed, providers are initialized and added to the internal list in order specified. This method fails fast if any of the specified provider cannot be initialized due to ClassNotFoundException, IllegalAccessException or InstantiationException. Any of these exceptions will cause a wrapping RuntimeException to be thrown.

Specified by:
init in interface com.opensymphony.user.provider.UserProvider
Parameters:
props - initialization properties
Returns:
true all providers were initialized

create

public boolean create(String name)
Create new Entity with given name using first delegate and return the result value.

Specified by:
create in interface com.opensymphony.user.provider.UserProvider
Returns:
Whether entity was successfully created using first delegate.

handles

public boolean handles(String name)
Checks if the delegated profile providers handle the profile with given name. Returns true if the first profile provider handles it, false otherwise.

Specified by:
handles in interface com.opensymphony.user.provider.UserProvider
Parameters:
name - profile name
Returns:
true if one of the delegated profile providers handles it, false otherwise

list

public List list()
Returns List of names (Strings) of all Entities that can be accessed by this UserProvider. If there are no current Entities stored by this provider, an empty List is returned. The returned List is immutable and does not conatain duplicate elements.

Specified by:
list in interface com.opensymphony.user.provider.UserProvider
Returns:
list of names of all entities that can be accessed

load

public boolean load(String name,
                    com.opensymphony.user.Entity.Accessor accessor)
Load Entity using the first delegate profile provider.

Specified by:
load in interface com.opensymphony.user.provider.UserProvider
Returns:
Whether entity was successfully loaded.

remove

public boolean remove(String name)
Remove Entity with given name using the first delegate profile provider.

Specified by:
remove in interface com.opensymphony.user.provider.UserProvider
Returns:
Whether entity was successfully removed.

store

public boolean store(String name,
                     com.opensymphony.user.Entity.Accessor accessor)
Stores changes to Entity using the first delegate profile provider.

Specified by:
store in interface com.opensymphony.user.provider.UserProvider
Returns:
Whether changes to entity were successfully stored.


Copyright © 2013 Atlassian. All Rights Reserved.