org.apache.lenya.ac.impl
Class ComposableAccessControllerResolver

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.AbstractAccessControllerResolver
          extended by org.apache.lenya.ac.impl.ComposableAccessControllerResolver
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.lenya.ac.AccessControllerResolver

public class ComposableAccessControllerResolver
extends AbstractAccessControllerResolver
implements org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable

Access controller resolver composed of other access controller resolvers. The member resolvers are called one after the other to resolve the access controllers.

Version:
$Id: ComposableAccessControllerResolver.java 473861 2006-11-12 03:51:14Z gregor $

Field Summary
protected static java.lang.String RESOLVER_ELEMENT
           
protected static java.lang.String TYPE_ATTRIBUTE
           
 
Fields inherited from class org.apache.lenya.ac.impl.AbstractAccessControllerResolver
CAPACITY, manager
 
Fields inherited from interface org.apache.lenya.ac.AccessControllerResolver
DEFAULT_RESOLVER, ROLE
 
Constructor Summary
ComposableAccessControllerResolver()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 void dispose()
           
 org.apache.lenya.ac.AccessController doResolveAccessController(java.lang.String url)
          The actual resolving method.
protected  org.apache.lenya.ac.AccessControllerResolver getResolver(org.apache.lenya.ac.AccessController controller)
          Returns the access controller resolver that was used to resolve a specific access controller.
protected  java.lang.String[] getResolverTypes()
          Returns the access controller types.
 void release(org.apache.lenya.ac.AccessController controller)
           
protected  void setResolver(org.apache.lenya.ac.AccessController controller, org.apache.lenya.ac.AccessControllerResolver resolver)
          Sets the access controller resolver that was used to resolve a specific access controller.
 
Methods inherited from class org.apache.lenya.ac.impl.AbstractAccessControllerResolver
generateCacheKey, getCache, getManager, resolveAccessController, service
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOLVER_ELEMENT

protected static final java.lang.String RESOLVER_ELEMENT
See Also:
Constant Field Values

TYPE_ATTRIBUTE

protected static final java.lang.String TYPE_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

ComposableAccessControllerResolver

public ComposableAccessControllerResolver()
Method Detail

doResolveAccessController

public org.apache.lenya.ac.AccessController doResolveAccessController(java.lang.String url)
                                                               throws org.apache.lenya.ac.AccessControlException
Description copied from class: AbstractAccessControllerResolver
The actual resolving method.

Specified by:
doResolveAccessController in class AbstractAccessControllerResolver
Parameters:
url - The URL within the web application.
Returns:
An access controller.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.
See Also:
AbstractAccessControllerResolver.doResolveAccessController(java.lang.String)

release

public void release(org.apache.lenya.ac.AccessController controller)
Specified by:
release in interface org.apache.lenya.ac.AccessControllerResolver
Overrides:
release in class AbstractAccessControllerResolver
See Also:
AccessControllerResolver.release(org.apache.lenya.ac.AccessController)

getResolver

protected org.apache.lenya.ac.AccessControllerResolver getResolver(org.apache.lenya.ac.AccessController controller)
Returns the access controller resolver that was used to resolve a specific access controller.

Parameters:
controller - The access controller.
Returns:
An AC resolver.

setResolver

protected void setResolver(org.apache.lenya.ac.AccessController controller,
                           org.apache.lenya.ac.AccessControllerResolver resolver)
Sets the access controller resolver that was used to resolve a specific access controller.

Parameters:
controller - The access controller.
resolver - An AC resolver.

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

getResolverTypes

protected java.lang.String[] getResolverTypes()
Returns the access controller types.

Returns:
A string array.

dispose

public void dispose()
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable
See Also:
Disposable.dispose()


Copyright $ Apache Software Foundation. All Rights Reserved.