Package de.xima.fc.workflow
Class ElementHelpLocation
java.lang.Object
de.xima.fc.workflow.ElementHelpLocation
- All Implemented Interfaces:
IElementHelpLocation,Serializable
POJO implementation of
IElementHelpLocation with some additional static factory methods for convenience.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic IElementHelpLocationcopyOf(IElementHelpLocation value) static IElementHelpLocationforExternalLink(String url) static IElementHelpLocationforExternalLink(URL url) static IElementHelpLocationforHtmlFile(ClassLoader loader, String htmlPath, Charset encoding) static IElementHelpLocationforHtmlFile(String htmlFile) static IElementHelpLocationforOfficialHelpPage(String helpPagePath, Locale locale) getValue()Must return the help page location.
-
Method Details
-
getTargetType
- Specified by:
getTargetTypein interfaceIElementHelpLocation- Returns:
- The type of the help page, see
EElementHelpPageTargetTypefor more info.
-
getValue
Description copied from interface:IElementHelpLocationMust return the help page location. The exact meaning of this value depends on theIElementHelpLocation.getTargetType().EXTERNAL_LINKMust be the full, absolute link.OFFICIAL_HELP_PAGEMust be the relative path, e.g./xwiki/bin/view/Formcycle/Designer/Workflow/Actions/CreateTextFileHTML_FILEMust be a complete HTML page, with all scripts and styles as required.
- Specified by:
getValuein interfaceIElementHelpLocation- Returns:
- The help page location.
-
copyOf
- Parameters:
value- An element help location to copy.- Returns:
- A new help location with the same data as the given value. This is an immutable screenshot, subsequent modifications to the value will not be reflected in the returned instance.
-
forExternalLink
- Parameters:
url- URL of the help page.- Returns:
- A new help location pointing to the given external URL.
-
forExternalLink
- Parameters:
url- URL of the help page.- Returns:
- A new help location pointing to the given external URL.
-
forHtmlFile
public static IElementHelpLocation forHtmlFile(ClassLoader loader, String htmlPath, Charset encoding) throws IOException - Parameters:
loader- Class loader to use for accessing the HTML document.htmlPath- Path to the HTML document.encoding- Encoding of the HTML document.- Returns:
- A new help location pointing to the given HTML document.
- Throws:
IOException- When the resource at the given location could not be read via the given class loader.
-
forHtmlFile
- Parameters:
htmlFile- HTML content of the help page.- Returns:
- A new help location pointing to the given HTML document.
-
forOfficialHelpPage
- Parameters:
helpPagePath- ID for the help page in the official formcycle help pages.locale- Language of the help page.- Returns:
- A new help location pointing to the given path in the official formcycle help pages.
-