nl.gx.webmanager.springmvc
Class EditContextImpl

java.lang.Object
  extended by nl.gx.webmanager.springmvc.EditContextImpl
All Implemented Interfaces:
EditContext

public class EditContextImpl
extends java.lang.Object
implements EditContext

Implementation of the EditContext interface. Contains a stack of objects. Current active object in the active jsp is on top of the stack.

Author:
arjans

Field Summary
 
Fields inherited from interface nl.gx.webmanager.springmvc.EditContext
EDIT_CONTEXT_KEY
 
Constructor Summary
EditContextImpl(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Constructor.
 
Method Summary
 void addDelegatedController(java.lang.Object object, DelegatedController delegatedController)
           
 void addExtension(java.lang.Object object, ExtensionProvider extensionProvider)
           
 void addModelAndView(java.lang.Object object, org.springframework.web.servlet.ModelAndView modelAndView)
          Adds a model and view to the edit context.
 java.lang.Object getBaseModel()
          Return model at the top of the stack.
 java.lang.Object getBaseObject()
          Return object at the top of the stack.
 java.util.Collection<DelegatedController> getDelegatedControllers(java.lang.Object object)
           
 java.util.Collection<ExtensionProvider> getExtensions(java.lang.Object object)
           
 java.lang.Object getFirstObject()
          Returns the first component in the the stack.
 org.springframework.web.servlet.ModelAndView getModelAndView(java.lang.Object object)
          Returns the model and view for the given form backing object
 Website getWebsite()
          Retrieve the website from the user session
 void pop()
          Pop the top object and presentation.
 void popModel()
          Pop the top model.
 void push(java.lang.Object activeObject)
          Add an object and a presentation to the stack.
 void pushModel(java.util.Map<java.lang.String,java.lang.Object> model)
          Add a model and a presentation to the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditContextImpl

public EditContextImpl(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse res)
Constructor. Typically called by the WebManagerController.

Method Detail

getBaseObject

public java.lang.Object getBaseObject()
Description copied from interface: EditContext
Return object at the top of the stack.

Specified by:
getBaseObject in interface EditContext
Returns:
object at the top of the stack.

getBaseModel

public java.lang.Object getBaseModel()
Description copied from interface: EditContext
Return model at the top of the stack.

Specified by:
getBaseModel in interface EditContext
Returns:
model at the top of the stack.

pop

public void pop()
Description copied from interface: EditContext
Pop the top object and presentation.

Specified by:
pop in interface EditContext

popModel

public void popModel()
Description copied from interface: EditContext
Pop the top model.

Specified by:
popModel in interface EditContext

push

public void push(java.lang.Object activeObject)
Description copied from interface: EditContext
Add an object and a presentation to the stack.

Specified by:
push in interface EditContext

pushModel

public void pushModel(java.util.Map<java.lang.String,java.lang.Object> model)
Description copied from interface: EditContext
Add a model and a presentation to the stack.

Specified by:
pushModel in interface EditContext

getFirstObject

public java.lang.Object getFirstObject()
Description copied from interface: EditContext
Returns the first component in the the stack.

Specified by:
getFirstObject in interface EditContext
Returns:
the first component in the the stack.

getWebsite

public Website getWebsite()
Description copied from interface: EditContext
Retrieve the website from the user session

Specified by:
getWebsite in interface EditContext
Returns:
The website

addModelAndView

public void addModelAndView(java.lang.Object object,
                            org.springframework.web.servlet.ModelAndView modelAndView)
Adds a model and view to the edit context.

Specified by:
addModelAndView in interface EditContext
Parameters:
object - Form backing object to set the model and view for
modelAndView - Model and View to set for the object

getModelAndView

public org.springframework.web.servlet.ModelAndView getModelAndView(java.lang.Object object)
Returns the model and view for the given form backing object

Specified by:
getModelAndView in interface EditContext
Parameters:
object - Form backing object to retrieve the model and view from
Returns:
The model and view for the given form backing object

getExtensions

public java.util.Collection<ExtensionProvider> getExtensions(java.lang.Object object)
Specified by:
getExtensions in interface EditContext

addExtension

public void addExtension(java.lang.Object object,
                         ExtensionProvider extensionProvider)
Specified by:
addExtension in interface EditContext

getDelegatedControllers

public java.util.Collection<DelegatedController> getDelegatedControllers(java.lang.Object object)
Specified by:
getDelegatedControllers in interface EditContext

addDelegatedController

public void addDelegatedController(java.lang.Object object,
                                   DelegatedController delegatedController)
Specified by:
addDelegatedController in interface EditContext


Copyright © 2007-2011 GX Software BV. All Rights Reserved.