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 protectedFormRenderContext(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:
getUserContextin interfaceIFormRenderContext
-
setUserContext
public void setUserContext(UserContext userContext)
- Specified by:
setUserContextin interfaceIFormRenderContext
-
getHiddenInputParameter
public Map<String,String> getHiddenInputParameter()
- Specified by:
getHiddenInputParameterin interfaceIFormRenderContext
-
addHiddenInputParameter
public void addHiddenInputParameter(String key, String value)
- Specified by:
addHiddenInputParameterin interfaceIFormRenderContext
-
setHiddenInputParameters
public void setHiddenInputParameters(Map<String,String> hiddenInputParameters)
- Specified by:
setHiddenInputParametersin interfaceIFormRenderContext
-
getProzessParameter
public Map<String,List<String>> getProzessParameter()
- Specified by:
getProzessParameterin interfaceIFormRenderContext
-
addProzessParameter
public void addProzessParameter(String key, List<String> value)
- Specified by:
addProzessParameterin interfaceIFormRenderContext
-
setProzessParameter
public void setProzessParameter(Map<String,List<String>> prozessParameters)
- Specified by:
setProzessParameterin interfaceIFormRenderContext
-
getRenderParameter
public Map<String,List<String>> getRenderParameter()
- Specified by:
getRenderParameterin interfaceIFormRenderContext
-
addRenderParameter
public void addRenderParameter(String key, List<String> value)
- Specified by:
addRenderParameterin interfaceIFormRenderContext
-
setRenderParameter
public void setRenderParameter(Map<String,List<String>> renderParameters)
- Specified by:
setRenderParameterin interfaceIFormRenderContext
-
getUrlParameter
public Map<String,List<String>> getUrlParameter()
- Specified by:
getUrlParameterin interfaceIFormRenderContext
-
addUrlParameter
public void addUrlParameter(String key, List<String> value)
- Specified by:
addUrlParameterin interfaceIFormRenderContext
-
setUrlParameter
public void setUrlParameter(Map<String,List<String>> urlParameter)
- Specified by:
setUrlParameterin interfaceIFormRenderContext
-
getPluginMetaMap
public Map<String,com.alibaba.fastjson.JSONObject> getPluginMetaMap()
- Specified by:
getPluginMetaMapin interfaceIFormRenderContext
-
addPluginMeta
public void addPluginMeta(String key, com.alibaba.fastjson.JSONObject value)
- Specified by:
addPluginMetain interfaceIFormRenderContext
-
setPluginMetaMap
public void setPluginMetaMap(Map<String,com.alibaba.fastjson.JSONObject> pluginMetaMap)
- Specified by:
setPluginMetaMapin interfaceIFormRenderContext
-
getCustomNodes
public List<com.hp.gagawa.java.Node> getCustomNodes()
- Specified by:
getCustomNodesin interfaceIFormRenderContext
-
addCustomNode
public void addCustomNode(com.hp.gagawa.java.Node node)
- Specified by:
addCustomNodein interfaceIFormRenderContext
-
setCustomNodes
public void setCustomNodes(List<com.hp.gagawa.java.Node> customNodes)
- Specified by:
setCustomNodesin interfaceIFormRenderContext
-
getValuesMap
public Map<String,List<String[]>> getValuesMap()
- Specified by:
getValuesMapin interfaceIFormRenderContext
-
setValuesMap
public void setValuesMap(Map<String,List<String[]>> valuesMap)
- Specified by:
setValuesMapin interfaceIFormRenderContext
-
getCustomValuesMap
public Map<String,List<String[]>> getCustomValuesMap()
- Specified by:
getCustomValuesMapin interfaceIFormRenderContext
-
setCustomValuesMap
public void setCustomValuesMap(Map<String,List<String[]>> customValuesMap)
- Specified by:
setCustomValuesMapin interfaceIFormRenderContext
-
getFRQSession
public FRQSession getFRQSession()
- Specified by:
getFRQSessionin interfaceIFormRenderContext
-
setFRQSession
public void setFRQSession(FRQSession frqSession)
- Specified by:
setFRQSessionin interfaceIFormRenderContext
-
getSession
public XfcSession getSession()
- Specified by:
getSessionin interfaceIFormRenderContext
-
setSession
public void setSession(XfcSession session)
- Specified by:
setSessionin interfaceIFormRenderContext
-
getProjekt
public Projekt getProjekt()
- Specified by:
getProjektin interfaceIFormRenderContext
-
setProjekt
public void setProjekt(Projekt projekt)
- Specified by:
setProjektin interfaceIFormRenderContext
-
getFormVersion
public FormVersion getFormVersion()
- Specified by:
getFormVersionin interfaceIFormRenderContext
-
setFormVersion
public void setFormVersion(FormVersion formVersion)
- Specified by:
setFormVersionin interfaceIFormRenderContext
-
getUser
public Benutzer getUser()
- Specified by:
getUserin interfaceIFormRenderContext
-
setUser
public void setUser(Benutzer benutzer)
- Specified by:
setUserin interfaceIFormRenderContext
-
getVorgang
public Vorgang getVorgang()
- Specified by:
getVorgangin interfaceIFormRenderContext
-
setVorgang
public void setVorgang(Vorgang vorgang)
- Specified by:
setVorgangin interfaceIFormRenderContext
-
getUserProfile
public org.pac4j.core.profile.CommonProfile getUserProfile()
- Specified by:
getUserProfilein interfaceIFormRenderContext
-
setUserProfile
public void setUserProfile(org.pac4j.core.profile.CommonProfile profile)
- Specified by:
setUserProfilein interfaceIFormRenderContext
-
getMandant
public Mandant getMandant()
- Specified by:
getMandantin interfaceIFormRenderContext
-
setMandant
public void setMandant(Mandant mandant)
- Specified by:
setMandantin interfaceIFormRenderContext
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfaceIFormRenderContext
-
setLocale
public void setLocale(Locale locale)
- Specified by:
setLocalein interfaceIFormRenderContext
-
getUserGroups
public List<BenutzerGruppe> getUserGroups()
- Specified by:
getUserGroupsin interfaceIFormRenderContext
-
setUserGroups
public void setUserGroups(List<BenutzerGruppe> benutzerGruppen)
- Specified by:
setUserGroupsin interfaceIFormRenderContext
-
createUserDataJSON
public com.alibaba.fastjson.JSONObject createUserDataJSON()
- Specified by:
createUserDataJSONin interfaceIFormRenderContext
-
getSessionAttributeMap
public Map<String,Serializable> getSessionAttributeMap()
- Specified by:
getSessionAttributeMapin interfaceIFormRenderContext
-
setSessionAttributeMap
public void setSessionAttributeMap(Map<String,Serializable> sessionAttributes)
- Specified by:
setSessionAttributeMapin interfaceIFormRenderContext
-
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrlin interfaceIFormRenderContext
-
setBaseUrl
public void setBaseUrl(String baseURI)
- Specified by:
setBaseUrlin interfaceIFormRenderContext
-
getSessionID
public String getSessionID()
- Specified by:
getSessionIDin interfaceIFormRenderContext
-
setSessionID
public void setSessionID(String sessionID)
- Specified by:
setSessionIDin interfaceIFormRenderContext
-
getRequestType
public EFormRequestType getRequestType()
- Specified by:
getRequestTypein interfaceIFormRenderContext
-
setRequestType
public void setRequestType(EFormRequestType requestType)
- Specified by:
setRequestTypein interfaceIFormRenderContext
-
getParameterWrapper
public ParameterWrapper getParameterWrapper()
- Specified by:
getParameterWrapperin interfaceIFormRenderContext
-
setParameterWrapper
@Deprecated public void setParameterWrapper(ParameterWrapper parameterWrapper)
Deprecated.- Specified by:
setParameterWrapperin interfaceIFormRenderContext
-
getStatus
public Status getStatus()
- Specified by:
getStatusin interfaceIFormRenderContext- Returns:
- A state of the form record to use for rendering the form.
-
setStatus
public void setStatus(Status status)
- Specified by:
setStatusin interfaceIFormRenderContext
-
getSubmitURL
public String getSubmitURL()
- Specified by:
getSubmitURLin interfaceIFormRenderContext
-
setSubmitURL
public void setSubmitURL(String submitUrl)
- Specified by:
setSubmitURLin interfaceIFormRenderContext
-
isExternal
public boolean isExternal()
- Specified by:
isExternalin interfaceIFormRenderContext
-
setExternal
public void setExternal(boolean isExternal)
- Specified by:
setExternalin interfaceIFormRenderContext
-
isUsesNewWorkflow
public boolean isUsesNewWorkflow()
- Specified by:
isUsesNewWorkflowin interfaceIFormRenderContext
-
setUsesNewWorkflow
public void setUsesNewWorkflow(boolean usesNewWorkflow)
- Specified by:
setUsesNewWorkflowin interfaceIFormRenderContext
-
getWorkflowState
public WorkflowState getWorkflowState()
- Specified by:
getWorkflowStatein interfaceIFormRenderContext
-
setWorkflowState
public void setWorkflowState(WorkflowState workflowState)
- Specified by:
setWorkflowStatein interfaceIFormRenderContext
-
getXFormConfig
public IXFormRenderConfig getXFormConfig()
- Specified by:
getXFormConfigin interfaceIFormRenderContext
-
setXFormConfig
public void setXFormConfig(IXFormRenderConfig xFormConfig)
- Specified by:
setXFormConfigin interfaceIFormRenderContext
-
encodeURL
public String encodeURL(String url)
- Specified by:
encodeURLin interfaceIFormRenderContext
-
getFormUploadList
public List<Attachment> getFormUploadList()
- Specified by:
getFormUploadListin interfaceIFormRenderContext
-
setFormUploadList
public void setFormUploadList(List<Attachment> formUploadList)
- Specified by:
setFormUploadListin interfaceIFormRenderContext
-
setI18nJSON
public void setI18nJSON(com.alibaba.fastjson.JSONObject i18nJson)
- Specified by:
setI18nJSONin interfaceIFormRenderContext
-
getI18nJSON
public com.alibaba.fastjson.JSONObject getI18nJSON()
- Specified by:
getI18nJSONin interfaceIFormRenderContext
-
getDynContainerMap
public Map<String,FormContainerMetaData> getDynContainerMap()
- Specified by:
getDynContainerMapin 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:
setDynContainerMapin 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:
getFormRequestContextin interfaceIFormRenderContext
-
setFormRequestContext
public void setFormRequestContext(IFormRequestContext requestCtx)
- Specified by:
setFormRequestContextin interfaceIFormRenderContext
-
getThemeTextbaustein
public Textbaustein getThemeTextbaustein()
- Specified by:
getThemeTextbausteinin interfaceIFormRenderContext
-
setThemeTextbaustein
public void setThemeTextbaustein(Textbaustein themeTextbaustein)
- Specified by:
setThemeTextbausteinin interfaceIFormRenderContext
-
getProjectResourceMap
public Map<EFormResourceType,List<ProjektRessource>> getProjectResourceMap()
- Specified by:
getProjectResourceMapin interfaceIFormRenderContext
-
setProjectResourceMap
public void setProjectResourceMap(Map<EFormResourceType,List<ProjektRessource>> resMap)
- Specified by:
setProjectResourceMapin interfaceIFormRenderContext
-
isHideRequiredHint
public boolean isHideRequiredHint()
- Specified by:
isHideRequiredHintin interfaceIFormRenderContext
-
setHideRequiredHint
public void setHideRequiredHint(boolean isShowRequiredHint)
- Specified by:
setHideRequiredHintin interfaceIFormRenderContext
-
getButtonDescriptor
public XButtonDescriptor getButtonDescriptor()
- Specified by:
getButtonDescriptorin interfaceIFormRenderContext
-
setButtonDescriptor
public void setButtonDescriptor(XButtonDescriptor buttonDescriptor)
- Specified by:
setButtonDescriptorin interfaceIFormRenderContext
-
getProjectResources
public List<ProjektRessource> getProjectResources(EFormResourceType type)
- Specified by:
getProjectResourcesin interfaceIFormRenderContext
-
setProjectResources
public void setProjectResources(EFormResourceType type, List<ProjektRessource> resources)
- Specified by:
setProjectResourcesin interfaceIFormRenderContext
-
getClientResourceMap
public Map<EFormResourceType,List<MandantRessource>> getClientResourceMap()
- Specified by:
getClientResourceMapin interfaceIFormRenderContext
-
setClientResourceMap
public void setClientResourceMap(Map<EFormResourceType,List<MandantRessource>> resMap)
- Specified by:
setClientResourceMapin interfaceIFormRenderContext
-
getClientResources
public List<MandantRessource> getClientResources(EFormResourceType type)
- Specified by:
getClientResourcesin interfaceIFormRenderContext
-
setClientResources
public void setClientResources(EFormResourceType type, List<MandantRessource> resources)
- Specified by:
setClientResourcesin interfaceIFormRenderContext
-
getClientPluginResourceMap
public Map<EFormResourceType,List<IFormResource>> getClientPluginResourceMap()
- Specified by:
getClientPluginResourceMapin interfaceIFormRenderContext
-
setClientPluginResourceMap
public void setClientPluginResourceMap(Map<EFormResourceType,List<IFormResource>> resMap)
- Specified by:
setClientPluginResourceMapin interfaceIFormRenderContext
-
getClientPluginResources
public List<IFormResource> getClientPluginResources(EFormResourceType type)
- Specified by:
getClientPluginResourcesin interfaceIFormRenderContext
-
setClientPluginResources
public void setClientPluginResources(EFormResourceType type, List<IFormResource> resources)
- Specified by:
setClientPluginResourcesin interfaceIFormRenderContext
-
getSystemPluginResourceMap
public Map<EFormResourceType,List<IFormResource>> getSystemPluginResourceMap()
- Specified by:
getSystemPluginResourceMapin interfaceIFormRenderContext
-
setSystemPluginResourceMap
public void setSystemPluginResourceMap(Map<EFormResourceType,List<IFormResource>> resMap)
- Specified by:
setSystemPluginResourceMapin interfaceIFormRenderContext
-
getSystemPluginResources
public List<IFormResource> getSystemPluginResources(EFormResourceType type)
- Specified by:
getSystemPluginResourcesin interfaceIFormRenderContext
-
setSystemPluginResources
public void setSystemPluginResources(EFormResourceType type, List<IFormResource> resources)
- Specified by:
setSystemPluginResourcesin interfaceIFormRenderContext
-
buildXForm
public IXForm buildXForm() throws IOException, com.alibaba.fastjson.JSONException
Description copied from interface:IFormRenderContextbuilds theIXFormfrom the context- Specified by:
buildXFormin 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:IFormRenderContextbuilds theIXFormRenderConfigfrom the context- Specified by:
buildXFormConfigin 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.JSONExceptionDescription copied from interface:IFormRenderContextbuilds theJSONObjectfrom the render-context- Specified by:
buildXFormJSONin 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:IFormRenderContextrenders the context and returns the result asString- Specified by:
renderin 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:IFormRenderContextrenders the context to theHttpServletResponseof the givenIExtendedFormRequestContext- Specified by:
renderin interfaceIFormRenderContext- Parameters:
requestCtx-IExtendedFormRequestContextwhichHttpServletResponseshould 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.JSONExceptionDescription copied from interface:IFormRenderContextrenders the context to the givenHttpServletResponse- Specified by:
renderin interfaceIFormRenderContext- Parameters:
response-HttpServletResponsewhich 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:
getSessionAttributesin interfaceIFormRenderContext
-
setSessionAttributes
@Deprecated public void setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.- Specified by:
setSessionAttributesin interfaceIFormRenderContext
-
getRequestParameters
@Deprecated public ParameterWrapper getRequestParameters()
Deprecated.- Specified by:
getRequestParametersin interfaceIFormRenderContext
-
setRequestParameters
@Deprecated public void setRequestParameters(ParameterWrapper requestParameters)
Deprecated.- Specified by:
setRequestParametersin interfaceIFormRenderContext
-
getUrlParamMap
@Deprecated public Map<String,List<String>> getUrlParamMap()
Deprecated.- Specified by:
getUrlParamMapin interfaceIFormRenderContext
-
getMandantJsResources
@Deprecated public List<MandantRessource> getMandantJsResources()
Deprecated.- Specified by:
getMandantJsResourcesin interfaceIFormRenderContext
-
setMandantJsResources
@Deprecated public void setMandantJsResources(List<MandantRessource> jsMandantResources)
Deprecated.- Specified by:
setMandantJsResourcesin interfaceIFormRenderContext
-
getMandantCssResources
@Deprecated public List<MandantRessource> getMandantCssResources()
Deprecated.- Specified by:
getMandantCssResourcesin interfaceIFormRenderContext
-
setMandantCssResources
@Deprecated public void setMandantCssResources(List<MandantRessource> cssMandantResources)
Deprecated.- Specified by:
setMandantCssResourcesin interfaceIFormRenderContext
-
getProjektJsResources
@Deprecated public List<ProjektRessource> getProjektJsResources()
Deprecated.- Specified by:
getProjektJsResourcesin interfaceIFormRenderContext
-
setProjektJsResources
@Deprecated public void setProjektJsResources(List<ProjektRessource> jsProjektResources)
Deprecated.- Specified by:
setProjektJsResourcesin interfaceIFormRenderContext
-
getProjektCssResources
@Deprecated public List<ProjektRessource> getProjektCssResources()
Deprecated.- Specified by:
getProjektCssResourcesin interfaceIFormRenderContext
-
setProjektCssResources
@Deprecated public void setProjektCssResources(List<ProjektRessource> cssProjektResources)
Deprecated.- Specified by:
setProjektCssResourcesin interfaceIFormRenderContext
-
getSystemPluginJsResources
@Deprecated public List<IFormResource> getSystemPluginJsResources()
Deprecated.- Specified by:
getSystemPluginJsResourcesin interfaceIFormRenderContext
-
setSystemPluginJsResources
@Deprecated public void setSystemPluginJsResources(List<IFormResource> jsSystemPluginResources)
Deprecated.- Specified by:
setSystemPluginJsResourcesin interfaceIFormRenderContext
-
getSystemPluginCssResources
@Deprecated public List<IFormResource> getSystemPluginCssResources()
Deprecated.- Specified by:
getSystemPluginCssResourcesin interfaceIFormRenderContext
-
setSystemPluginCssResources
@Deprecated public void setSystemPluginCssResources(List<IFormResource> cssSystemPluginResources)
Deprecated.- Specified by:
setSystemPluginCssResourcesin interfaceIFormRenderContext
-
getMandantPluginJsResources
@Deprecated public List<IFormResource> getMandantPluginJsResources()
Deprecated.- Specified by:
getMandantPluginJsResourcesin interfaceIFormRenderContext
-
setMandantPluginJsResources
@Deprecated public void setMandantPluginJsResources(List<IFormResource> jsMandantPluginResources)
Deprecated.- Specified by:
setMandantPluginJsResourcesin interfaceIFormRenderContext
-
getMandantPluginCssResources
@Deprecated public List<IFormResource> getMandantPluginCssResources()
Deprecated.- Specified by:
getMandantPluginCssResourcesin interfaceIFormRenderContext
-
setMandantPluginCssResources
@Deprecated public void setMandantPluginCssResources(List<IFormResource> cssMandantPluginResources)
Deprecated.- Specified by:
setMandantPluginCssResourcesin interfaceIFormRenderContext
-
-