Package de.xima.fc.interfaces.form
Interface IFormRequestContext
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IExtendedFormRequestContext
- All Known Implementing Classes:
ExtendedFormRequestContext,FormRequestContext
A class with the relevant data of a form request, such as the current form or the authenticated user. A form request
is any HTTP request regarding a form, such as an HTTP request (usually GET) that is made to get a new, empty form
that can be filled out; or an HTTP request (usually POST) to submit the data from the filled-out form.
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptioncom.alibaba.fastjson.JSONObjectdefault List<BenutzerGruppe>Deprecated.Deprecated.usegetUserInboxes()default BenutzerDeprecated.usergetUser()default HeaderParameters!default StringDeprecated.usegetBaseUrl()Deprecated.Deprecated.useisUseCurrentFv()default BenutzergetUser()Deprecated.UsegetUserModel()instead.org.pac4j.core.profile.CommonProfileDeprecated.get profile fromIUservoidbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisReview()booleanbooleanbooleanvoidloadUserData(FormUserRequestData userData) Deprecated.load user data viasetUserModel(IUser).voidsetAnonymize(boolean anonymize) voidsetBaseUrl(String baseUrl) default voidsetBenutzerGruppen(List<BenutzerGruppe> benutzerGruppen) Deprecated.User groups should be determined by the user.default voidsetBenutzerPostfaecher(List<Postfach> benutzerPostfaecher) Deprecated.voidsetBenutzerZugriffAllowed(boolean isBenutzerZugriffAllowed) voidsetCheckForm(boolean checkForm) voidsetContextPath(String contextPath) voidsetContinueProcessing(boolean continueProcessing) default voidsetCurrentBenutzer(Benutzer benutzer) Deprecated.voidsetDoubleOptInData(ProjectDOIData projekt) voidsetFormData(IFormDataAdapter formData) voidsetFormRecordLockContext(IFormRecordLockContext formRecordLockContext) voidsetFormVersion(FormVersion formVersion) voidsetFrontendServer(FrontendServer frontendServer) voidsetFrontenServerAllowed(boolean isFrontendServerAllowed) voidsetFRQSession(FRQSession formRequestSession) voidsetFullRequestUrl(String fullRequestUrl) voidvoidvoidsetMandant(Mandant mandant) voidsetOldVersion(boolean isOldVersion) voidsetParameterWrapper(ParameterWrapper parameterWrapper) Deprecated.voidsetPreview(boolean isPreview) voidsetPreviewWithoutSave(boolean previewWithoutSave) voidsetProjekt(Projekt projekt) default voidsetRequestContest(String requestContext) Deprecated.default voidsetRequestContext(String requestContext) Deprecated.voidsetRequestType(EFormRequestType requestType) voidsetRerenderAfterValidationFailed(boolean rerenderAfterValidationFailed) voidsetResubmit(boolean isResubmit) voidsetReview(boolean isReview) voidsetSaveOnly(boolean saveOnly) voidsetSession(XfcSession session) voidsetSessionAttributeMap(Map<String, Serializable> attributes) voidsetSessionAttributes(SessionAttributes sessionAttributes) Deprecated.voidsetSessionID(String sessionID) voidsetSessionTimeout(Duration timeout) voidvoidsetSkipSubmitButtonValidation(boolean skipSubmitButtonValidation) voidsetUseCurrentFv(boolean useCurrentFv) default voidDeprecated.UsegetUserModel()instead.voidvoidsetUserGroups(List<BenutzerGruppe> userGroups) Deprecated.User groups should be determined by the user.voidsetUserInboxes(List<Postfach> benutzerPostfaecher) Deprecated.User inboxes should be determined by the user.voidsetUserModel(IUser user) voidsetUserProfile(org.pac4j.core.profile.CommonProfile userData) Deprecated.get profile fromIUservoidsetVorgang(Vorgang vorgang) voidsetWorkflowVersion(WorkflowVersion workflowVersion)
-
Method Details
-
getUserContext
UserContext getUserContext()- Returns:
- The current user context that contains information about the user that is currently logged in. This context is also used when you would like to open a connection to the database.
-
setUserContext
- Parameters:
uc- The current user context that contains information about the user that is currently logged in. This context is also used when you would like to open a connection to the database.
-
getUserModel
IUser getUserModel()- Returns:
- The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
-
setUserModel
- Parameters:
user- The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
-
getProjekt
Projekt getProjekt()- Returns:
- The
Projektwhich contains the form that was requested.
-
setProjekt
- Parameters:
projekt- TheProjektwhich contains the form that was requested.
-
getDoubleOptInData
ProjectDOIData getDoubleOptInData()- Returns:
- The double opt-in settings for the current form.
-
getIdentityCheckData
ProjectIdentityCheckData getIdentityCheckData()- Returns:
- The identity check settings for the current form.
-
setIdentityCheckData
- Parameters:
data- The identity check settings for the current form.
-
setDoubleOptInData
- Parameters:
projekt- The double opt-in settings for the current form.
-
getMandant
Mandant getMandant()- Returns:
- The
Mandantto which the current form belongs to.
-
setMandant
- Parameters:
mandant- TheMandantto which the current form belongs to.
-
getFormVersion
FormVersion getFormVersion()- Returns:
- The current
FormVersionthat was requested.
-
setFormVersion
- Parameters:
formVersion- The currentFormVersionthat was requested.
-
getWorkflowVersion
WorkflowVersion getWorkflowVersion()- Returns:
- The current
WorkflowVersionthat was requested.
-
setWorkflowVersion
- Parameters:
workflowVersion- The currentWorkflowVersionthat was requested.
-
getFrontendServer
FrontendServer getFrontendServer()- Returns:
- When the form request is made to a
FrontendServer, that frontend server. Otherwise, when the form request is made directly to the master server, this returnnull.
-
setFrontendServer
- Parameters:
frontendServer- When the form request is made to aFrontendServer, that frontend server. Otherwise, when the form request is made directly to the master server, this returnnull.
-
getVorgang
Vorgang getVorgang()- Returns:
- The current
Vorgangwhen the form was submitted; ornullwhen a new empty form was just requested. Note that this may not represent the current state of the form record: for example, when submitting a form and the workflow is run, the workflow might modify some data of the form record, this will not be reflected here.
-
setVorgang
- Parameters:
vorgang- The currentVorgangwhen the form was submitted; ornullwhen a new empty form was just requested.
-
getFormRecordLockContext
IFormRecordLockContext getFormRecordLockContext()- Returns:
- the form record locking context that is locking the form record of this request context
- Since:
- 6.6.13 & 7.0.5
-
setFormRecordLockContext
- Parameters:
formRecordLockContext- the form record locking context that is locking the form record of this request context- Since:
- 6.6.13 & 7.0.5
-
getLocale
Locale getLocale()- Returns:
- The current locale that is to be used for locale-dependent operations.
-
setLocale
- Parameters:
locale- The current locale that is to be used for locale-dependent operations.
-
isUseCurrentFv
boolean isUseCurrentFv()- Returns:
trueif the latest version of the form is to be used,falseif a specific form version was requested.
-
setUseCurrentFv
void setUseCurrentFv(boolean useCurrentFv) - Parameters:
useCurrentFv-trueif the latest version of the form is to be used,falseif a specific form version was requested.
-
getRequestType
EFormRequestType getRequestType()- Returns:
- The type of request that was made, eg. whether a new form was requested or a form was submitted.
-
setRequestType
- Parameters:
requestType- The type of request that was made, eg. whether a new form was requested or a form was submitted.F
-
getSessionID
String getSessionID()- Returns:
- The current
HttpSessionID.
-
setSessionID
- Parameters:
sessionID- The currentHttpSessionID.
-
getBaseUrl
String getBaseUrl()- Returns:
- The base URL for this application, may not include the host.
-
setBaseUrl
- Parameters:
baseUrl- The base URL for this application, may not include the host.
-
getContextPath
String getContextPath()- Returns:
- Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
-
setContextPath
- Parameters:
contextPath- Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
-
getFullRequestUrl
String getFullRequestUrl()- Returns:
- The full URL that was used to request the form, including all query params.
-
setFullRequestUrl
- Parameters:
fullRequestUrl- The full URL that was used to request the form, including all query params.
-
getSessionAttributeMap
Map<String,Serializable> getSessionAttributeMap()- Returns:
- A
Mapof all key-value pairs in the currentHttpSession. Please note that changes to this map will not affect theHttpSession.
-
getFrqSessionAttributeMap
Map<Serializable,Serializable> getFrqSessionAttributeMap()- Returns:
- A
Mapof all key-value pairs in the currentHttpSession. Please note that changes to this map will not affect theHttpSession.
-
setSessionAttributeMap
- Parameters:
attributes- AMapof all key-value pairs in the currentHttpSession. Please note that changes to this map will not affect theHttpSession.
-
getSessionTimeout
Duration getSessionTimeout()- 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.
- Since:
- 7.2.1
-
setSessionTimeout
- 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.- Since:
- 7.2.1
-
getSession
XfcSession getSession()- Returns:
- The current formcycle session that contains additional information not contained in the
HttpSession.
-
setSession
- Parameters:
session- The current formcycle session that contains additional information not contained in theHttpSession.
-
getFRQSession
FRQSession getFRQSession()- Returns:
- The current form request session. A form request session is opened each time a form is requested. A
single
getSession()may contain multipleFRQSessions.
-
setFRQSession
- Parameters:
formRequestSession- The current form request session. A form request session is opened each time a form is requested. A singlegetSession()may contain multipleFRQSessions.
-
isSaveOnly
boolean isSaveOnly()- Returns:
trueif a save button was used to submit the form. For the old workflow engine, this only saves the form data to the database and does not trigger the workflow. For the new workflow engine, the workflow is still processed, but thesaved flagis set on the form record.
-
setSaveOnly
void setSaveOnly(boolean saveOnly) - Parameters:
saveOnly-trueif a save button was used to submit the form. For the old workflow engine, this only saves the form data to the database and does not trigger the workflow. For the new workflow engine, the workflow is still processed, but thesaved flagis set on the form record.
-
isReview
boolean isReview()- Returns:
trueif a review was requested (when opening a form in the inbox), orfalseotherwise.
-
setReview
void setReview(boolean isReview) - Parameters:
isReview-trueif a review was requested (when opening a form in the inbox), orfalseotherwise.
-
isOldVersion
boolean isOldVersion()- Returns:
trueif an old version was requested, orfalseotherwise.
-
setOldVersion
void setOldVersion(boolean isOldVersion) - Parameters:
isOldVersion-trueif an old version was requested, orfalseotherwise.
-
isContinueProcessing
boolean isContinueProcessing()- Returns:
trueif this form request should be processed further, orfalseto indicate that processing should be aborted.
-
setContinueProcessing
void setContinueProcessing(boolean continueProcessing) - Parameters:
continueProcessing-trueif this form request should be processed further, orfalseto indicate that processing should be aborted.
-
isCheckForm
boolean isCheckForm()- Returns:
trueto indicate the form should be validated on the server, orfalseotherwise.
-
isSkipSubmitButtonValidation
boolean isSkipSubmitButtonValidation()- Returns:
- When
true, the xf-action is not checked for whether it represents a valid submit button.
-
setSkipSubmitButtonValidation
void setSkipSubmitButtonValidation(boolean skipSubmitButtonValidation) - Parameters:
skipSubmitButtonValidation- Whentrue, the xf-action is not checked for whether it represents a valid submit button.
-
setCheckForm
void setCheckForm(boolean checkForm) - Parameters:
checkForm- Whentrue, the xf-action is not checked for whether it represents a valid submit button.
-
isAnonymize
boolean isAnonymize()- Returns:
trueto indicate the form submission should be made anonymously, orfalseotherwise. When the form is anonymized, no meta data is saved regarding the user who submitted the form.
-
setAnonymize
void setAnonymize(boolean anonymize) - Parameters:
anonymize-trueto indicate the form submission should be made anonymously, orfalseotherwise. When the form is anonymized, no meta data is saved regarding the user who submitted the form.
-
isResubmit
boolean isResubmit()- Returns:
truewhen the form was not submitted for the first time and aVorgangexists already,falseotherwise.
-
setResubmit
void setResubmit(boolean isResubmit) - Parameters:
isResubmit-truewhen the form was not submitted for the first time and aVorgangexists already,falseotherwise.
-
isPreview
boolean isPreview()- Returns:
trueif a preview was requested,falseotherwise.
-
setPreview
void setPreview(boolean isPreview) - Parameters:
isPreview-trueif a preview was requested,falseotherwise.
-
getFormData
IFormDataAdapter getFormData()- Returns:
- An
IFormDataAdapterthat can be used to access the current form data, ie. the submitted or already present values for each form field.
-
setFormData
- Parameters:
formData- AnIFormDataAdapterthat can be used to access the current form data, ie. the submitted or already present values for each form field.
-
initFormData
-
getParameterWrapper
ParameterWrapper getParameterWrapper()!READ-ONLY model of the parsed request parameters. To initialize data userinitFormData(ParameterWrapper)orgetFormData()andIFormDataAdapter.init(Map)orsetFormData(IFormDataAdapter)- Returns:
ParameterWrapper
-
isBenutzerZugriffAllowed
boolean isBenutzerZugriffAllowed()- Returns:
trueto indicate that the currentBenutzeris allowed access to the request form, orfalseotherwise.
-
setBenutzerZugriffAllowed
void setBenutzerZugriffAllowed(boolean isBenutzerZugriffAllowed) - Parameters:
isBenutzerZugriffAllowed-trueto indicate that the currentBenutzeris allowed access to the request form, orfalseotherwise.
-
isFrontendServerAllowed
boolean isFrontendServerAllowed()- Returns:
trueif the requested form may be served by thegetFrontendServer(), orfalseotherwise.
-
setFrontenServerAllowed
void setFrontenServerAllowed(boolean isFrontendServerAllowed) - Parameters:
isFrontendServerAllowed-trueif the requested form may be served by thegetFrontendServer(), orfalseotherwise.
-
getUserInboxes
-
getUserGroups
List<BenutzerGruppe> getUserGroups()- Returns:
- A
ListofBenutzerGruppes to which the currentBenutzerbelongs to.
-
createUserDataJSON
com.alibaba.fastjson.JSONObject createUserDataJSON() -
getValueParameters
ValueParameters getValueParameters()- Returns:
- All values that were submitted with this form request, ie. the values of the individual form elements.
This excludes uploaded files, see
getUploadParameters().
-
getHeaderParameters
- Returns:
- (Read-only) map with all headers that were sent with the HTTP request.
-
getUploadParameters
UploadParameters getUploadParameters()- Returns:
- All files that were uploaded with this form request, usually via upload form elements.
-
getSingleFileUploadLimitBytes
Long getSingleFileUploadLimitBytes()- Returns:
- The upload limit in bytes for a single file upload.
nullwhen there is no restriction.
-
setSingleFileUploadLimitBytes
- Parameters:
limit- The upload limit in bytes for a single file upload.nullwhen there is no restriction.
-
isPreviewWithoutSave
boolean isPreviewWithoutSave()- Returns:
trueif the workflow should be processed, but the form data should not be saved. Used e.g. for generating a PDF preview.
-
setPreviewWithoutSave
void setPreviewWithoutSave(boolean previewWithoutSave) - Parameters:
previewWithoutSave-trueif the workflow should be processed, but the form data should not be saved. Used e.g. for generating a PDF preview.
-
isRerenderAfterValidationFailed
boolean isRerenderAfterValidationFailed() -
setRerenderAfterValidationFailed
void setRerenderAfterValidationFailed(boolean rerenderAfterValidationFailed) -
loadUserData
Deprecated.load user data viasetUserModel(IUser). -
getUserProfile
Deprecated.get profile fromIUser -
setUserProfile
Deprecated.get profile fromIUser -
getBenutzerPostfaecher
Deprecated.usegetUserInboxes() -
setBenutzerPostfaecher
Deprecated. -
setUserInboxes
Deprecated.User inboxes should be determined by the user. UsesetUserModel(IUser)with a user that has inboxes instead. -
getBenutzerGruppen
Deprecated.usergetUserGroups() -
setBenutzerGruppen
Deprecated.User groups should be determined by the user. UsesetUserModel(IUser)with a user that has user groups instead. -
setUserGroups
Deprecated.User groups should be determined by the user. UsesetUserModel(IUser)with a user that has user groups instead. -
getSessionAttributes
Deprecated. -
setSessionAttributes
Deprecated. -
setParameterWrapper
Deprecated. -
getCurrentBenutzer
Deprecated.usergetUser()- Returns:
- the current user
-
setCurrentBenutzer
Deprecated.- Parameters:
benutzer- the user to set
-
getUseCurrentFv
Deprecated.useisUseCurrentFv() -
getRequestContext
Deprecated.usegetBaseUrl()- Returns:
- The value of
getBaseUrl().
-
setRequestContext
Deprecated. -
setRequestContest
Deprecated. -
getUser
Deprecated.UsegetUserModel()instead.- Returns:
- The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
-
setUser
Deprecated.UsegetUserModel()instead.- Parameters:
benutzer- The user who is currently logged in and requested the form. In case the user is not logged in, this will be an anonymous user.
-
getUserGroups()