Package de.xima.fc.form.helper
Class URLHelper
- java.lang.Object
-
- de.xima.fc.form.helper.URLHelper
-
public class URLHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringajaxUploadServlet(String baseUrl, ValueParameters params)static StringappointmentFreeSlotsServlet(String baseUrl, ValueParameters params)static StringappointmentIcalServlet(String baseUrl, ValueParameters params)static StringappointmentIcalServlet(String baseUrl, ValueParameters params, AppointmentTemplate template)static StringattachmentFormActionURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession, String action)static StringattachmentServlet(String baseUrl, ValueParameters params)static StringauthLoginUrlBaseFor(String baseUrl, ValueParameters params)static StringauthLogoutUrlBaseFor(String baseUrl, ValueParameters params)static StringauthLogoutUrlFor(String basePath, ValueParameters params, FRQSession frqSession)static StringbuildFinalCallbackUrl(javax.servlet.http.HttpServletRequest request, FRQSession session)static StringbuildFinalCallbackUrl(javax.servlet.http.HttpServletRequest request, FRQSession session, boolean relative)static StringclientCounterUrlFor(String baseUrl, ValueParameters params)static StringcompleteSubmitUrl(String submitUrl, String language, FRQSession formRequestSession, String sessionId)static StringcontextPart(String baseUrl, ValueParameters params)static StringcontextPart(javax.servlet.http.HttpServletRequest req)static StringcontextPart(javax.servlet.http.HttpServletRequest req, ValueParameters params)static StringdataqueryDBUrlFor(String baseUrl, ValueParameters params)static StringdataqueryLDAPUrlFor(String baseUrl, ValueParameters params)static StringdatasourceCSVUrlFor(String baseUrl, ValueParameters params)static StringdatasourceJSONUrlFor(String baseUrl, ValueParameters params)static StringdatasourceXMLUrlFor(String baseUrl, ValueParameters params)static StringdeleteAttachmentFormURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession)static StringdownloadAttachmentFormURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession)static StringformPart(String baseUrl, ValueParameters params)static StringformPart(javax.servlet.http.HttpServletRequest req)Deprecated.static StringformPart(javax.servlet.http.HttpServletRequest req, ValueParameters params)Deprecated.static StringformPart(javax.servlet.http.HttpServletRequest req, ValueParameters params, Mandant client)static StringformRequestCopyFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)static StringformRequestCopyFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v)Builds a URL to the form copy servlet with a given process id of the process to copystatic StringformRequestFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)static StringforwardRequestFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)static StringgetAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request)Deprecated.Use one of the other overloads ofgetAbsoluteBaseUrlthat let you specify the client, frontend server, or form request context.static StringgetAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client)static StringgetAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase)static StringgetAbsoluteFullRequestUrl(javax.servlet.http.HttpServletRequest request)static StringgetAuthCallbackBaseUrl(IFormAuthContext authCtx)Deprecated.Won't be available in version 8.0.0 anymore.static StringgetAuthCallbackBaseUrl(String baseUrl)static StringgetAuthCallbackBaseURL(String baseUrl, String authParam)Deprecated.static StringgetAuthCallbackDefaultBaseURL(javax.servlet.http.HttpServletRequest request, Projekt project)static StringgetAuthCallbackUrl(String baseUrl, IAuthenticator<?> authenticator)static StringgetAuthCallbackUrl(String baseUrl, EAuthCallbackUrlType type, String clientName)static StringgetAuthCheckURL(IFormAuthContext authCtx)static StringgetAuthFormURL(IFormAuthContext authCtx)static StringgetAuthLoginURL(IFormAuthContext authCtx, IAuthenticatorConfig config, boolean asRedirect)Deprecated.static StringgetAuthLoginURL(IFormAuthContext authCtx, ProjectAuthenticatorConfig config, boolean asRedirect)Deprecated.static StringgetAuthLoginURL(IFormAuthContext authCtx, IClientDescriptor client, boolean asRedirect)static StringgetAuthPasswordURL(IFormAuthContext authCtx)static StringgetBaseUrl(javax.servlet.http.HttpServletRequest request)Deprecated.Use one of the other overloads ofgetBaseUrlthat let you specify the client, frontend server, or form request context.static StringgetBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client)static StringgetBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase)static StringgetClientResourceUrl(MandantRessource res, boolean noCache)static StringgetExternalAuthCallbackURL(IFormAuthContext authContext, String authParam)Deprecated.static StringgetFullRequestUrl(javax.servlet.http.HttpServletRequest request)static StringgetInviteLink(String baseUrl, DirectClientAuthorization authorization)Returns the invitation link for the given client authorization.static StringgetProjectResourceUrl(ProjektRessource res, boolean noCache)static StringgetRelativeFullRequestUrl(javax.servlet.http.HttpServletRequest request)static StringgetSystemAuthCallbackUrl(IFormAuthContext authCtx, EAuthCallbackUrlType type, String clientName)static StringgetSystemAuthCallbackURL(IFormAuthContext authCtx, String authParam)Deprecated.static booleanisExternalOrAjaxRequest(javax.servlet.http.HttpServletRequest request)static StringkeepaliveUrlFor(String baseUrl, ValueParameters params)static StringloginRedirectUrl(String baseUrl, String frid, String queryString)static StringmandantLoginRedirectUrl(Mandant man, String baseUrl, String frid, String queryString, String optionalSessionID)static StringpluginServlet(String baseUrl, ValueParameters params)static StringpreviewUrlFor(String baseUrl, Projekt project, ValueParameters params)static StringpreviewUrlFor(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion)static StringpreviewUrlFor(String context, String language, Projekt project, ValueParameters params)static StringpreviewUrlFor(String context, String language, Projekt projekt, ValueParameters params, FormVersion formVersion)static StringpreviewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession)static StringpreviewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession, String optionalSessionID)static StringpreviewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, FRQSession frqsession)static StringprovideUrlFor(String baseUrl, Projekt project)static StringprovideUrlFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v)static StringprovideUrlFor(String baseUrl, Projekt p, ValueParameters params, Vorgang v)static StringprovideUrlFor(javax.servlet.http.HttpServletRequest request, FormVersion formVersion)static FormThemeReferenceresolveFormThemeByContext(IFormRequestContext requestContext, boolean allowFormTheme)Resolves the form theme to use for the form version of the given request context.static FormThemeReferenceresolveFormThemeByContext(IFormRequestContext requestContext, Textbaustein textTemplate)Resolves the form theme to use for the given form version.static FormThemeReferenceresolveFormThemeByContext(UserContext uc, Mandant client, FormVersion formVersion, Map<String,List<String>> renderParams, boolean allowFormTheme)Resolves the form theme to use for the given form version.static FormThemeReferenceresolveFormThemeByContext(javax.servlet.http.HttpServletRequest request, FormVersion formVersion, boolean allowFormTheme)Resolves the form theme to use for the given form version.static FormThemeReferenceresolveFormThemeByContext(javax.servlet.http.HttpServletRequest request, FormVersion formVersion, Textbaustein textTemplate)Resolves the form theme to use for the given form version.static FormThemeReferenceresolveFormThemeByParam(FormVersion formVersion, String requestedThemeParam, boolean allowFormTheme)Resolves the form theme to use for the given form version.static StringsubmitUrlFor(IFormRequestContext requestCtx)static StringsubmitUrlFor(IFormRequestContext requestCtx, Vorgang vorgang)static StringsubmitUrlFor(String baseUrl, Projekt p, ValueParameters params)static StringsubmitUrlFor(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion)static StringsubmitUrlForPreview(IFormRequestContext requestContext, String conversationId)static StringsubmitUrlForVorgang(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion, Vorgang vorgang)static StringsubmitUrlForVorgang(String baseUrl, Projekt project, ValueParameters params, Vorgang vorgang)static StringtemplateServlet(String baseUrl, ValueParameters params)static StringurlFor(EFormRequestType formRequestType, String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion)
-
-
-
Method Detail
-
contextPart
public static String contextPart(javax.servlet.http.HttpServletRequest req)
-
contextPart
public static String contextPart(javax.servlet.http.HttpServletRequest req, ValueParameters params)
-
contextPart
public static String contextPart(String baseUrl, ValueParameters params)
-
formPart
@Deprecated public static String formPart(javax.servlet.http.HttpServletRequest req)
Deprecated.- Parameters:
req- Request that was made.- Returns:
- The form part (e.g.
.../formfor the URL.
-
formPart
@Deprecated public static String formPart(javax.servlet.http.HttpServletRequest req, ValueParameters params)
Deprecated.- Parameters:
req- Request that was made.params- Parameters from the request.- Returns:
- The form part (e.g.
.../form) for the URL.
-
formPart
public static String formPart(javax.servlet.http.HttpServletRequest req, ValueParameters params, Mandant client)
-
formPart
public static String formPart(String baseUrl, ValueParameters params)
-
loginRedirectUrl
public static String loginRedirectUrl(String baseUrl, String frid, String queryString)
-
mandantLoginRedirectUrl
public static String mandantLoginRedirectUrl(Mandant man, String baseUrl, String frid, String queryString, String optionalSessionID)
-
submitUrlForVorgang
public static String submitUrlForVorgang(String baseUrl, Projekt project, ValueParameters params, Vorgang vorgang)
-
submitUrlForVorgang
public static String submitUrlForVorgang(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion, Vorgang vorgang)
-
submitUrlFor
public static String submitUrlFor(String baseUrl, Projekt p, ValueParameters params)
-
submitUrlFor
public static String submitUrlFor(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion)
-
submitUrlFor
public static String submitUrlFor(IFormRequestContext requestCtx)
-
submitUrlForPreview
public static String submitUrlForPreview(IFormRequestContext requestContext, String conversationId)
-
submitUrlFor
public static String submitUrlFor(IFormRequestContext requestCtx, Vorgang vorgang)
-
completeSubmitUrl
public static String completeSubmitUrl(String submitUrl, String language, FRQSession formRequestSession, String sessionId)
-
urlFor
public static String urlFor(EFormRequestType formRequestType, String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion)
-
previewUrlFor
@Deprecated public static String previewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession)
Deprecated.- Parameters:
baseUrl- Base URL to the formcycle server.language- Language for the form.projekt- Project with the form to display.params- Value parameters from the form request.formVersion- Form version to display.formRecord- Optional form record for which to display the form. May benullwhen opening the form for the first time.frqsession- Current form request session, if any.- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
public static String previewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession, String optionalSessionID)
- Parameters:
baseUrl- Base URL to the formcycle server.language- Language for the form.projekt- Project with the form to display.params- Value parameters from the form request.formVersion- Form version to display.formRecord- Optional form record for which to display the form. May benullwhen opening the form for the first time.frqsession- Current form request session, if any.optionalSessionID- (optional) Session-ID to encode as url parameter- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
@Deprecated public static String previewUrlFor(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, FRQSession frqsession)
Deprecated.- Parameters:
baseUrl- Base URL to the formcycle server.language- Language for the form.projekt- Project with the form to display.params- Value parameters from the form request.formVersion- Form version to display.frqsession- Current form request session, if any.- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
@Deprecated public static String previewUrlFor(String baseUrl, Projekt project, ValueParameters params)
Deprecated.- Parameters:
baseUrl- Base URL to the formcycle server.project- Project with the form to display.params- Value parameters from the form request. the first time.- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
@Deprecated public static String previewUrlFor(String context, String language, Projekt project, ValueParameters params)
Deprecated.- Parameters:
context- Base URL to the formcycle server.language- Language for the form.project- Project with the form to display.params- Value parameters from the form request.- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
@Deprecated public static String previewUrlFor(String context, String language, Projekt projekt, ValueParameters params, FormVersion formVersion)
Deprecated.- Parameters:
context- Base URL to the formcycle server.language- Language for the form.projekt- Project with the form to display.params- Value parameters from the form request.formVersion- Form version to display.- Returns:
- The
form/previewURL for the given project and form version.
-
previewUrlFor
@Deprecated public static String previewUrlFor(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion)
Deprecated.- Parameters:
baseUrl- Base URL to the formcycle server.project- Project with the form to display.params- Value parameters from the form request.formVersion- Form version to display.- Returns:
- The
form/previewURL for the given project and form version.
-
provideUrlFor
public static String provideUrlFor(javax.servlet.http.HttpServletRequest request, FormVersion formVersion)
-
provideUrlFor
public static String provideUrlFor(String baseUrl, Projekt p, ValueParameters params, Vorgang v)
-
provideUrlFor
public static String provideUrlFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v)
-
dataqueryDBUrlFor
public static String dataqueryDBUrlFor(String baseUrl, ValueParameters params)
-
datasourceXMLUrlFor
public static String datasourceXMLUrlFor(String baseUrl, ValueParameters params)
-
datasourceCSVUrlFor
public static String datasourceCSVUrlFor(String baseUrl, ValueParameters params)
-
datasourceJSONUrlFor
public static String datasourceJSONUrlFor(String baseUrl, ValueParameters params)
-
attachmentServlet
public static String attachmentServlet(String baseUrl, ValueParameters params)
-
appointmentFreeSlotsServlet
public static String appointmentFreeSlotsServlet(String baseUrl, ValueParameters params)
-
ajaxUploadServlet
public static String ajaxUploadServlet(String baseUrl, ValueParameters params)
-
templateServlet
public static String templateServlet(String baseUrl, ValueParameters params)
-
appointmentIcalServlet
public static String appointmentIcalServlet(String baseUrl, ValueParameters params)
- Parameters:
baseUrl- Context path of the web application.params- Additional URL parameters.- Returns:
- The prefix for the URL for the appointment iCal servlet, such as
http://localhost:8080/xima-formcycle/appointment/ical/ - See Also:
appointmentIcalServlet(String, ValueParameters, AppointmentTemplate)
-
appointmentIcalServlet
public static String appointmentIcalServlet(String baseUrl, ValueParameters params, AppointmentTemplate template)
- Parameters:
baseUrl- Context path of the web application.params- Additional URL parameters.template- Template for which to generate the URL.- Returns:
- The full URL for the appointment iCal servlet, such as
http://localhost:8080/xima-formcycle/appointment/ical/11cab23a-a36a-416b-bd5b-ae9d0003a30f/15504ad9-5287-4739-9e6c-fad66f67203e
-
pluginServlet
public static String pluginServlet(String baseUrl, ValueParameters params)
-
formRequestCopyFor
public static String formRequestCopyFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)
-
formRequestCopyFor
public static String formRequestCopyFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v)
Builds a URL to the form copy servlet with a given process id of the process to copy- Parameters:
baseUrl- the context path of the applicationp- the project to which the process is assigned. The projekt id is part of the URL. Must not benullparams- additional URL parameters. Can benull.formVersion- if set the form of a given form version will be used. Id the param isnullthe currently active form version will be usedv- the process that data will be put put to the new form. Must not benull- Returns:
- the url
- Since:
- 5.0.9
-
formRequestFor
public static String formRequestFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)
-
forwardRequestFor
public static String forwardRequestFor(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params)
-
attachmentFormActionURL
public static String attachmentFormActionURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession, String action)
-
deleteAttachmentFormURL
public static String deleteAttachmentFormURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession)
-
downloadAttachmentFormURL
public static String downloadAttachmentFormURL(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession)
-
dataqueryLDAPUrlFor
public static String dataqueryLDAPUrlFor(String baseUrl, ValueParameters params)
-
clientCounterUrlFor
public static String clientCounterUrlFor(String baseUrl, ValueParameters params)
-
keepaliveUrlFor
public static String keepaliveUrlFor(String baseUrl, ValueParameters params)
-
getInviteLink
@Nullable public static String getInviteLink(String baseUrl, DirectClientAuthorization authorization)
Returns the invitation link for the given client authorization.- Parameters:
baseUrl- to use when producing the invitation link.authorization- to produce invitation link for.- Returns:
- the invitation link for the given client authorization or
nullif no invitation link can be produces for the client authorization.
-
authLoginUrlBaseFor
public static String authLoginUrlBaseFor(String baseUrl, ValueParameters params)
-
authLogoutUrlBaseFor
public static String authLogoutUrlBaseFor(String baseUrl, ValueParameters params)
-
authLogoutUrlFor
public static String authLogoutUrlFor(String basePath, ValueParameters params, FRQSession frqSession)
-
getClientResourceUrl
public static String getClientResourceUrl(MandantRessource res, boolean noCache)
-
getProjectResourceUrl
public static String getProjectResourceUrl(ProjektRessource res, boolean noCache)
-
getAuthCallbackUrl
public static String getAuthCallbackUrl(String baseUrl, IAuthenticator<?> authenticator)
-
getSystemAuthCallbackUrl
public static String getSystemAuthCallbackUrl(IFormAuthContext authCtx, EAuthCallbackUrlType type, String clientName)
-
getAuthCallbackUrl
public static String getAuthCallbackUrl(String baseUrl, EAuthCallbackUrlType type, String clientName)
-
buildFinalCallbackUrl
public static String buildFinalCallbackUrl(javax.servlet.http.HttpServletRequest request, FRQSession session)
-
buildFinalCallbackUrl
public static String buildFinalCallbackUrl(javax.servlet.http.HttpServletRequest request, FRQSession session, boolean relative)
-
getAuthLoginURL
public static String getAuthLoginURL(IFormAuthContext authCtx, IClientDescriptor client, boolean asRedirect)
-
getAuthLoginURL
@Deprecated public static String getAuthLoginURL(IFormAuthContext authCtx, IAuthenticatorConfig config, boolean asRedirect)
Deprecated.
-
getAuthLoginURL
@Deprecated public static String getAuthLoginURL(IFormAuthContext authCtx, ProjectAuthenticatorConfig config, boolean asRedirect)
Deprecated.
-
getAuthCheckURL
public static String getAuthCheckURL(IFormAuthContext authCtx)
-
getAuthFormURL
public static String getAuthFormURL(IFormAuthContext authCtx)
-
getAuthPasswordURL
public static String getAuthPasswordURL(IFormAuthContext authCtx)
-
getAuthCallbackDefaultBaseURL
public static String getAuthCallbackDefaultBaseURL(javax.servlet.http.HttpServletRequest request, Projekt project)
-
getBaseUrl
public static String getBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase)
-
getBaseUrl
public static String getBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client)
-
getBaseUrl
@Deprecated public static String getBaseUrl(javax.servlet.http.HttpServletRequest request)
Deprecated.Use one of the other overloads ofgetBaseUrlthat let you specify the client, frontend server, or form request context.- Parameters:
request- Request that was made to the server- Returns:
- The base URL for the request.
-
getFullRequestUrl
public static String getFullRequestUrl(javax.servlet.http.HttpServletRequest request)
- Parameters:
request- The current HTTP servlet request.- Returns:
- The full request URL, including all query parameters. For AJAX or external request an absolute URL is returned. Otherwise, a relative URL without the host and protocol is returned.
-
getRelativeFullRequestUrl
public static String getRelativeFullRequestUrl(javax.servlet.http.HttpServletRequest request)
- Parameters:
request- The current HTTP servlet request.- Returns:
- The full request URL, including all query parameters. This is a relative URL without the host and protocol.
-
getAbsoluteFullRequestUrl
public static String getAbsoluteFullRequestUrl(javax.servlet.http.HttpServletRequest request)
- Parameters:
request- The current HTTP servlet request.- Returns:
- The full request URL, including all query parameters. This is an absolute URL with the host and protocol is returned.
-
getAbsoluteBaseUrl
public static String getAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client)
-
getAbsoluteBaseUrl
public static String getAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase)
-
resolveFormThemeByContext
public static FormThemeReference resolveFormThemeByContext(IFormRequestContext requestContext, Textbaustein textTemplate)
Resolves the form theme to use for the given form version. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
requestContext- The form request context with the URL parameters.textTemplate- Text template whose content is to be written to the HTTP response.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
resolveFormThemeByContext
public static FormThemeReference resolveFormThemeByContext(IFormRequestContext requestContext, boolean allowFormTheme)
Resolves the form theme to use for the form version of the given request context. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
requestContext- The form request context with the URL parameters.allowFormTheme- Whether a custom form theme is allowed to be used.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
resolveFormThemeByContext
public static FormThemeReference resolveFormThemeByContext(UserContext uc, Mandant client, FormVersion formVersion, Map<String,List<String>> renderParams, boolean allowFormTheme)
Resolves the form theme to use for the given form version. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
uc- The user context of the user who requested the form theme.client- The client for which the form theme should be resolved.formVersion- The form version that was requested.renderParams- The render parameters from the form request.allowFormTheme- Whether a custom form theme is allowed to be used.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
resolveFormThemeByContext
public static FormThemeReference resolveFormThemeByContext(javax.servlet.http.HttpServletRequest request, FormVersion formVersion, Textbaustein textTemplate)
Resolves the form theme to use for the given form version. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
request- The HTTP request that was made.formVersion- The form version that was requested.textTemplate- Text template whose content is to be written to the HTTP response.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
resolveFormThemeByContext
public static FormThemeReference resolveFormThemeByContext(javax.servlet.http.HttpServletRequest request, FormVersion formVersion, boolean allowFormTheme)
Resolves the form theme to use for the given form version. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
request- The HTTP request that was made.formVersion- The form version that was requested.allowFormTheme- Whether a custom form theme is allowed to be used.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
resolveFormThemeByParam
public static FormThemeReference resolveFormThemeByParam(FormVersion formVersion, String requestedThemeParam, boolean allowFormTheme)
Resolves the form theme to use for the given form version. Uses the theme specified by the URL parameter "xfc-rp-theme" if set, otherwise uses the default theme from the requested form version. Always returns null if the given text template does not support form themes.- Parameters:
formVersion- The form version that was requested.requestedThemeParam- The value of the xfc-rp-theme parameter.allowFormTheme- Whether a custom form theme is allowed to be used.- Returns:
- The resolved form theme, null if no theme could be resolved.
-
getAbsoluteBaseUrl
@Deprecated public static String getAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request)
Deprecated.Use one of the other overloads ofgetAbsoluteBaseUrlthat let you specify the client, frontend server, or form request context.- Parameters:
request- Request that was made to the server- Returns:
- The absolute base URL for the request.
-
isExternalOrAjaxRequest
public static boolean isExternalOrAjaxRequest(javax.servlet.http.HttpServletRequest request)
-
getAuthCallbackBaseUrl
@Deprecated public static String getAuthCallbackBaseUrl(IFormAuthContext authCtx)
Deprecated.Won't be available in version 8.0.0 anymore.
-
getSystemAuthCallbackURL
@Deprecated public static String getSystemAuthCallbackURL(IFormAuthContext authCtx, String authParam)
Deprecated.
-
getExternalAuthCallbackURL
@Deprecated public static String getExternalAuthCallbackURL(IFormAuthContext authContext, String authParam)
Deprecated.
-
getAuthCallbackBaseURL
@Deprecated public static String getAuthCallbackBaseURL(String baseUrl, String authParam)
Deprecated.
-
-