org.apache.cocoon.webapps.session
Interface ContextManager

All Known Implementing Classes:
DefaultContextManager

public interface ContextManager

This is the context manager. The main purpose of this component is maintaining contexts. Each application can have one or more session contexts. A context is a data container that can hold arbitrary information. The contained information can either be an XML tree or custom objects.

Version:
CVS $Id: ContextManager.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Carsten Ziegeler

Field Summary
static String ROLE
          Avalon role
 
Method Summary
 SessionContext createContext(String name, String loadURI, String saveURI)
          Create a new public context in the session.
 void deleteContext(String name)
          Delete a public context in the session.
 boolean existsContext(String name)
          Check if a public context exists.
 SessionContext getContext(String name)
          Get a public context.
 boolean hasSessionContext()
          Check if a context exists
 

Field Detail

ROLE

public static final String ROLE
Avalon role

Method Detail

createContext

public SessionContext createContext(String name,
                                    String loadURI,
                                    String saveURI)
                             throws IOException,
                                    SAXException,
                                    ProcessingException
Create a new public context in the session. Create a new public session context for this user. If this context already exists no new context is created and the old one will be used instead.

Throws:
IOException
SAXException
ProcessingException

deleteContext

public void deleteContext(String name)
                   throws ProcessingException
Delete a public context in the session. If the context exists for this user, it and all of its information is deleted.

Throws:
ProcessingException

getContext

public SessionContext getContext(String name)
                          throws ProcessingException
Get a public context. The session context with the given name is returned. If the context does not exist null is returned.

Throws:
ProcessingException

hasSessionContext

public boolean hasSessionContext()
                          throws ProcessingException
Check if a context exists

Throws:
ProcessingException

existsContext

public boolean existsContext(String name)
                      throws ProcessingException
Check if a public context exists. If the session context with the given name exists, true is returned.

Throws:
ProcessingException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.