| org.apache.cocoon.webapps.session.components.DefaultSessionManager
DefaultSessionManager | final public class DefaultSessionManager extends AbstractLogEnabled implements Serviceable,Component,ThreadSafe,SessionManager,Disposable,Contextualizable(Code) | | This is the default implementation of the session manager
author: Carsten Ziegeler version: CVS $Id: DefaultSessionManager.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public void | appendContextFragment(String contextName, String path, DocumentFragment fragment) Append data in a public context. | public void | contextualize(Context context) | public Session | createSession() Create a new session for the user.
A new session is created for this user. | public void | dispose() | public DocumentFragment | getContextFragment(String contextName, String path) Get information from the context.
A document fragment containg the xml data stored in the session context
with the given name is returned. | public Session | getSession(boolean createFlag) Get the session for the current user. | public void | mergeContextFragment(String contextName, String path, DocumentFragment fragment) Merge data in a public context. | public void | removeContextFragment(String contextName, String path) Remove data in a public context. | public void | service(ServiceManager manager) | public void | setContextFragment(String contextName, String path, DocumentFragment fragment) Set data in a public context. | public boolean | streamContextFragment(String contextName, String path, XMLConsumer consumer) Stream public context data.
The document fragment containing the data from a path in the
given context is streamed to the consumer.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying which data to get. | public void | terminateSession(boolean force) Terminate the current session. |
appendContextFragment | public void appendContextFragment(String contextName, String path, DocumentFragment fragment) throws ProcessingException(Code) | | Append data in a public context.
The document fragment containing the data is appended at the given
path in the public session context.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying where to append the data. Parameters: fragment - The DocumentFragment containing the data. |
contextualize | public void contextualize(Context context) throws ContextException(Code) | | |
createSession | public Session createSession()(Code) | | 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.
|
dispose | public void dispose()(Code) | | Avalon Disposable Interface
|
getContextFragment | public DocumentFragment getContextFragment(String contextName, String path) throws ProcessingException(Code) | | 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.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying which data to get. A DocumentFragment containing the data or null |
getSession | public Session getSession(boolean createFlag)(Code) | | 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.
|
mergeContextFragment | public void mergeContextFragment(String contextName, String path, DocumentFragment fragment) throws ProcessingException(Code) | | Merge data in a public context.
The document fragment containing the data is merged at the given
path in the public session context.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying where to merge the data. Parameters: fragment - The DocumentFragment containing the data. |
removeContextFragment | public void removeContextFragment(String contextName, String path) throws ProcessingException(Code) | | Remove data in a public context.
The data specified by the path is removed from the public session context.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying where to merge the data. |
service | public void service(ServiceManager manager) throws ServiceException(Code) | | Avalon Serviceable Interface
|
setContextFragment | public void setContextFragment(String contextName, String path, DocumentFragment fragment) throws ProcessingException(Code) | | Set data in a public context.
The document fragment containing the data is set at the given path in the
public session context.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying where to set the data. Parameters: fragment - The DocumentFragment containing the data. |
streamContextFragment | public boolean streamContextFragment(String contextName, String path, XMLConsumer consumer) throws SAXException, ProcessingException(Code) | | Stream public context data.
The document fragment containing the data from a path in the
given context is streamed to the consumer.
Parameters: contextName - The name of the public context. Parameters: path - XPath expression specifying which data to get. If the data is available true is returned,otherwise false is returned. |
terminateSession | public void terminateSession(boolean force) throws ProcessingException(Code) | | Terminate the current session.
If the user has a session, this session is terminated and all of its
data is deleted.
Parameters: force - If this is set to true the session is terminated, ifit is set to false, the session is only terminatedif no session context is available. |
|
|