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 IFormPersistContext
build()
IExtendedFormPersistContext
build(IExtendedFormRequestContext requestCtx)
builds anIExtendedFormPersistContext
based on theIFormRequestContext
an theIXForm
of the builder and theIExtendedFormRequestContext
.IFormPersistContext
build(IFormPersistContext persistCtx)
builds theIFormPersistContext
based on the given builder data by loading all needed data from the master-server and sets them into the givenIFormPersistContext
IExtendedFormPersistContext
build(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
builds anIExtendedFormPersistContext
based on theIFormRequestContext
an theIXForm
of the builder and the given parameters.IFormRequestContext
getRequestCtx()
IXForm
getXform()
boolean
isCorrection()
void
setCorrection(boolean correction)
void
setRequestCtx(IFormRequestContext requestCtx)
void
setXform(IXForm xform)
-
-
-
Constructor Detail
-
FormPersistContextBuilder
public FormPersistContextBuilder(IFormRequestContext requestCtx, IXForm xform)
- Parameters:
requestCtx
-IFormRequestContext
with data to persistxform
-IXForm
the form form of the persist-call
-
-
Method Detail
-
build
public IFormPersistContext build() throws ContextBuilderException
builds anIFormPersistContext
based on theIFormRequestContext
an theIXForm
of 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 anIExtendedFormPersistContext
based on theIFormRequestContext
an theIXForm
of the builder and theIExtendedFormRequestContext
. Usesbuild(IFormPersistContext)
for loading the requested data.- Parameters:
requestCtx
-IExtendedFormRequestContext
with theHttpServletResponse
andHttpServletRequest
to 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 anIExtendedFormPersistContext
based on theIFormRequestContext
an theIXForm
of the builder and the given parameters. Usesbuild(IFormPersistContext)
for loading the requested data.- Parameters:
request
-HttpServletRequest
the request to useresponse
-HttpServletResponse
the response to use- Returns:
- the created
IExtendedFormPersistContext
- Throws:
ContextBuilderException
- on errors while creating the context
-
build
public IFormPersistContext build(IFormPersistContext persistCtx) throws ContextBuilderException
builds theIFormPersistContext
based on the given builder data by loading all needed data from the master-server and sets them into the givenIFormPersistContext
- Parameters:
persistCtx
-IFormPersistContext
for which the data should be loaded- Returns:
- the
IFormPersistContext
extended 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()
-
-