|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.ac.impl.DefaultAccessController
public class DefaultAccessController
Default access controller implementation.
| Field Summary | |
|---|---|
protected static java.lang.String |
ACCREDITABLE_MANAGER_ELEMENT
|
protected static java.lang.String |
AUTHORIZER_ELEMENT
|
protected static java.lang.String |
POLICY_MANAGER_ELEMENT
|
protected static java.lang.String |
TYPE_ATTRIBUTE
|
| Fields inherited from interface org.apache.lenya.ac.AccessController |
|---|
DEFAULT_PREFIX, NAMESPACE, ROLE |
| Constructor Summary | |
|---|---|
DefaultAccessController()
|
|
| Method Summary | |
|---|---|
boolean |
authenticate(org.apache.cocoon.environment.Request request)
Authenticates a request. |
boolean |
authorize(org.apache.cocoon.environment.Request request)
Authorizes a request inside a publication. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
static void |
configureOrParameterize(org.apache.avalon.framework.component.Component component,
org.apache.avalon.framework.configuration.Configuration configuration)
Configures or parameterizes a component, depending on the implementation as Configurable or Parameterizable. |
void |
dispose()
|
AccreditableManager |
getAccreditableManager()
Returns the accreditable manager. |
Authenticator |
getAuthenticator()
Returns the authenticator. |
Authorizer[] |
getAuthorizers()
Returns the authorizers of this action. |
protected org.apache.avalon.framework.service.ServiceManager |
getManager()
Returns the service manager. |
PolicyManager |
getPolicyManager()
Returns the policy manager. |
protected boolean |
hasAuthorizers()
Returns if this action has authorizers. |
protected boolean |
hasValidIdentity(org.apache.cocoon.environment.Session session)
Checks if the session contains an identity that is not null and belongs to the used access controller. |
void |
itemAdded(Item item)
Called when an accreditable was added. |
void |
itemRemoved(Item item)
Called when an accreditable was removed. |
boolean |
ownsIdenity(Identity identity)
Checks if this identity was initialized by this access controller. |
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Set the global component manager. |
protected void |
setupAccreditableManager(org.apache.avalon.framework.configuration.Configuration configuration)
Creates the accreditable manager. |
protected void |
setupAuthenticator()
Sets up the authenticator. |
protected void |
setupAuthorizers(org.apache.avalon.framework.configuration.Configuration configuration)
Creates the authorizers. |
void |
setupIdentity(org.apache.cocoon.environment.Request request)
Initializes the identity for this access controller. |
protected void |
setupPolicyManager(org.apache.avalon.framework.configuration.Configuration configuration)
Creates the policy 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 |
|---|
protected static final java.lang.String AUTHORIZER_ELEMENT
protected static final java.lang.String TYPE_ATTRIBUTE
protected static final java.lang.String ACCREDITABLE_MANAGER_ELEMENT
protected static final java.lang.String POLICY_MANAGER_ELEMENT
| Constructor Detail |
|---|
public DefaultAccessController()
| Method Detail |
|---|
public boolean authenticate(org.apache.cocoon.environment.Request request)
throws AccessControlException
AccessController
authenticate in interface AccessControllerrequest - A request.
AccessControlException - when something went wrong.AccessController.authenticate(org.apache.cocoon.environment.Request)
public boolean authorize(org.apache.cocoon.environment.Request request)
throws AccessControlException
AccessController
authorize in interface AccessControllerrequest - A request.
AccessControlException - when something went wrong.AccessController.authorize(org.apache.cocoon.environment.Request)
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(org.apache.avalon.framework.configuration.Configuration)
public static void configureOrParameterize(org.apache.avalon.framework.component.Component component,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException,
org.apache.avalon.framework.parameters.ParameterException
component - The component.configuration - The configuration to use.
org.apache.avalon.framework.configuration.ConfigurationException - when an error occurs during configuration.
org.apache.avalon.framework.parameters.ParameterException - when an error occurs during parameterization.
protected void setupAccreditableManager(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException,
org.apache.avalon.framework.service.ServiceException,
org.apache.avalon.framework.parameters.ParameterException
configuration - The access controller configuration.
org.apache.avalon.framework.configuration.ConfigurationException - when the configuration failed.
org.apache.avalon.framework.service.ServiceException - when something went wrong.
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
protected void setupAuthorizers(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.service.ServiceException,
org.apache.avalon.framework.configuration.ConfigurationException,
org.apache.avalon.framework.parameters.ParameterException
configuration - The access controller configuration.
org.apache.avalon.framework.configuration.ConfigurationException - when the configuration failed.
org.apache.avalon.framework.service.ServiceException - when something went wrong.
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
protected void setupPolicyManager(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.service.ServiceException,
org.apache.avalon.framework.configuration.ConfigurationException,
org.apache.avalon.framework.parameters.ParameterException
configuration - The access controller configuration.
org.apache.avalon.framework.configuration.ConfigurationException - when the configuration failed.
org.apache.avalon.framework.service.ServiceException - when something went wrong.
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
protected void setupAuthenticator()
throws org.apache.avalon.framework.service.ServiceException
org.apache.avalon.framework.service.ServiceException - when something went wrong.
public void service(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceablemanager - The global component manager
org.apache.avalon.framework.service.ServiceException - when something went wrong.protected org.apache.avalon.framework.service.ServiceManager getManager()
public Authorizer[] getAuthorizers()
protected boolean hasAuthorizers()
public void dispose()
dispose in interface org.apache.avalon.framework.activity.DisposableDisposable.dispose()public AccreditableManager getAccreditableManager()
public PolicyManager getPolicyManager()
public Authenticator getAuthenticator()
public boolean ownsIdenity(Identity identity)
throws AccessControlException
identity - An identity.
AccessControlException - when something went wrong.
public void setupIdentity(org.apache.cocoon.environment.Request request)
throws AccessControlException
AccessController
setupIdentity in interface AccessControllerrequest - The request that contains the identity information.
AccessControlException - when something went wrong.AccessController.setupIdentity(org.apache.cocoon.environment.Request)
protected boolean hasValidIdentity(org.apache.cocoon.environment.Session session)
throws AccessControlException
session - The current session.
AccessControlException - when something went wrong.
public void itemAdded(Item item)
throws AccessControlException
ItemManagerListener
itemAdded in interface ItemManagerListeneritem - The item that was added.
AccessControlException - when an error occurs.ItemManagerListener.itemAdded(org.apache.lenya.ac.Item)
public void itemRemoved(Item item)
throws AccessControlException
ItemManagerListener
itemRemoved in interface ItemManagerListeneritem - The item that was removed.
AccessControlException - when an error occurs.ItemManagerListener.itemRemoved(org.apache.lenya.ac.Item)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||