Package de.xima.fc.form.helper
Class URLHelper
java.lang.Object
de.xima.fc.form.helper.URLHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
ajaxUploadServlet
(String baseUrl, ValueParameters params) static String
appointmentFreeSlotsServlet
(String baseUrl, ValueParameters params) static String
appointmentIcalServlet
(String baseUrl, ValueParameters params) static String
appointmentIcalServlet
(String baseUrl, ValueParameters params, AppointmentTemplate template) static String
attachmentFormActionURL
(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession, String action) static String
attachmentServlet
(String baseUrl, ValueParameters params) static String
authLoginUrlBaseFor
(String baseUrl, ValueParameters params) static String
authLogoutUrlBaseFor
(String baseUrl, ValueParameters params) static String
authLogoutUrlFor
(String basePath, ValueParameters params, FRQSession frqSession) static String
buildFinalCallbackUrl
(javax.servlet.http.HttpServletRequest request, FRQSession session) static String
buildFinalCallbackUrl
(javax.servlet.http.HttpServletRequest request, FRQSession session, boolean relative) static String
clientCounterUrlFor
(String baseUrl, ValueParameters params) static String
completeSubmitUrl
(String submitUrl, String language, FRQSession formRequestSession, String optionalSessionID) static String
contextPart
(String baseUrl, ValueParameters params) static String
contextPart
(javax.servlet.http.HttpServletRequest req) static String
contextPart
(javax.servlet.http.HttpServletRequest req, ValueParameters params) static String
dataqueryDBUrlFor
(String baseUrl, ValueParameters params) static String
dataqueryLDAPUrlFor
(String baseUrl, ValueParameters params) static String
datasourceCSVUrlFor
(String baseUrl, ValueParameters params) static String
datasourceJSONUrlFor
(String baseUrl, ValueParameters params) static String
datasourceXMLUrlFor
(String baseUrl, ValueParameters params) static String
deleteAttachmentFormURL
(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession) static String
downloadAttachmentFormURL
(String baseUrl, ValueParameters requestParameters, String prozessId, FRQSession formRequestSession) static String
formPart
(String baseUrl, ValueParameters params) static String
formPart
(javax.servlet.http.HttpServletRequest req) Deprecated.static String
formPart
(javax.servlet.http.HttpServletRequest req, ValueParameters params) Deprecated.static String
formPart
(javax.servlet.http.HttpServletRequest req, ValueParameters params, Mandant client) static String
formRequestCopyFor
(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params) 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 copystatic String
formRequestFor
(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params) static String
forwardRequestFor
(Projekt p, javax.servlet.http.HttpServletRequest request, ValueParameters params) static String
getAbsoluteBaseUrl
(javax.servlet.http.HttpServletRequest request) Deprecated.Use one of the other overloads ofgetAbsoluteBaseUrl
that let you specify the client, frontend server, or form request context.static String
getAbsoluteBaseUrl
(javax.servlet.http.HttpServletRequest request, Mandant client) static String
getAbsoluteBaseUrl
(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase) static String
getAbsoluteFullRequestUrl
(javax.servlet.http.HttpServletRequest request) static String
getAuthCallbackBaseUrl
(IFormAuthContext authCtx) Deprecated.Won't be available in version 8.0.0 anymore.static String
getAuthCallbackBaseUrl
(String baseUrl) static String
getAuthCallbackBaseURL
(String baseUrl, String authParam) Deprecated.static String
getAuthCallbackDefaultBaseURL
(javax.servlet.http.HttpServletRequest request, Projekt project) static String
getAuthCallbackUrl
(String baseUrl, IAuthenticator<?> authenticator) static String
getAuthCallbackUrl
(String baseUrl, EAuthCallbackUrlType type, String clientName) static String
getAuthCheckURL
(IFormAuthContext authCtx) static String
getAuthFormURL
(IFormAuthContext authCtx) static String
getAuthLoginURL
(IFormAuthContext authCtx, IAuthenticatorConfig config, boolean asRedirect) Deprecated.static String
getAuthLoginURL
(IFormAuthContext authCtx, ProjectAuthenticatorConfig config, boolean asRedirect) Deprecated.static String
getAuthLoginURL
(IFormAuthContext authCtx, IClientDescriptor client, boolean asRedirect) static String
getAuthPasswordURL
(IFormAuthContext authCtx) static String
getBaseUrl
(javax.servlet.http.HttpServletRequest request) Deprecated.Use one of the other overloads ofgetBaseUrl
that let you specify the client, frontend server, or form request context.static String
getBaseUrl
(javax.servlet.http.HttpServletRequest request, Mandant client) static String
getBaseUrl
(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase) static String
getClientResourceUrl
(MandantRessource res, boolean noCache) static String
getExternalAuthCallbackURL
(IFormAuthContext authContext, String authParam) Deprecated.static String
getFullRequestUrl
(javax.servlet.http.HttpServletRequest request) static String
getInviteLink
(String baseUrl, DirectClientAuthorization authorization) Returns the invitation link for the given client authorization.static String
getProjectResourceUrl
(ProjektRessource res, boolean noCache) static String
getRelativeFullRequestUrl
(javax.servlet.http.HttpServletRequest request) static String
getSystemAuthCallbackUrl
(IFormAuthContext authCtx, EAuthCallbackUrlType type, String clientName) static String
getSystemAuthCallbackURL
(IFormAuthContext authCtx, String authParam) Deprecated.static boolean
isExternalOrAjaxRequest
(javax.servlet.http.HttpServletRequest request) static String
keepaliveUrlFor
(String baseUrl, ValueParameters params) static String
loginRedirectUrl
(String baseUrl, String frid, String queryString) static String
mandantLoginRedirectUrl
(Mandant man, String baseUrl, String frid, String queryString, String optionalSessionID) static String
pluginServlet
(String baseUrl, ValueParameters params) static String
previewUrlFor
(String baseUrl, Projekt project, ValueParameters params) static String
previewUrlFor
(String baseUrl, Projekt project, ValueParameters params, FormVersion formVersion) static String
previewUrlFor
(String context, String language, Projekt project, ValueParameters params) static String
previewUrlFor
(String context, String language, Projekt projekt, ValueParameters params, FormVersion formVersion) static String
previewUrlFor
(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession) static String
previewUrlFor
(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, Vorgang formRecord, FRQSession frqsession, String optionalSessionID) static String
previewUrlFor
(String baseUrl, String language, Projekt projekt, ValueParameters params, FormVersion formVersion, FRQSession frqsession) static String
provideUrlFor
(String baseUrl, Projekt project) static String
provideUrlFor
(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v) static String
provideUrlFor
(String baseUrl, Projekt p, ValueParameters params, Vorgang v) static String
provideUrlFor
(javax.servlet.http.HttpServletRequest request, FormVersion formVersion) static String
submitUrlFor
(IFormRequestContext requestCtx) static String
submitUrlFor
(IFormRequestContext requestCtx, Vorgang vorgang) static String
submitUrlFor
(String baseUrl, Projekt p, ValueParameters params) static String
submitUrlFor
(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion) static String
submitUrlForPreview
(IFormRequestContext ctx, String conversationId) static String
submitUrlForVorgang
(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang vorgang) static String
submitUrlForVorgang
(String baseUrl, Projekt p, ValueParameters params, Vorgang vorgang) static String
templateServlet
(String baseUrl, ValueParameters params) static String
urlFor
(EFormRequestType formRequestType, String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion)
-
Method Details
-
contextPart
-
contextPart
-
contextPart
-
formPart
Deprecated.- Parameters:
req
- Request that was made.- Returns:
- The form part (e.g.
.../form
for 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
-
loginRedirectUrl
-
mandantLoginRedirectUrl
-
submitUrlForVorgang
public static String submitUrlForVorgang(String baseUrl, Projekt p, ValueParameters params, Vorgang vorgang) -
submitUrlForVorgang
public static String submitUrlForVorgang(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang vorgang) -
submitUrlFor
-
submitUrlFor
public static String submitUrlFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion) -
submitUrlFor
-
submitUrlForPreview
-
submitUrlFor
-
completeSubmitUrl
public static String completeSubmitUrl(String submitUrl, String language, FRQSession formRequestSession, String optionalSessionID) -
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 benull
when opening the form for the first time.frqsession
- Current form request session, if any.- Returns:
- The
form/preview
URL 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 benull
when 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/preview
URL 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/preview
URL 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/preview
URL 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/preview
URL 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/preview
URL 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/preview
URL for the given project and form version.
-
provideUrlFor
public static String provideUrlFor(javax.servlet.http.HttpServletRequest request, FormVersion formVersion) -
provideUrlFor
-
provideUrlFor
-
provideUrlFor
public static String provideUrlFor(String baseUrl, Projekt p, ValueParameters params, FormVersion formVersion, Vorgang v) -
dataqueryDBUrlFor
-
datasourceXMLUrlFor
-
datasourceCSVUrlFor
-
datasourceJSONUrlFor
-
attachmentServlet
-
appointmentFreeSlotsServlet
-
ajaxUploadServlet
-
templateServlet
-
appointmentIcalServlet
- 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
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
-
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 benull
params
- additional URL parameters. Can benull
.formVersion
- if set the form of a given form version will be used. Id the param isnull
the 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
-
clientCounterUrlFor
-
keepaliveUrlFor
-
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
null
if no invitation link can be produces for the client authorization.
-
authLoginUrlBaseFor
-
authLogoutUrlBaseFor
-
authLogoutUrlFor
public static String authLogoutUrlFor(String basePath, ValueParameters params, FRQSession frqSession) -
getClientResourceUrl
-
getProjectResourceUrl
-
getAuthCallbackUrl
-
getSystemAuthCallbackUrl
public static String getSystemAuthCallbackUrl(IFormAuthContext authCtx, EAuthCallbackUrlType type, String clientName) -
getAuthCallbackUrl
public static String getAuthCallbackUrl(String baseUrl, EAuthCallbackUrlType type, String clientName) -
getAuthCallbackBaseUrl
-
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
-
getAuthFormURL
-
getAuthPasswordURL
-
getAuthCallbackDefaultBaseURL
-
getBaseUrl
public static String getBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase) -
getBaseUrl
-
getBaseUrl
Deprecated.Use one of the other overloads ofgetBaseUrl
that 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
- 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
- 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
- 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
-
getAbsoluteBaseUrl
public static String getAbsoluteBaseUrl(javax.servlet.http.HttpServletRequest request, Mandant client, FrontendServer fs, boolean useUrlBase) -
getAbsoluteBaseUrl
Deprecated.Use one of the other overloads ofgetAbsoluteBaseUrl
that 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.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.
-
formPart(HttpServletRequest, ValueParameters, Mandant)
.