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 ofIElementHelpLocation
with 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 IElementHelpLocation
copyOf(IElementHelpLocation value)
static IElementHelpLocation
forExternalLink(String url)
static IElementHelpLocation
forExternalLink(URL url)
static IElementHelpLocation
forHtmlFile(ClassLoader loader, String htmlPath, Charset encoding)
static IElementHelpLocation
forHtmlFile(String htmlFile)
static IElementHelpLocation
forOfficialHelpPage(String helpPagePath, Locale locale)
EElementHelpPageTargetType
getTargetType()
String
getValue()
Must return the help page location.
-
-
-
Method Detail
-
getTargetType
public EElementHelpPageTargetType getTargetType()
- Specified by:
getTargetType
in interfaceIElementHelpLocation
- Returns:
- The type of the help page, see
EElementHelpPageTargetType
for more info.
-
getValue
public String getValue()
Description copied from interface:IElementHelpLocation
Must return the help page location. The exact meaning of this value depends on theIElementHelpLocation.getTargetType()
.EXTERNAL_LINK
Must be the full, absolute link.OFFICIAL_HELP_PAGE
Must be the relative path, e.g./xwiki/bin/view/Formcycle/Designer/Workflow/Actions/CreateTextFile
HTML_FILE
Must be a complete HTML page, with all scripts and styles as required.
- Specified by:
getValue
in 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
- Path of 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.
-
-