Enum Class UrlCreator.Mode

java.lang.Object
java.lang.Enum<UrlCreator.Mode>
de.espirit.firstspirit.generate.UrlCreator.Mode
All Implemented Interfaces:
Serializable, Comparable<UrlCreator.Mode>, Constable
Enclosing interface:
UrlCreator

public static enum UrlCreator.Mode extends Enum<UrlCreator.Mode>
The different flavours an url can be created in.
Since:
5.0.3
See Also:
  • Enum Constant Details

    • RELATIVE_URL

      public static final UrlCreator.Mode RELATIVE_URL
      A relative url containing something like '../' - called for "abs:0".
      Since:
      5.0.3
    • ABSOLUTE_URL

      public static final UrlCreator.Mode ABSOLUTE_URL
      An absolute url containing the UrlCreator.getUrlPrefix() - called for "abs:1".
      Since:
      5.0.3
    • ABSOLUTE_URL_NO_PREFIX

      public static final UrlCreator.Mode ABSOLUTE_URL_NO_PREFIX
      An absolute url starting with '/' - called for "abs:2".
      Since:
      5.0.3
    • INTERNAL_URL

      public static final UrlCreator.Mode INTERNAL_URL
      An internal url: "fs://..." - this can be used to generate urls to media files which should be included in rendered output - called for "abs:3". E.g. for embedded images in pdf files. The generated url could only resolved in the virtual machine of FirstSpirit - therfore "internal". If external tools must embed images use EXTERNAL_URL.
      Since:
      5.0.3
    • EXTERNAL_URL

      public static final UrlCreator.Mode EXTERNAL_URL
      An external url: "http://{host}:{port}/{preview_application}/...", this can be used to generate urls to media files which should be included in rendered output - called for "abs:4". E.g. for embedded images in pdf files. The generated url could be resolved also by external tools. Be aware that for security reasons the url is valid only for a short amount of time.
      Since:
      5.0.3
    • FILE_PATH

      public static final UrlCreator.Mode FILE_PATH
      A file path.
      See the comment about file name access.
      Since:
      5.0.17
  • Method Details

    • values

      public static UrlCreator.Mode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UrlCreator.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forOrdinal

      public static UrlCreator.Mode forOrdinal(int ordinal)
      Returns the mode related to the given ordinal.
      Parameters:
      ordinal - Ordinal number.
      Returns:
      The corresponding instance.
      Throws:
      IllegalArgumentException - for invalid argument values
      Since:
      5.0.3