org.apache.lenya.ac.impl
Class BypassableAccessController

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.DefaultAccessController
          extended by org.apache.lenya.ac.impl.BypassableAccessController
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.lenya.ac.AccessController, org.apache.lenya.ac.ItemManagerListener

public class BypassableAccessController
extends DefaultAccessController

AccessController that can be bypassed for certain URL patterns.


Field Summary
 
Fields inherited from class org.apache.lenya.ac.impl.DefaultAccessController
ACCREDITABLE_MANAGER_ELEMENT, AUTHORIZER_ELEMENT, POLICY_MANAGER_ELEMENT, TYPE_ATTRIBUTE
 
Fields inherited from interface org.apache.lenya.ac.AccessController
DEFAULT_PREFIX, NAMESPACE, ROLE
 
Constructor Summary
BypassableAccessController()
          Ctor.
 
Method Summary
 boolean authorize(org.apache.cocoon.environment.Request request)
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
protected  boolean preparedMatch(org.apache.regexp.REProgram preparedPattern, java.lang.String match)
          Matches a string using a prepared pattern program.
protected  org.apache.regexp.REProgram preparePattern(java.lang.String pattern)
          Compile the pattern in a org.apache.regexp.REProgram.
 
Methods inherited from class org.apache.lenya.ac.impl.DefaultAccessController
authenticate, configureOrParameterize, dispose, getAccreditableManager, getAuthenticator, getAuthorizers, getManager, getPolicyManager, hasAuthorizers, hasValidIdentity, itemAdded, itemRemoved, ownsIdenity, resolveRoles, saveRoles, service, setupAccreditableManager, setupAuthenticator, setupAuthorizers, setupIdentity, setupPolicyManager
 
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
 

Constructor Detail

BypassableAccessController

public BypassableAccessController()
Ctor.

Method Detail

configure

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

preparePattern

protected org.apache.regexp.REProgram preparePattern(java.lang.String pattern)
                                              throws org.apache.cocoon.sitemap.PatternException
Compile the pattern in a org.apache.regexp.REProgram.

Parameters:
pattern - The pattern to compile.
Returns:
A RE program representing the pattern.
Throws:
org.apache.cocoon.sitemap.PatternException - when something went wrong.

preparedMatch

protected boolean preparedMatch(org.apache.regexp.REProgram preparedPattern,
                                java.lang.String match)
Matches a string using a prepared pattern program.

Parameters:
preparedPattern - The pattern program.
match - The string to match.
Returns:
true if the string matched the pattern, false otherwise.

authorize

public boolean authorize(org.apache.cocoon.environment.Request request)
                  throws org.apache.lenya.ac.AccessControlException
Specified by:
authorize in interface org.apache.lenya.ac.AccessController
Overrides:
authorize in class DefaultAccessController
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccessController.authorize(org.apache.cocoon.environment.Request)


Copyright $ Apache Software Foundation. All Rights Reserved.