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 of IElementHelpLocation with some additional static factory methods for convenience.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • getTargetType

      public EElementHelpPageTargetType getTargetType()
      Specified by:
      getTargetType in interface IElementHelpLocation
      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 the IElementHelpLocation.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 interface IElementHelpLocation
      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.