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 default URIformProvide(long projectId)default URIformProvide(long projectId, boolean replaceEntityReferences)default URIformProvide(long projectId, String processId)URIformProvide(long projectId, String processId, boolean replaceEntityReferences)default StringformProvideUrl(long projectId)default StringformProvideUrl(long projectId, boolean replaceEntityReferences)default StringformProvideUrl(long projectId, String processId)default StringformProvideUrl(long projectId, String processId, boolean replaceEntityReferences)default URIformReview(long projectId, String processId)URIformReview(long projectId, String processId, boolean replaceEntityReferences)default StringformReviewUrl(long projectId, String processId)default StringformReviewUrl(long projectId, String processId, boolean replaceEntityReferences)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
default URI formProvide(long projectId)
- Parameters:
projectId- ID of a project.- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvide
default URI formProvide(long projectId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvide
default URI formProvide(long projectId, String processId)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to provide.- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvide
URI formProvide(long projectId, String processId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to provide.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvideUrl
default String formProvideUrl(long projectId)
- Parameters:
projectId- ID of a project.- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvideUrl
default String formProvideUrl(long projectId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvideUrl
default String formProvideUrl(long projectId, String processId)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to provide.- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formProvideUrl
default String formProvideUrl(long projectId, String processId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to provide.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- Returns:
- The form provide URL for the given project, which uses the current formcycle base URL.
-
formReview
default URI formReview(long projectId, String processId)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to review.- Returns:
- The form review URL for the given project, which uses the current formcycle base URL.
-
formReview
URI formReview(long projectId, String processId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to review.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- Returns:
- The form review URL for the given project, which uses the current formcycle base URL.
-
formReviewUrl
default String formReviewUrl(long projectId, String processId)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to review.- Returns:
- The form review URL for the given project, which uses the current formcycle base URL.
-
formReviewUrl
default String formReviewUrl(long projectId, String processId, boolean replaceEntityReferences)
- Parameters:
projectId- ID of a project.processId- Process ID of the form record to review.replaceEntityReferences- Iftrue, process newly created URL viareplaceEntityReferences(URI).- 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.
-
-