org.mmbase.applications.vprowizards.spring
Class ResultContainer

java.lang.Object
  extended by org.mmbase.applications.vprowizards.spring.ResultContainer

public class ResultContainer
extends Object

this class acts as a wrapper for everything that needs to be passed to all the actions that need execution for a request.

Author:
Rob Vermeulen (VPRO), Ernst Bunders

Field Summary
(package private)  HttpServletRequest request
           
(package private)  HttpServletResponse response
           
 
Constructor Summary
ResultContainer(HttpServletRequest request, HttpServletResponse response, Transaction transaction, Locale locale)
           
 
Method Summary
 void addCacheFlushHint(CacheFlushHint hint)
           
 void addFieldError(FieldError e)
          Add a field error to this request.
 void addGlobalError(GlobalError e)
          Add a global error to this request.
 void addParamToReturnURL(String name, Node node)
          Add a parameter to the url the request is forwarded to.
 void addParamToReturnURL(String name, ParamValueResolver valueResolver)
          Add a parameter to the url the request is forwarded to.
 void addParamToReturnURL(String name, String value)
          Add a parameter to the url the request is forwarded to.
 List<CacheFlushHint> getCacheFlushHints()
           
 Map<String,String> getExtraParams()
           
 List<FieldError> getFieldErrors()
           
 List<GlobalError> getGlobalErrors()
           
 Map<String,Node> getIdMap()
           
 Locale getLocale()
           
 HttpServletRequest getRequest()
           
 HttpServletResponse getResponse()
           
 Transaction getTransaction()
           
 boolean hasFieldErrors()
           
 boolean hasGlobalErrors()
           
 void setRequest(HttpServletRequest request)
           
 void setResponse(HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

HttpServletRequest request

response

HttpServletResponse response
Constructor Detail

ResultContainer

public ResultContainer(HttpServletRequest request,
                       HttpServletResponse response,
                       Transaction transaction,
                       Locale locale)
Method Detail

getFieldErrors

public List<FieldError> getFieldErrors()

getGlobalErrors

public List<GlobalError> getGlobalErrors()

addParamToReturnURL

public void addParamToReturnURL(String name,
                                ParamValueResolver valueResolver)
Add a parameter to the url the request is forwarded to. this should be done by the ModelAndViewResolver.

Parameters:
name - the name of the parameter
valueResolver -

addParamToReturnURL

public void addParamToReturnURL(String name,
                                Node node)
Add a parameter to the url the request is forwarded to. this should be done by the ModelAndViewResolver. Use this method if you want to add the number of a newly created node to the request. This is done by the action class, but the node is only commited yet when the action is executed. So we need the node to get the number after the transaction is committed.

Parameters:
name - the name of the parameter
node - the number of this node will be the value of the param

addParamToReturnURL

public void addParamToReturnURL(String name,
                                String value)
Add a parameter to the url the request is forwarded to. this should be done by the ModelAndViewResolver.

Parameters:
name - the name of the parameter
value - the value for this new parameter

getExtraParams

public Map<String,String> getExtraParams()
Returns:
a map of parameters that should be added to the return request.

addGlobalError

public void addGlobalError(GlobalError e)
Add a global error to this request. Global errors will cause the request to be redirected to the error page.

Parameters:
e -

addFieldError

public void addFieldError(FieldError e)
Add a field error to this request. Field errors will be displayed in the page that caused the error and should be displayed in this context. Mainly for validation.

Parameters:
e -

hasFieldErrors

public boolean hasFieldErrors()

hasGlobalErrors

public boolean hasGlobalErrors()

getRequest

public HttpServletRequest getRequest()

setRequest

public void setRequest(HttpServletRequest request)

getResponse

public HttpServletResponse getResponse()

setResponse

public void setResponse(HttpServletResponse response)

addCacheFlushHint

public void addCacheFlushHint(CacheFlushHint hint)

getCacheFlushHints

public List<CacheFlushHint> getCacheFlushHints()

getIdMap

public Map<String,Node> getIdMap()

getTransaction

public Transaction getTransaction()

getLocale

public Locale getLocale()


MMBase 2.0-SNAPSHOT - null