org.apache.lenya.cms.cocoon.acting
Class AccessControlAction

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.acting.AbstractAction
          extended by org.apache.cocoon.acting.AbstractConfigurableAction
              extended by org.apache.cocoon.acting.ConfigurableServiceableAction
                  extended by org.apache.lenya.cms.cocoon.acting.AccessControlAction
All Implemented Interfaces:
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.cocoon.acting.Action
Direct Known Subclasses:
DelegatingAuthenticatorAction, DelegatingAuthorizerAction

public abstract class AccessControlAction
extends org.apache.cocoon.acting.ConfigurableServiceableAction

Super class for access control actions.

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

Field Summary
 
Fields inherited from class org.apache.cocoon.acting.ConfigurableServiceableAction
manager
 
Fields inherited from class org.apache.cocoon.acting.AbstractConfigurableAction
settings
 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
 
Fields inherited from interface org.apache.cocoon.acting.Action
ROLE
 
Constructor Summary
AccessControlAction()
           
 
Method Summary
 java.util.Map act(org.apache.cocoon.environment.Redirector redirector, org.apache.cocoon.environment.SourceResolver sourceResolver, java.util.Map objectModel, java.lang.String source, org.apache.avalon.framework.parameters.Parameters parameters)
           Invokes the access control functionality.
protected abstract  java.util.Map doAct(org.apache.cocoon.environment.Redirector redirector, org.apache.cocoon.environment.SourceResolver resolver, java.util.Map objectModel, java.lang.String source, org.apache.avalon.framework.parameters.Parameters parameters)
          The actual act method.
 org.apache.lenya.ac.AccessController getAccessController()
          Returns the access controller.
 
Methods inherited from class org.apache.cocoon.acting.ConfigurableServiceableAction
service
 
Methods inherited from class org.apache.cocoon.acting.AbstractConfigurableAction
configure
 
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

AccessControlAction

public AccessControlAction()
Method Detail

act

public java.util.Map act(org.apache.cocoon.environment.Redirector redirector,
                         org.apache.cocoon.environment.SourceResolver sourceResolver,
                         java.util.Map objectModel,
                         java.lang.String source,
                         org.apache.avalon.framework.parameters.Parameters parameters)
                  throws java.lang.Exception

Invokes the access control functionality. If no access controller was found for the requested URL, an empty map is returned.

This is a template method. Implement doAct() to add your functionality.

Throws:
java.lang.Exception
See Also:
Action.act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

doAct

protected abstract java.util.Map doAct(org.apache.cocoon.environment.Redirector redirector,
                                       org.apache.cocoon.environment.SourceResolver resolver,
                                       java.util.Map objectModel,
                                       java.lang.String source,
                                       org.apache.avalon.framework.parameters.Parameters parameters)
                                throws java.lang.Exception
The actual act method.

Parameters:
redirector - The Redirector in charge
resolver - The SourceResolver in charge
objectModel - The Map with object of the calling environment which can be used to select values this controller may need (ie Request, Response).
source - A source String to the Action
parameters - The Parameters for this invocation
Returns:
Map The returned Map object with sitemap substitution values which can be used in subsequent elements attributes like src= using a xpath like expression: src="mydir/{myval}/foo" If the return value is null the processing inside the element of the sitemap will be skipped.
Throws:
java.lang.Exception - Indicates something is totally wrong

getAccessController

public org.apache.lenya.ac.AccessController getAccessController()
Returns the access controller.

Returns:
An access controller.


Copyright $ Apache Software Foundation. All Rights Reserved.