Package de.xima.fc.form.render
Class FormRenderContext
- java.lang.Object
-
- de.xima.fc.form.render.FormRenderContext
-
- All Implemented Interfaces:
IFormRenderContext
,Serializable
- Direct Known Subclasses:
ExtendedFormRenderContext
public class FormRenderContext extends Object implements IFormRenderContext
Context of an form-render-request with data for an renderer-call- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
FormRenderContext(IFormRequestContext requestCtx)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.form.IFormRenderContext
getBenutzer, getBenutzerGruppen, getRequestContext, setBenutzer, setBenutzerGruppen, setRequestContext
-
-
-
-
Field Detail
-
requestCtx
protected IFormRequestContext requestCtx
-
fieldContainerMap
protected Map<String,FormContainerMetaData> fieldContainerMap
-
customNodes
protected List<com.hp.gagawa.java.Node> customNodes
-
formUploadList
protected List<Attachment> formUploadList
-
benutzerGruppen
protected List<BenutzerGruppe> benutzerGruppen
-
isExternal
protected boolean isExternal
-
status
protected Status status
-
workflowState
protected WorkflowState workflowState
-
usesNewWorkflow
protected boolean usesNewWorkflow
-
themeTextbaustein
protected Textbaustein themeTextbaustein
-
hideRequiredHint
protected boolean hideRequiredHint
-
buttonDescriptor
protected XButtonDescriptor buttonDescriptor
-
submitURL
protected String submitURL
-
baseURL
protected String baseURL
-
xFormConfig
protected IXFormRenderConfig xFormConfig
-
i18nJson
protected com.alibaba.fastjson.JSONObject i18nJson
-
-
Constructor Detail
-
FormRenderContext
protected FormRenderContext(IFormRequestContext requestCtx) throws ContextBuilderException
- Throws:
ContextBuilderException
-
-
Method Detail
-
getUserContext
public UserContext getUserContext()
- Specified by:
getUserContext
in interfaceIFormRenderContext
-
setUserContext
public void setUserContext(UserContext userContext)
- Specified by:
setUserContext
in interfaceIFormRenderContext
-
getHiddenInputParameter
public Map<String,String> getHiddenInputParameter()
- Specified by:
getHiddenInputParameter
in interfaceIFormRenderContext
-
addHiddenInputParameter
public void addHiddenInputParameter(String key, String value)
- Specified by:
addHiddenInputParameter
in interfaceIFormRenderContext
-
setHiddenInputParameters
public void setHiddenInputParameters(Map<String,String> hiddenInputParameters)
- Specified by:
setHiddenInputParameters
in interfaceIFormRenderContext
-
getProzessParameter
public Map<String,List<String>> getProzessParameter()
- Specified by:
getProzessParameter
in interfaceIFormRenderContext
-
addProzessParameter
public void addProzessParameter(String key, List<String> value)
- Specified by:
addProzessParameter
in interfaceIFormRenderContext
-
setProzessParameter
public void setProzessParameter(Map<String,List<String>> prozessParameters)
- Specified by:
setProzessParameter
in interfaceIFormRenderContext
-
getRenderParameter
public Map<String,List<String>> getRenderParameter()
- Specified by:
getRenderParameter
in interfaceIFormRenderContext
-
addRenderParameter
public void addRenderParameter(String key, List<String> value)
- Specified by:
addRenderParameter
in interfaceIFormRenderContext
-
setRenderParameter
public void setRenderParameter(Map<String,List<String>> renderParameters)
- Specified by:
setRenderParameter
in interfaceIFormRenderContext
-
getUrlParameter
public Map<String,List<String>> getUrlParameter()
- Specified by:
getUrlParameter
in interfaceIFormRenderContext
-
addUrlParameter
public void addUrlParameter(String key, List<String> value)
- Specified by:
addUrlParameter
in interfaceIFormRenderContext
-
setUrlParameter
public void setUrlParameter(Map<String,List<String>> urlParameter)
- Specified by:
setUrlParameter
in interfaceIFormRenderContext
-
getPluginMetaMap
public Map<String,com.alibaba.fastjson.JSONObject> getPluginMetaMap()
- Specified by:
getPluginMetaMap
in interfaceIFormRenderContext
-
addPluginMeta
public void addPluginMeta(String key, com.alibaba.fastjson.JSONObject value)
- Specified by:
addPluginMeta
in interfaceIFormRenderContext
-
setPluginMetaMap
public void setPluginMetaMap(Map<String,com.alibaba.fastjson.JSONObject> pluginMetaMap)
- Specified by:
setPluginMetaMap
in interfaceIFormRenderContext
-
getCustomNodes
public List<com.hp.gagawa.java.Node> getCustomNodes()
- Specified by:
getCustomNodes
in interfaceIFormRenderContext
-
addCustomNode
public void addCustomNode(com.hp.gagawa.java.Node node)
- Specified by:
addCustomNode
in interfaceIFormRenderContext
-
setCustomNodes
public void setCustomNodes(List<com.hp.gagawa.java.Node> customNodes)
- Specified by:
setCustomNodes
in interfaceIFormRenderContext
-
getValuesMap
public Map<String,List<String[]>> getValuesMap()
- Specified by:
getValuesMap
in interfaceIFormRenderContext
-
setValuesMap
public void setValuesMap(Map<String,List<String[]>> valuesMap)
- Specified by:
setValuesMap
in interfaceIFormRenderContext
-
getCustomValuesMap
public Map<String,List<String[]>> getCustomValuesMap()
- Specified by:
getCustomValuesMap
in interfaceIFormRenderContext
-
setCustomValuesMap
public void setCustomValuesMap(Map<String,List<String[]>> customValuesMap)
- Specified by:
setCustomValuesMap
in interfaceIFormRenderContext
-
getFRQSession
public FRQSession getFRQSession()
- Specified by:
getFRQSession
in interfaceIFormRenderContext
-
setFRQSession
public void setFRQSession(FRQSession frqSession)
- Specified by:
setFRQSession
in interfaceIFormRenderContext
-
getSession
public XfcSession getSession()
- Specified by:
getSession
in interfaceIFormRenderContext
-
setSession
public void setSession(XfcSession session)
- Specified by:
setSession
in interfaceIFormRenderContext
-
getProjekt
public Projekt getProjekt()
- Specified by:
getProjekt
in interfaceIFormRenderContext
-
setProjekt
public void setProjekt(Projekt projekt)
- Specified by:
setProjekt
in interfaceIFormRenderContext
-
getFormVersion
public FormVersion getFormVersion()
- Specified by:
getFormVersion
in interfaceIFormRenderContext
-
setFormVersion
public void setFormVersion(FormVersion formVersion)
- Specified by:
setFormVersion
in interfaceIFormRenderContext
-
getUser
public Benutzer getUser()
- Specified by:
getUser
in interfaceIFormRenderContext
-
setUser
public void setUser(Benutzer benutzer)
- Specified by:
setUser
in interfaceIFormRenderContext
-
getVorgang
public Vorgang getVorgang()
- Specified by:
getVorgang
in interfaceIFormRenderContext
-
setVorgang
public void setVorgang(Vorgang vorgang)
- Specified by:
setVorgang
in interfaceIFormRenderContext
-
getUserProfile
public org.pac4j.core.profile.CommonProfile getUserProfile()
- Specified by:
getUserProfile
in interfaceIFormRenderContext
-
setUserProfile
public void setUserProfile(org.pac4j.core.profile.CommonProfile profile)
- Specified by:
setUserProfile
in interfaceIFormRenderContext
-
getMandant
public Mandant getMandant()
- Specified by:
getMandant
in interfaceIFormRenderContext
-
setMandant
public void setMandant(Mandant mandant)
- Specified by:
setMandant
in interfaceIFormRenderContext
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfaceIFormRenderContext
-
setLocale
public void setLocale(Locale locale)
- Specified by:
setLocale
in interfaceIFormRenderContext
-
getUserGroups
public List<BenutzerGruppe> getUserGroups()
- Specified by:
getUserGroups
in interfaceIFormRenderContext
-
setUserGroups
public void setUserGroups(List<BenutzerGruppe> benutzerGruppen)
- Specified by:
setUserGroups
in interfaceIFormRenderContext
-
createUserDataJSON
public com.alibaba.fastjson.JSONObject createUserDataJSON()
- Specified by:
createUserDataJSON
in interfaceIFormRenderContext
-
getSessionAttributeMap
public Map<String,Serializable> getSessionAttributeMap()
- Specified by:
getSessionAttributeMap
in interfaceIFormRenderContext
- Returns:
- A
Map
of all key-value pairs in the currentHttpSession
. Please note that changes to this map will not affect theHttpSession
.
-
setSessionAttributeMap
public void setSessionAttributeMap(Map<String,Serializable> sessionAttributes)
- Specified by:
setSessionAttributeMap
in interfaceIFormRenderContext
-
getSessionTimeout
public Duration getSessionTimeout()
- Specified by:
getSessionTimeout
in interfaceIFormRenderContext
- Returns:
- The time it takes for an HTTP session on the server to timeout. This relates to the server which provided the form, the timeout may be different depending on the server.
-
setSessionTimeout
public void setSessionTimeout(Duration timeout)
- Specified by:
setSessionTimeout
in interfaceIFormRenderContext
- Parameters:
timeout
- The time it takes for an HTTP session on the server to timeout. This relates to the server which provided the form, the timeout may be different depending on the server.
-
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrl
in interfaceIFormRenderContext
-
setBaseUrl
public void setBaseUrl(String baseURI)
- Specified by:
setBaseUrl
in interfaceIFormRenderContext
-
getSessionID
public String getSessionID()
- Specified by:
getSessionID
in interfaceIFormRenderContext
-
setSessionID
public void setSessionID(String sessionID)
- Specified by:
setSessionID
in interfaceIFormRenderContext
-
getRequestType
public EFormRequestType getRequestType()
- Specified by:
getRequestType
in interfaceIFormRenderContext
-
setRequestType
public void setRequestType(EFormRequestType requestType)
- Specified by:
setRequestType
in interfaceIFormRenderContext
-
getParameterWrapper
public ParameterWrapper getParameterWrapper()
- Specified by:
getParameterWrapper
in interfaceIFormRenderContext
-
setParameterWrapper
@Deprecated public void setParameterWrapper(ParameterWrapper parameterWrapper)
Deprecated.- Specified by:
setParameterWrapper
in interfaceIFormRenderContext
-
getStatus
public Status getStatus()
- Specified by:
getStatus
in interfaceIFormRenderContext
- Returns:
- A state of the form record to use for rendering the form.
-
setStatus
public void setStatus(Status status)
- Specified by:
setStatus
in interfaceIFormRenderContext
- Parameters:
status
- A state of the form record to use for rendering the form.
-
getSubmitURL
public String getSubmitURL()
- Specified by:
getSubmitURL
in interfaceIFormRenderContext
-
setSubmitURL
public void setSubmitURL(String submitUrl)
- Specified by:
setSubmitURL
in interfaceIFormRenderContext
-
isExternal
public boolean isExternal()
- Specified by:
isExternal
in interfaceIFormRenderContext
-
setExternal
public void setExternal(boolean isExternal)
- Specified by:
setExternal
in interfaceIFormRenderContext
-
isUsesNewWorkflow
public boolean isUsesNewWorkflow()
- Specified by:
isUsesNewWorkflow
in interfaceIFormRenderContext
-
setUsesNewWorkflow
public void setUsesNewWorkflow(boolean usesNewWorkflow)
- Specified by:
setUsesNewWorkflow
in interfaceIFormRenderContext
-
getWorkflowState
public WorkflowState getWorkflowState()
- Specified by:
getWorkflowState
in interfaceIFormRenderContext
-
setWorkflowState
public void setWorkflowState(WorkflowState workflowState)
- Specified by:
setWorkflowState
in interfaceIFormRenderContext
-
getXFormConfig
public IXFormRenderConfig getXFormConfig()
- Specified by:
getXFormConfig
in interfaceIFormRenderContext
-
setXFormConfig
public void setXFormConfig(IXFormRenderConfig xFormConfig)
- Specified by:
setXFormConfig
in interfaceIFormRenderContext
-
encodeURL
public String encodeURL(String url)
- Specified by:
encodeURL
in interfaceIFormRenderContext
-
getFormUploadList
public List<Attachment> getFormUploadList()
- Specified by:
getFormUploadList
in interfaceIFormRenderContext
-
setFormUploadList
public void setFormUploadList(List<Attachment> formUploadList)
- Specified by:
setFormUploadList
in interfaceIFormRenderContext
-
setI18nJSON
public void setI18nJSON(com.alibaba.fastjson.JSONObject i18nJson)
- Specified by:
setI18nJSON
in interfaceIFormRenderContext
-
getI18nJSON
public com.alibaba.fastjson.JSONObject getI18nJSON()
- Specified by:
getI18nJSON
in interfaceIFormRenderContext
-
getDynContainerMap
public Map<String,FormContainerMetaData> getDynContainerMap()
- Specified by:
getDynContainerMap
in interfaceIFormRenderContext
- Returns:
- A map between the name of a repeated container and its metadata. No mapping is present when the containeris not repeated.
-
setDynContainerMap
public void setDynContainerMap(Map<String,FormContainerMetaData> fieldContainerMap)
- Specified by:
setDynContainerMap
in interfaceIFormRenderContext
- Parameters:
fieldContainerMap
- A map between the name of a form field and the (repetition) container that contains the form field. No mapping is present when the form field is not repeated.
-
getFormRequestContext
public IFormRequestContext getFormRequestContext()
- Specified by:
getFormRequestContext
in interfaceIFormRenderContext
-
setFormRequestContext
public void setFormRequestContext(IFormRequestContext requestCtx)
- Specified by:
setFormRequestContext
in interfaceIFormRenderContext
-
getThemeTextbaustein
public Textbaustein getThemeTextbaustein()
- Specified by:
getThemeTextbaustein
in interfaceIFormRenderContext
-
setThemeTextbaustein
public void setThemeTextbaustein(Textbaustein themeTextbaustein)
- Specified by:
setThemeTextbaustein
in interfaceIFormRenderContext
-
getProjectResourceMap
public Map<EFormResourceType,List<ProjektRessource>> getProjectResourceMap()
- Specified by:
getProjectResourceMap
in interfaceIFormRenderContext
-
setProjectResourceMap
public void setProjectResourceMap(Map<EFormResourceType,List<ProjektRessource>> resMap)
- Specified by:
setProjectResourceMap
in interfaceIFormRenderContext
-
isHideRequiredHint
public boolean isHideRequiredHint()
- Specified by:
isHideRequiredHint
in interfaceIFormRenderContext
-
setHideRequiredHint
public void setHideRequiredHint(boolean isShowRequiredHint)
- Specified by:
setHideRequiredHint
in interfaceIFormRenderContext
-
getButtonDescriptor
public XButtonDescriptor getButtonDescriptor()
- Specified by:
getButtonDescriptor
in interfaceIFormRenderContext
-
setButtonDescriptor
public void setButtonDescriptor(XButtonDescriptor buttonDescriptor)
- Specified by:
setButtonDescriptor
in interfaceIFormRenderContext
-
getProjectResources
public List<ProjektRessource> getProjectResources(EFormResourceType type)
- Specified by:
getProjectResources
in interfaceIFormRenderContext
-
setProjectResources
public void setProjectResources(EFormResourceType type, List<ProjektRessource> resources)
- Specified by:
setProjectResources
in interfaceIFormRenderContext
-
getClientResourceMap
public Map<EFormResourceType,List<MandantRessource>> getClientResourceMap()
- Specified by:
getClientResourceMap
in interfaceIFormRenderContext
-
setClientResourceMap
public void setClientResourceMap(Map<EFormResourceType,List<MandantRessource>> resMap)
- Specified by:
setClientResourceMap
in interfaceIFormRenderContext
-
getClientResources
public List<MandantRessource> getClientResources(EFormResourceType type)
- Specified by:
getClientResources
in interfaceIFormRenderContext
-
setClientResources
public void setClientResources(EFormResourceType type, List<MandantRessource> resources)
- Specified by:
setClientResources
in interfaceIFormRenderContext
-
getClientPluginResourceMap
public Map<EFormResourceType,List<IFormResource>> getClientPluginResourceMap()
- Specified by:
getClientPluginResourceMap
in interfaceIFormRenderContext
-
setClientPluginResourceMap
public void setClientPluginResourceMap(Map<EFormResourceType,List<IFormResource>> resMap)
- Specified by:
setClientPluginResourceMap
in interfaceIFormRenderContext
-
getClientPluginResources
public List<IFormResource> getClientPluginResources(EFormResourceType type)
- Specified by:
getClientPluginResources
in interfaceIFormRenderContext
-
setClientPluginResources
public void setClientPluginResources(EFormResourceType type, List<IFormResource> resources)
- Specified by:
setClientPluginResources
in interfaceIFormRenderContext
-
getSystemPluginResourceMap
public Map<EFormResourceType,List<IFormResource>> getSystemPluginResourceMap()
- Specified by:
getSystemPluginResourceMap
in interfaceIFormRenderContext
-
setSystemPluginResourceMap
public void setSystemPluginResourceMap(Map<EFormResourceType,List<IFormResource>> resMap)
- Specified by:
setSystemPluginResourceMap
in interfaceIFormRenderContext
-
getSystemPluginResources
public List<IFormResource> getSystemPluginResources(EFormResourceType type)
- Specified by:
getSystemPluginResources
in interfaceIFormRenderContext
-
setSystemPluginResources
public void setSystemPluginResources(EFormResourceType type, List<IFormResource> resources)
- Specified by:
setSystemPluginResources
in interfaceIFormRenderContext
-
buildXForm
public IXForm buildXForm() throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContext
builds theIXForm
from the context- Specified by:
buildXForm
in interfaceIFormRenderContext
- Returns:
- the created
IXForm
- Throws:
IOException
- on errors while reading the formcom.alibaba.fastjson.JSONException
- on errors while generating the formsJSONObject
-
buildXFormConfig
public IXFormRenderConfig buildXFormConfig() throws IOException
Description copied from interface:IFormRenderContext
builds theIXFormRenderConfig
from the context- Specified by:
buildXFormConfig
in interfaceIFormRenderContext
- Returns:
- the created
IXFormRenderConfig
- Throws:
IOException
- on errors while reading the form
-
buildXFormJSON
public com.alibaba.fastjson.JSONObject buildXFormJSON() throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContext
builds theJSONObject
from the render-context- Specified by:
buildXFormJSON
in interfaceIFormRenderContext
- Returns:
- the created
JSONObject
- Throws:
IOException
- on errors while reading the formcom.alibaba.fastjson.JSONException
- on errors while generating the formsJSONObject
-
render
public String render() throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContext
renders the context and returns the result asString
- Specified by:
render
in interfaceIFormRenderContext
- Returns:
- the rendered form as
String
- Throws:
IOException
- on errors while reading or rendering the formcom.alibaba.fastjson.JSONException
- on errors while generating the formsJSONObject
-
render
public void render(IExtendedFormRequestContext requestCtx) throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContext
renders the context to theHttpServletResponse
of the givenIExtendedFormRequestContext
- Specified by:
render
in interfaceIFormRenderContext
- Parameters:
requestCtx
-IExtendedFormRequestContext
whichHttpServletResponse
should be used- Throws:
IOException
- on errors while reading or rendering the formcom.alibaba.fastjson.JSONException
- on errors while generating the formsJSONObject
-
render
public void render(javax.servlet.http.HttpServletResponse response) throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContext
renders the context to the givenHttpServletResponse
- Specified by:
render
in interfaceIFormRenderContext
- Parameters:
response
-HttpServletResponse
which should be used- Throws:
IOException
- on errors while reading or rendering the formcom.alibaba.fastjson.JSONException
- on errors while generating the formsJSONObject
-
getSessionAttributes
@Deprecated public SessionAttributes getSessionAttributes()
Deprecated.- Specified by:
getSessionAttributes
in interfaceIFormRenderContext
-
setSessionAttributes
@Deprecated public void setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.- Specified by:
setSessionAttributes
in interfaceIFormRenderContext
-
getRequestParameters
@Deprecated public ParameterWrapper getRequestParameters()
Deprecated.- Specified by:
getRequestParameters
in interfaceIFormRenderContext
-
setRequestParameters
@Deprecated public void setRequestParameters(ParameterWrapper requestParameters)
Deprecated.- Specified by:
setRequestParameters
in interfaceIFormRenderContext
-
getUrlParamMap
@Deprecated public Map<String,List<String>> getUrlParamMap()
Deprecated.- Specified by:
getUrlParamMap
in interfaceIFormRenderContext
-
getMandantJsResources
@Deprecated public List<MandantRessource> getMandantJsResources()
Deprecated.- Specified by:
getMandantJsResources
in interfaceIFormRenderContext
-
setMandantJsResources
@Deprecated public void setMandantJsResources(List<MandantRessource> jsMandantResources)
Deprecated.- Specified by:
setMandantJsResources
in interfaceIFormRenderContext
-
getMandantCssResources
@Deprecated public List<MandantRessource> getMandantCssResources()
Deprecated.- Specified by:
getMandantCssResources
in interfaceIFormRenderContext
-
setMandantCssResources
@Deprecated public void setMandantCssResources(List<MandantRessource> cssMandantResources)
Deprecated.- Specified by:
setMandantCssResources
in interfaceIFormRenderContext
-
getProjektJsResources
@Deprecated public List<ProjektRessource> getProjektJsResources()
Deprecated.- Specified by:
getProjektJsResources
in interfaceIFormRenderContext
-
setProjektJsResources
@Deprecated public void setProjektJsResources(List<ProjektRessource> jsProjektResources)
Deprecated.- Specified by:
setProjektJsResources
in interfaceIFormRenderContext
-
getProjektCssResources
@Deprecated public List<ProjektRessource> getProjektCssResources()
Deprecated.- Specified by:
getProjektCssResources
in interfaceIFormRenderContext
-
setProjektCssResources
@Deprecated public void setProjektCssResources(List<ProjektRessource> cssProjektResources)
Deprecated.- Specified by:
setProjektCssResources
in interfaceIFormRenderContext
-
getSystemPluginJsResources
@Deprecated public List<IFormResource> getSystemPluginJsResources()
Deprecated.- Specified by:
getSystemPluginJsResources
in interfaceIFormRenderContext
-
setSystemPluginJsResources
@Deprecated public void setSystemPluginJsResources(List<IFormResource> jsSystemPluginResources)
Deprecated.- Specified by:
setSystemPluginJsResources
in interfaceIFormRenderContext
-
getSystemPluginCssResources
@Deprecated public List<IFormResource> getSystemPluginCssResources()
Deprecated.- Specified by:
getSystemPluginCssResources
in interfaceIFormRenderContext
-
setSystemPluginCssResources
@Deprecated public void setSystemPluginCssResources(List<IFormResource> cssSystemPluginResources)
Deprecated.- Specified by:
setSystemPluginCssResources
in interfaceIFormRenderContext
-
getMandantPluginJsResources
@Deprecated public List<IFormResource> getMandantPluginJsResources()
Deprecated.- Specified by:
getMandantPluginJsResources
in interfaceIFormRenderContext
-
setMandantPluginJsResources
@Deprecated public void setMandantPluginJsResources(List<IFormResource> jsMandantPluginResources)
Deprecated.- Specified by:
setMandantPluginJsResources
in interfaceIFormRenderContext
-
getMandantPluginCssResources
@Deprecated public List<IFormResource> getMandantPluginCssResources()
Deprecated.- Specified by:
getMandantPluginCssResources
in interfaceIFormRenderContext
-
setMandantPluginCssResources
@Deprecated public void setMandantPluginCssResources(List<IFormResource> cssMandantPluginResources)
Deprecated.- Specified by:
setMandantPluginCssResources
in interfaceIFormRenderContext
-
-