|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.comp.DefaultViewContext
This class provides the default implementation of a ViewContext. A View Context basically exists to provide the component models with the information they need to actually pass back the proper data to the component.
Field Summary |
Fields inherited from interface org.barracudamvc.core.comp.ViewContext |
DOCUMENT, EVENT_CONTEXT, REQUEST, RESPONSE, TEMPLATE_NODE, VIEW_CAPABILITIES |
Constructor Summary | |
DefaultViewContext()
Create a DefaultViewContext |
|
DefaultViewContext(ViewCapabilities ivc,
javax.servlet.http.HttpServletRequest ireq,
javax.servlet.http.HttpServletResponse iresp)
Create a DefaultViewContext for a specific ViewCapabilities obj |
|
DefaultViewContext(ViewEventContext ivec)
Create a DefaultViewContext for a specific EventContext |
Method Summary | |
void |
clearState()
clear all state information |
Document |
getDocument()
Get the underlying template Document (if it exists - note that the ViewContext may be constructed BEFORE the Document has actually been loaded yet, so this property may not be available immediately after object creation. |
EventContext |
getEventContext()
Get the underlying EventContext object |
javax.servlet.http.HttpServletRequest |
getRequest()
Get the underlying HttpServletRequest |
javax.servlet.http.HttpServletResponse |
getResponse()
Get the underlying HttpServletResponse |
Object |
getState(Object key)
get a property in this StateMap |
Set |
getStateKeys()
get a keyset for this StateMap (whether or not the set is backed by the data store depends on the implementation) |
Map |
getStateStore()
get a copy of the underlying Map |
Node |
getTemplateNode()
Get the underlying template Node (if it exists) |
ViewCapabilities |
getViewCapabilities()
Get the underlying ViewCapabilities object |
void |
putState(Object key,
Object val)
set a property in this StateMap |
Object |
removeState(Object key)
remove a property in this StateMap |
void |
setDocument(Document document)
Set the underlying template Document (note that this method is NOT part of the ViewContext interface) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultViewContext()
public DefaultViewContext(ViewCapabilities ivc, javax.servlet.http.HttpServletRequest ireq, javax.servlet.http.HttpServletResponse iresp)
public DefaultViewContext(ViewEventContext ivec)
Method Detail |
public ViewCapabilities getViewCapabilities()
getViewCapabilities
in interface ViewContext
public EventContext getEventContext()
getEventContext
in interface ViewContext
public Node getTemplateNode()
getTemplateNode
in interface ViewContext
public void setDocument(Document document)
public Document getDocument()
getDocument
in interface ViewContext
public javax.servlet.http.HttpServletRequest getRequest()
getRequest
in interface ViewContext
public javax.servlet.http.HttpServletResponse getResponse()
getResponse
in interface ViewContext
public void putState(Object key, Object val)
putState
in interface StateMap
key
- the state key objectval
- the state value objectpublic Object getState(Object key)
getState
in interface StateMap
key
- the state key object
public Object removeState(Object key)
removeState
in interface StateMap
key
- the key object
public Set getStateKeys()
getStateKeys
in interface StateMap
public Map getStateStore()
getStateStore
in interface StateMap
public void clearState()
clearState
in interface StateMap
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |