org.apache.cocoon.webapps.session.components
Class DefaultSessionManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.webapps.session.components.DefaultSessionManager
All Implemented Interfaces:
Disposable, Component, Contextualizable, LogEnabled, Serviceable, ThreadSafe, SessionManager

Deprecated. This block is deprecated and will be removed in future versions.

public final class DefaultSessionManager
extends AbstractLogEnabled
implements Serviceable, Component, ThreadSafe, SessionManager, Disposable, Contextualizable

This is the default implementation of the session manager

Version:
CVS $Id: DefaultSessionManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

Field Summary
 
Fields inherited from interface org.apache.cocoon.webapps.session.SessionManager
ROLE
 
Constructor Summary
DefaultSessionManager()
          Deprecated.  
 
Method Summary
 void appendContextFragment(String contextName, String path, DocumentFragment fragment)
          Deprecated. Append data in a public context.
 void contextualize(Context context)
          Deprecated.  
 Session createSession()
          Deprecated. Create a new session for the user.
 void dispose()
          Deprecated. Avalon Disposable Interface
 DocumentFragment getContextFragment(String contextName, String path)
          Deprecated. Get information from the context.
 Session getSession(boolean createFlag)
          Deprecated. Get the session for the current user.
 void mergeContextFragment(String contextName, String path, DocumentFragment fragment)
          Deprecated. Merge data in a public context.
 void removeContextFragment(String contextName, String path)
          Deprecated. Remove data in a public context.
 void service(ServiceManager manager)
          Deprecated. Avalon Serviceable Interface
 void setContextFragment(String contextName, String path, DocumentFragment fragment)
          Deprecated. Set data in a public context.
 boolean streamContextFragment(String contextName, String path, XMLConsumer consumer)
          Deprecated. Stream public context data.
 void terminateSession(boolean force)
          Deprecated. Terminate the current session.
 
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

DefaultSessionManager

public DefaultSessionManager()
Deprecated. 
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Deprecated. 
Avalon Serviceable Interface

Specified by:
service in interface Serviceable
Throws:
ServiceException

dispose

public void dispose()
Deprecated. 
Avalon Disposable Interface

Specified by:
dispose in interface Disposable

createSession

public Session createSession()
Deprecated. 
Create a new session for the user. A new session is created for this user. If the user has already a session, no new session is created and the old one is returned.

Specified by:
createSession in interface SessionManager

getSession

public Session getSession(boolean createFlag)
Deprecated. 
Get the session for the current user. If the user has no session right now, null is returned. If createFlag is true, the session is created if it does not exist.

Specified by:
getSession in interface SessionManager

terminateSession

public void terminateSession(boolean force)
                      throws ProcessingException
Deprecated. 
Terminate the current session. If the user has a session, this session is terminated and all of its data is deleted.

Specified by:
terminateSession in interface SessionManager
Parameters:
force - If this is set to true the session is terminated, if it is set to false, the session is only terminated if no session context is available.
Throws:
ProcessingException

getContextFragment

public DocumentFragment getContextFragment(String contextName,
                                           String path)
                                    throws ProcessingException
Deprecated. 
Get information from the context. A document fragment containg the xml data stored in the session context with the given name is returned. If the information is not available, null is returned.

Specified by:
getContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying which data to get.
Returns:
A DocumentFragment containing the data or null
Throws:
ProcessingException

streamContextFragment

public boolean streamContextFragment(String contextName,
                                     String path,
                                     XMLConsumer consumer)
                              throws SAXException,
                                     ProcessingException
Deprecated. 
Stream public context data. The document fragment containing the data from a path in the given context is streamed to the consumer.

Specified by:
streamContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying which data to get.
Returns:
If the data is available true is returned, otherwise false is returned.
Throws:
SAXException
ProcessingException

setContextFragment

public void setContextFragment(String contextName,
                               String path,
                               DocumentFragment fragment)
                        throws ProcessingException
Deprecated. 
Set data in a public context. The document fragment containing the data is set at the given path in the public session context.

Specified by:
setContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying where to set the data.
fragment - The DocumentFragment containing the data.
Throws:
ProcessingException

appendContextFragment

public void appendContextFragment(String contextName,
                                  String path,
                                  DocumentFragment fragment)
                           throws ProcessingException
Deprecated. 
Append data in a public context. The document fragment containing the data is appended at the given path in the public session context.

Specified by:
appendContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying where to append the data.
fragment - The DocumentFragment containing the data.
Throws:
ProcessingException

mergeContextFragment

public void mergeContextFragment(String contextName,
                                 String path,
                                 DocumentFragment fragment)
                          throws ProcessingException
Deprecated. 
Merge data in a public context. The document fragment containing the data is merged at the given path in the public session context.

Specified by:
mergeContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying where to merge the data.
fragment - The DocumentFragment containing the data.
Throws:
ProcessingException

removeContextFragment

public void removeContextFragment(String contextName,
                                  String path)
                           throws ProcessingException
Deprecated. 
Remove data in a public context. The data specified by the path is removed from the public session context.

Specified by:
removeContextFragment in interface SessionManager
Parameters:
contextName - The name of the public context.
path - XPath expression specifying where to merge the data.
Throws:
ProcessingException

contextualize

public void contextualize(Context context)
                   throws ContextException
Deprecated. 
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException


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