org.apache.lenya.ac.impl
Class AbstractAccessControllerResolver

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.AbstractAccessControllerResolver
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.lenya.ac.AccessControllerResolver
Direct Known Subclasses:
ComposableAccessControllerResolver, ConfigurableAccessControllerResolver, PublicationAccessControllerResolver

public abstract class AbstractAccessControllerResolver
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.lenya.ac.AccessControllerResolver, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe

Abstract implementation for access controller resolvers.

Version:
$Id: AbstractAccessControllerResolver.java 531479 2007-04-23 14:21:35Z andreas $

Field Summary
protected static int CAPACITY
           
protected  org.apache.avalon.framework.service.ServiceManager manager
           
 
Fields inherited from interface org.apache.lenya.ac.AccessControllerResolver
DEFAULT_RESOLVER, ROLE
 
Constructor Summary
AbstractAccessControllerResolver()
           
 
Method Summary
protected abstract  org.apache.lenya.ac.AccessController doResolveAccessController(java.lang.String webappUrl)
          The actual resolving method.
protected  java.lang.Object generateCacheKey(java.lang.String webappUrl, org.apache.excalibur.source.SourceResolver resolver)
          Generates a cache key for the access controller.
protected  org.apache.lenya.util.CacheMap getCache()
           
 org.apache.avalon.framework.service.ServiceManager getManager()
          Returns the service manager of this Serviceable.
 void release(org.apache.lenya.ac.AccessController controller)
           
 org.apache.lenya.ac.AccessController resolveAccessController(java.lang.String webappUrl)
           
 void service(org.apache.avalon.framework.service.ServiceManager _manager)
           
 
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

CAPACITY

protected static final int CAPACITY
See Also:
Constant Field Values

manager

protected org.apache.avalon.framework.service.ServiceManager manager
Constructor Detail

AbstractAccessControllerResolver

public AbstractAccessControllerResolver()
Method Detail

getCache

protected org.apache.lenya.util.CacheMap getCache()

resolveAccessController

public org.apache.lenya.ac.AccessController resolveAccessController(java.lang.String webappUrl)
                                                             throws org.apache.lenya.ac.AccessControlException
Specified by:
resolveAccessController in interface org.apache.lenya.ac.AccessControllerResolver
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccessControllerResolver.resolveAccessController(java.lang.String)

generateCacheKey

protected java.lang.Object generateCacheKey(java.lang.String webappUrl,
                                            org.apache.excalibur.source.SourceResolver resolver)
                                     throws org.apache.lenya.ac.AccessControlException
Generates a cache key for the access controller.

Parameters:
webappUrl - The webapp URL.
resolver - The source resolver.
Returns:
An object.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

doResolveAccessController

protected abstract org.apache.lenya.ac.AccessController doResolveAccessController(java.lang.String webappUrl)
                                                                           throws org.apache.lenya.ac.AccessControlException
The actual resolving method.

Parameters:
webappUrl - The URL within the web application.
Returns:
An access controller.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

release

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

service

public void service(org.apache.avalon.framework.service.ServiceManager _manager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

getManager

public org.apache.avalon.framework.service.ServiceManager getManager()
Returns the service manager of this Serviceable.

Returns:
A service manager.


Copyright $ Apache Software Foundation. All Rights Reserved.