com.silverpeas.accesscontrol
Class AccessControllerProvider

java.lang.Object
  extended by com.silverpeas.accesscontrol.AccessControllerProvider
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class AccessControllerProvider
extends Object
implements org.springframework.context.ApplicationContextAware

A provider of the different access controllers available in Silverpeas. The different access controllers are all managed in the IoC container and then can be get by dependency injection. Nevertheless, not all objects in Silverpeas are managed by the IoC container and they can need the services of an access controller. The AccessControllerProvider aims to make available the different access controllers to such objects.


Constructor Summary
AccessControllerProvider()
           
 
Method Summary
static
<T> AccessController<T>
getAccessController(String name)
          Gets the access controller identified by the specified name.
static AccessControllerProvider getInstance()
          Gets an instance of the AccessControllerProvider class.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          Set the ApplicationContext that this object runs in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessControllerProvider

public AccessControllerProvider()
Method Detail

getInstance

public static AccessControllerProvider getInstance()
Gets an instance of the AccessControllerProvider class.

Returns:
an AccessControllerProvider instance.

getAccessController

public static <T> AccessController<T> getAccessController(String name)
Gets the access controller identified by the specified name.

Type Parameters:
T - the type of the resource that is used in the access control mechanism.
Parameters:
name - the unique name of the access controller. It is the name under which it has been registered into the IoC container.
Returns:
the asked access controller.

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object.

Invoked after population of normal bean properties but before an init callback such as InitializingBean.afterPropertiesSet() or a custom init-method. Invoked after .ResourceLoaderAware#setResourceLoader, ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) and MessageSourceAware, if applicable.

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Parameters:
applicationContext - the ApplicationContext object to be used by this object
Throws:
org.springframework.context.ApplicationContextException - in case of context initialization errors
org.springframework.beans.BeansException - if thrown by application context methods
See Also:
BeanInitializationException


Copyright © 2016 Silverpeas. All Rights Reserved.