org.apache.cocoon.auth.impl
Class StandardApplicationManager

java.lang.Object
  extended byorg.apache.cocoon.auth.impl.StandardApplicationManager
All Implemented Interfaces:
org.apache.cocoon.auth.ApplicationManager, BeanFactoryAware

public class StandardApplicationManager
extends Object
implements org.apache.cocoon.auth.ApplicationManager, BeanFactoryAware

This is the default implementation of the ApplicationManager. This implementation is heavily tied to Spring. This has been done to make the configuration of the application manager easier.

Version:
$Id: StandardApplicationManager.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected static String APPLICATION_BEAN_NAME_PREFIX
          The prefix used to register applications.
protected static String APPLICATION_KEY_PREFIX
          The prefix used to store the application data object in the session.
protected  Map applications
          A map containing all applications.
protected static String LOGIN_INFO_KEY
          The key used to store the login information in the session.
protected  org.apache.cocoon.processing.ProcessInfoProvider processInfoProvider
          The process info provider.
protected static String SECURITYHANDLER_BEAN_NAME_PREFIX
          The prefix used to register security handler.
 
Fields inherited from interface org.apache.cocoon.auth.ApplicationManager
APPLICATION, APPLICATION_DATA, LOGIN_CONTEXT_PASSWORD_KEY, LOGIN_CONTEXT_USERNAME_KEY, LOGOUT_CONTEXT_MODE_KEY, LOGOUT_MODE_KEEP_SESSION, LOGOUT_MODE_TERMINATE_SESSION_IF_UNUSED, USER
 
Constructor Summary
StandardApplicationManager()
           
 
Method Summary
protected  org.apache.cocoon.auth.Application getApplication(String appName)
          Return the application with the name.
protected  String getKey(org.apache.cocoon.auth.SecurityHandler handler)
           
 Log getLogger()
           
 boolean isLoggedIn(String appName)
           
 org.apache.cocoon.auth.User login(String appName, Map loginContext)
           
 void logout(String appName, Map logoutContext)
           
static void logoutFromAllApplications(HttpSession session)
          Logs the user out of all applications.
 void setBeanFactory(BeanFactory factory)
           
 void setLogger(Log l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGIN_INFO_KEY

protected static final String LOGIN_INFO_KEY
The key used to store the login information in the session.


APPLICATION_KEY_PREFIX

protected static final String APPLICATION_KEY_PREFIX
The prefix used to store the application data object in the session.


APPLICATION_BEAN_NAME_PREFIX

protected static final String APPLICATION_BEAN_NAME_PREFIX
The prefix used to register applications.


SECURITYHANDLER_BEAN_NAME_PREFIX

protected static final String SECURITYHANDLER_BEAN_NAME_PREFIX
The prefix used to register security handler.


processInfoProvider

protected org.apache.cocoon.processing.ProcessInfoProvider processInfoProvider
The process info provider.


applications

protected Map applications
A map containing all applications.

Constructor Detail

StandardApplicationManager

public StandardApplicationManager()
Method Detail

getLogger

public Log getLogger()

setLogger

public void setLogger(Log l)

setBeanFactory

public void setBeanFactory(BeanFactory factory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException
See Also:
BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)

getApplication

protected org.apache.cocoon.auth.Application getApplication(String appName)
Return the application with the name.


getKey

protected String getKey(org.apache.cocoon.auth.SecurityHandler handler)

isLoggedIn

public boolean isLoggedIn(String appName)
Specified by:
isLoggedIn in interface org.apache.cocoon.auth.ApplicationManager
See Also:
ApplicationManager.isLoggedIn(String)

login

public org.apache.cocoon.auth.User login(String appName,
                                         Map loginContext)
                                  throws Exception
Specified by:
login in interface org.apache.cocoon.auth.ApplicationManager
Throws:
Exception
See Also:
ApplicationManager.login(String, java.util.Map)

logout

public void logout(String appName,
                   Map logoutContext)
Specified by:
logout in interface org.apache.cocoon.auth.ApplicationManager
See Also:
ApplicationManager.logout(String, java.util.Map)

logoutFromAllApplications

public static void logoutFromAllApplications(HttpSession session)
Logs the user out of all applications. This method has not been tested yet.

Parameters:
session - The corresponding session


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.