Package de.xima.fc.e2e.environment.api
Interface IFormcycleUriManager
-
- All Known Implementing Classes:
FormcycleUriManager
public interface IFormcycleUriManagerManages URLs as used by the formcycle app.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IFormProvideUrlBuilderformProvide(long projectId)Gets a builder for configuring and creating the form provide URL that can be used to open a form.IFormReviewUrlBuilderformReview(long projectId, String processId)Gets a builder for configuring and creating the form review URL that can be used to review a form record.URIgetBaseUrl()booleanisFormContext(URI url)booleanisFormPreview(URI url)booleanisFormProcess(URI url)booleanisFormProvide(URI url)booleanisFormReview(URI url)booleanisFormVerify(URI url)default URIremoveBaseUrl(URI url, URI oldBaseUrl)If the URL starts with the base URL, remove that base URL.default URIreplaceBaseUrl(URI url, URI oldBaseUrl)If the URL starts with the base URL, replaces the base URL with the current formcycle base URL.URIreplaceBaseUrl(URI url, URI oldBaseUrl, URI newBaseUrl)If the URL starts with the base URL, replaces the base URL with the new base URL.URIreplaceEntityReferences(URI url)Replaces all entity references in the given URL.default URIservletActionPlugin(String pluginName)URI for a servlet action plugin.default URIservletActionPlugin(String pluginName, Long clientId)URI for a servlet action plugin.URIservletActionPlugin(String pluginName, Long clientId, Map<String,Object> urlParams)URI for a servlet action plugin.URIservletActionPlugin(String pluginName, Map<String,Object> urlParams)URI for a servlet action plugin.URIsetFormProvideLangIfMissing(URI url, String newLanguage)Sets the language parameter on a form provide URL.
-
-
-
Method Detail
-
formProvide
IFormProvideUrlBuilder formProvide(long projectId)
Gets a builder for configuring and creating the form provide URL that can be used to open a form. Uses the current formcycle base URL.- Parameters:
projectId- ID of a project.- Returns:
- The builder for the form provide URL.
-
formReview
IFormReviewUrlBuilder formReview(long projectId, String processId)
Gets a builder for configuring and creating the form review URL that can be used to review a form record. Uses the current formcycle base URL.- Parameters:
projectId- ID of a project.- Returns:
- The form review URL for the given project, which uses the current formcycle base URL.
-
getBaseUrl
URI getBaseUrl()
- Returns:
- The base URL to the running formcycle system.
-
isFormContext
boolean isFormContext(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form URL such as
/form/provide,/form/process,/form/review,/form/previewetc.
-
isFormPreview
boolean isFormPreview(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form preview URL (
/form/preview).
-
isFormProcess
boolean isFormProcess(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form process URL (
/form/process).
-
isFormProvide
boolean isFormProvide(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form provide URL (
/form/provide).
-
isFormReview
boolean isFormReview(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form review URL (
/form/review).
-
isFormVerify
boolean isFormVerify(URI url)
- Parameters:
url- URL to check.- Returns:
- Whether the URL is a formcycle form verify URL (
/form/verify).
-
removeBaseUrl
default URI removeBaseUrl(URI url, URI oldBaseUrl)
If the URL starts with the base URL, remove that base URL. Essentially this relativizes the given URL with respect to the old base URL.- Parameters:
url- URL to process.oldBaseUrl- Expected base URL.- Returns:
- The URL, with the base URL removed.
-
replaceBaseUrl
default URI replaceBaseUrl(URI url, URI oldBaseUrl)
If the URL starts with the base URL, replaces the base URL with the current formcycle base URL.- Parameters:
url- URL to process.oldBaseUrl- Old expected base URL of the URL.- Returns:
- The given URL, with the base URL replaced with the current formcycle base URL.
-
replaceBaseUrl
URI replaceBaseUrl(URI url, URI oldBaseUrl, URI newBaseUrl)
If the URL starts with the base URL, replaces the base URL with the new base URL.- Parameters:
url- URL to process.oldBaseUrl- Old expected base URL of the URL.newBaseUrl- New base URL to use.- Returns:
- The given URL, with the base URL replaced with the new base URL.
-
replaceEntityReferences
URI replaceEntityReferences(URI url)
Replaces all entity references in the given URL. For example, the project ID [@code 431} inform/provide/431is replaced with the new project ID (from when the client was created). This requires that a setup method was used that supports entity reference mapping.- Parameters:
url- URL to process.- Returns:
- The URL with all entity references replaced.
-
servletActionPlugin
default URI servletActionPlugin(String pluginName)
URI for a servlet action plugin. The client is taken from the current setup result context.- Parameters:
pluginName- Name of the plugin.- Returns:
- The URL for a servlet action plugin with the given name.
-
servletActionPlugin
default URI servletActionPlugin(String pluginName, Long clientId)
URI for a servlet action plugin.- Parameters:
pluginName- Name of the plugin.clientId- ID of the client where the plugin was installed.- Returns:
- The URL for a servlet action plugin with the given name.
-
servletActionPlugin
URI servletActionPlugin(String pluginName, Long clientId, Map<String,Object> urlParams)
URI for a servlet action plugin.- Parameters:
pluginName- Name of the plugin.clientId- ID of the client where the plugin was installed.urlParams- Optional URL parameters for the URL.- Returns:
- The URL for a servlet action plugin with the given name.
-
servletActionPlugin
URI servletActionPlugin(String pluginName, Map<String,Object> urlParams)
URI for a servlet action plugin. The client is taken from the current setup result context.- Parameters:
pluginName- Name of the plugin.urlParams- Optional URL parameters for the URL.- Returns:
- The URL for a servlet action plugin with the given name.
-
setFormProvideLangIfMissing
URI setFormProvideLangIfMissing(URI url, String newLanguage)
Sets the language parameter on a form provide URL.- Parameters:
url- URL to adjust.newLanguage- New language.- Returns:
- The URL with the language parameter set, or the given URL without changes when the language parameter is set already.
-
-