org.ow2.opensuit.core.session
Class PageContext

java.lang.Object
  extended by org.ow2.opensuit.core.session.PageContext
All Implemented Interfaces:
java.io.Serializable

public abstract class PageContext
extends java.lang.Object
implements java.io.Serializable

Holds the page context.

See Also:
Serialized Form

Field Summary
protected  java.lang.String pagePath
           
 
Constructor Summary
PageContext(java.lang.String pagePath, org.ow2.opensuit.xml.base.page.ctx.IPageContextDef contextDef, PageContext parent)
           
 
Method Summary
 void addListener(IPageContextListener listener)
          Registers a listener to this page context.
protected abstract  void doLoad(javax.servlet.http.HttpServletRequest request)
           
protected abstract  void doQuit(javax.servlet.http.HttpServletRequest request)
           
 java.lang.Object getAttribute(java.lang.String iName)
          Retrieves an attribute attached to this page context.
 java.util.Set<java.lang.String> getAttributeNames()
          Returns all attribute names.
 org.ow2.opensuit.xml.base.page.ctx.IPageContextDef getContextDefinition()
          Returns the context definition of this page context.
 PageContext getParent()
           
 void load(javax.servlet.http.HttpServletRequest request)
          Loads this page context.
 void quit(javax.servlet.http.HttpServletRequest request)
          Quits this page context.
 void removeAttribute(java.lang.String iName)
          Removes the attribute with given name.
 void setAttribute(java.lang.String iName, java.lang.Object iValue)
          Sets an attribute attached to this page context.
 void setCurrent(javax.servlet.http.HttpServletRequest request)
          Sets this page context as the current one in the open SUIT session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pagePath

protected java.lang.String pagePath
Constructor Detail

PageContext

public PageContext(java.lang.String pagePath,
                   org.ow2.opensuit.xml.base.page.ctx.IPageContextDef contextDef,
                   PageContext parent)
Method Detail

getParent

public PageContext getParent()

getAttribute

public java.lang.Object getAttribute(java.lang.String iName)
Retrieves an attribute attached to this page context.

Parameters:
iName - Attribute name.
Returns:
Attribute value.

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Returns all attribute names.

Returns:

removeAttribute

public void removeAttribute(java.lang.String iName)
Removes the attribute with given name.

Parameters:
iName - Attribute name to remove.

setAttribute

public void setAttribute(java.lang.String iName,
                         java.lang.Object iValue)
Sets an attribute attached to this page context. This data is cached in session as long as the page lives.

Parameters:
iName - Attribute name.
iValue - Attribute value.

getContextDefinition

public org.ow2.opensuit.xml.base.page.ctx.IPageContextDef getContextDefinition()
Returns the context definition of this page context.

Returns:

addListener

public void addListener(IPageContextListener listener)
Registers a listener to this page context.

Parameters:
listener -

setCurrent

public void setCurrent(javax.servlet.http.HttpServletRequest request)
                throws java.lang.Exception
Sets this page context as the current one in the open SUIT session.

Parameters:
request -
Throws:
java.lang.Exception

load

public void load(javax.servlet.http.HttpServletRequest request)
          throws java.lang.Exception
Loads this page context. This will possibly trigger actions.

Parameters:
request -
Throws:
java.lang.Exception

quit

public void quit(javax.servlet.http.HttpServletRequest request)
          throws java.lang.Exception
Quits this page context. This will possibly trigger actions.

Parameters:
request -
Throws:
java.lang.Exception

doLoad

protected abstract void doLoad(javax.servlet.http.HttpServletRequest request)
                        throws java.lang.Exception
Throws:
java.lang.Exception

doQuit

protected abstract void doQuit(javax.servlet.http.HttpServletRequest request)
                        throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2008-2012 OW2 Consortium. All Rights Reserved.