|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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)
|
boolean |
authorize(org.apache.cocoon.environment.Request request)
|
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()
|
org.apache.lenya.ac.AccreditableManager |
getAccreditableManager()
Returns the accreditable manager. |
org.apache.lenya.ac.Authenticator |
getAuthenticator()
Returns the authenticator. |
org.apache.lenya.ac.Authorizer[] |
getAuthorizers()
Returns the authorizers of this action. |
protected org.apache.avalon.framework.service.ServiceManager |
getManager()
Returns the service manager. |
org.apache.lenya.ac.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(org.apache.lenya.ac.Item item)
|
void |
itemRemoved(org.apache.lenya.ac.Item item)
|
boolean |
ownsIdenity(org.apache.lenya.ac.Identity identity)
Checks if this identity was initialized by this access controller. |
protected void |
resolveRoles(org.apache.cocoon.environment.Request request)
|
protected void |
saveRoles(org.apache.cocoon.environment.Request request,
org.apache.lenya.ac.Role[] roles)
Saves the roles of the current identity to the request. |
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)
|
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 org.apache.lenya.ac.AccessControlException
authenticate
in interface org.apache.lenya.ac.AccessController
org.apache.lenya.ac.AccessControlException
AccessController.authenticate(org.apache.cocoon.environment.Request)
public boolean authorize(org.apache.cocoon.environment.Request request) throws org.apache.lenya.ac.AccessControlException
authorize
in interface org.apache.lenya.ac.AccessController
org.apache.lenya.ac.AccessControlException
AccessController.authorize(org.apache.cocoon.environment.Request)
protected void resolveRoles(org.apache.cocoon.environment.Request request) throws org.apache.lenya.ac.AccessControlException
org.apache.lenya.ac.AccessControlException
protected void saveRoles(org.apache.cocoon.environment.Request request, org.apache.lenya.ac.Role[] roles)
request
- The request.roles
- The roles.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.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.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
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.Serviceable
_manager
- The global component manager
org.apache.avalon.framework.service.ServiceException
- when something went wrong.protected org.apache.avalon.framework.service.ServiceManager getManager()
public org.apache.lenya.ac.Authorizer[] getAuthorizers()
getAuthorizers
in interface org.apache.lenya.ac.AccessController
protected boolean hasAuthorizers()
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
public org.apache.lenya.ac.AccreditableManager getAccreditableManager()
getAccreditableManager
in interface org.apache.lenya.ac.AccessController
public org.apache.lenya.ac.PolicyManager getPolicyManager()
getPolicyManager
in interface org.apache.lenya.ac.AccessController
public org.apache.lenya.ac.Authenticator getAuthenticator()
public boolean ownsIdenity(org.apache.lenya.ac.Identity identity) throws org.apache.lenya.ac.AccessControlException
identity
- An identity.
org.apache.lenya.ac.AccessControlException
- when something went wrong.public void setupIdentity(org.apache.cocoon.environment.Request request) throws org.apache.lenya.ac.AccessControlException
setupIdentity
in interface org.apache.lenya.ac.AccessController
org.apache.lenya.ac.AccessControlException
AccessController.setupIdentity(org.apache.cocoon.environment.Request)
protected boolean hasValidIdentity(org.apache.cocoon.environment.Session session) throws org.apache.lenya.ac.AccessControlException
session
- The current session.
org.apache.lenya.ac.AccessControlException
- when something went wrong.public void itemAdded(org.apache.lenya.ac.Item item) throws org.apache.lenya.ac.AccessControlException
itemAdded
in interface org.apache.lenya.ac.ItemManagerListener
org.apache.lenya.ac.AccessControlException
ItemManagerListener.itemAdded(org.apache.lenya.ac.Item)
public void itemRemoved(org.apache.lenya.ac.Item item) throws org.apache.lenya.ac.AccessControlException
itemRemoved
in interface org.apache.lenya.ac.ItemManagerListener
org.apache.lenya.ac.AccessControlException
ItemManagerListener.itemRemoved(org.apache.lenya.ac.Item)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |