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

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.webapps.session.components.DefaultContextManager
All Implemented Interfaces:
ContextManager, Contextualizable, Disposable, LogEnabled, Serviceable, ThreadSafe

public final class DefaultContextManager
extends AbstractLogEnabled
implements Serviceable, ContextManager, ThreadSafe, Contextualizable, Disposable

Context manager

Version:
CVS $Id: DefaultContextManager.java 55383 2004-10-23 15:10:46Z cziegeler $
Author:
Carsten Ziegeler

Field Summary
 
Fields inherited from interface org.apache.cocoon.webapps.session.ContextManager
ROLE
 
Constructor Summary
DefaultContextManager()
           
 
Method Summary
 void contextualize(Context context)
           
 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.
 void dispose()
           
 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
 void service(ServiceManager manager)
          Avalon Serviceable Interface
 
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

DefaultContextManager

public DefaultContextManager()
Method Detail

service

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

Specified by:
service in interface Serviceable
Throws:
ServiceException

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.

Specified by:
createContext in interface ContextManager
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.

Specified by:
deleteContext in interface ContextManager
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.

Specified by:
getContext in interface ContextManager
Throws:
ProcessingException

hasSessionContext

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

Specified by:
hasSessionContext in interface ContextManager
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.

Specified by:
existsContext in interface ContextManager
Throws:
ProcessingException

contextualize

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

dispose

public void dispose()
Specified by:
dispose in interface Disposable


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