Package de.xima.fc.workflow
Class ElementHelpLocation
- java.lang.Object
-
- de.xima.fc.workflow.ElementHelpLocation
-
- All Implemented Interfaces:
IElementHelpLocation,Serializable
public final class ElementHelpLocation extends Object implements IElementHelpLocation
POJO implementation ofIElementHelpLocationwith some additional static factory methods for convenience.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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)EElementHelpPageTargetTypegetTargetType()StringgetValue()Must return the help page location.
-
-
-
Method Detail
-
getTargetType
public EElementHelpPageTargetType getTargetType()
- Specified by:
getTargetTypein interfaceIElementHelpLocation- Returns:
- The type of the help page, see
EElementHelpPageTargetTypefor more info.
-
getValue
public String 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
public static IElementHelpLocation copyOf(IElementHelpLocation value)
- 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
public static IElementHelpLocation forExternalLink(String url)
- Parameters:
url- URL of the help page.- Returns:
- A new help location pointing to the given external URL.
-
forExternalLink
public static IElementHelpLocation forExternalLink(URL url)
- 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
public static IElementHelpLocation forHtmlFile(String htmlFile)
- Parameters:
htmlFile- HTML content of the help page.- Returns:
- A new help location pointing to the given HTML document.
-
forOfficialHelpPage
public static IElementHelpLocation forOfficialHelpPage(String helpPagePath, Locale locale)
- 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.
-
-