Package de.xima.fc.form.persist
Class FormPersistContextBuilder
- java.lang.Object
 - 
- de.xima.fc.form.persist.FormPersistContextBuilder
 
 
- 
public class FormPersistContextBuilder extends Object
Builder for creating an form-persist-context.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Constructor Summary
Constructors Constructor Description FormPersistContextBuilder(IFormRequestContext requestCtx, IXForm xform) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFormPersistContextbuild()IExtendedFormPersistContextbuild(IExtendedFormRequestContext requestCtx)builds anIExtendedFormPersistContextbased on theIFormRequestContextan theIXFormof the builder and theIExtendedFormRequestContext.IFormPersistContextbuild(IFormPersistContext persistCtx)builds theIFormPersistContextbased on the given builder data by loading all needed data from the master-server and sets them into the givenIFormPersistContextIExtendedFormPersistContextbuild(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)builds anIExtendedFormPersistContextbased on theIFormRequestContextan theIXFormof the builder and the given parameters.IFormRequestContextgetRequestCtx()IXFormgetXform()booleanisCorrection()voidsetCorrection(boolean correction)voidsetRequestCtx(IFormRequestContext requestCtx)voidsetXform(IXForm xform) 
 - 
 
- 
- 
Constructor Detail
- 
FormPersistContextBuilder
public FormPersistContextBuilder(IFormRequestContext requestCtx, IXForm xform)
- Parameters:
 requestCtx-IFormRequestContextwith data to persistxform-IXFormthe form form of the persist-call
 
 - 
 
- 
Method Detail
- 
build
public IFormPersistContext build() throws ContextBuilderException
builds anIFormPersistContextbased on theIFormRequestContextan theIXFormof the builder. Usesbuild(IFormPersistContext)for loading the requested data.- Returns:
 - the created 
IExtendedFormPersistContext - Throws:
 ContextBuilderException- on errors while creating the context
 
- 
build
public IExtendedFormPersistContext build(IExtendedFormRequestContext requestCtx) throws ContextBuilderException
builds anIExtendedFormPersistContextbased on theIFormRequestContextan theIXFormof the builder and theIExtendedFormRequestContext. Usesbuild(IFormPersistContext)for loading the requested data.- Parameters:
 requestCtx-IExtendedFormRequestContextwith theHttpServletResponseandHttpServletRequestto use for theIExtendedFormPersistContext- Returns:
 - the created 
IExtendedFormPersistContext - Throws:
 ContextBuilderException- on errors while creating the context
 
- 
build
public IExtendedFormPersistContext build(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ContextBuilderException
builds anIExtendedFormPersistContextbased on theIFormRequestContextan theIXFormof the builder and the given parameters. Usesbuild(IFormPersistContext)for loading the requested data.- Parameters:
 request-HttpServletRequestthe request to useresponse-HttpServletResponsethe response to use- Returns:
 - the created 
IExtendedFormPersistContext - Throws:
 ContextBuilderException- on errors while creating the context
 
- 
build
public IFormPersistContext build(IFormPersistContext persistCtx) throws ContextBuilderException
builds theIFormPersistContextbased on the given builder data by loading all needed data from the master-server and sets them into the givenIFormPersistContext- Parameters:
 persistCtx-IFormPersistContextfor which the data should be loaded- Returns:
 - the 
IFormPersistContextextended by the loaded data - Throws:
 ContextBuilderException- on errors while creating the context
 
- 
getRequestCtx
public IFormRequestContext getRequestCtx()
 
- 
setRequestCtx
public void setRequestCtx(IFormRequestContext requestCtx)
 
- 
getXform
public IXForm getXform()
 
- 
setXform
public void setXform(IXForm xform)
 
- 
setCorrection
public void setCorrection(boolean correction)
 
- 
isCorrection
public boolean isCorrection()
 
 - 
 
 -