Package de.espirit.firstspirit.generate
Enum Class UrlCreator.Mode
- All Implemented Interfaces:
Serializable
,Comparable<UrlCreator.Mode>
,Constable
- Enclosing interface:
- UrlCreator
The different flavours an url can be created in.
- Since:
- 5.0.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAn absolute url containing theUrlCreator.getUrlPrefix()
- called for "abs:1".An absolute url starting with '/' - called for "abs:2".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".A file path.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".A relative url containing something like '../' - called for "abs:0". -
Method Summary
Modifier and TypeMethodDescriptionstatic UrlCreator.Mode
forOrdinal
(int ordinal) Returns the mode related to the given ordinal.static UrlCreator.Mode
Returns the enum constant of this class with the specified name.static UrlCreator.Mode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RELATIVE_URL
A relative url containing something like '../' - called for "abs:0".- Since:
- 5.0.3
-
ABSOLUTE_URL
An absolute url containing theUrlCreator.getUrlPrefix()
- called for "abs:1".- Since:
- 5.0.3
-
ABSOLUTE_URL_NO_PREFIX
An absolute url starting with '/' - called for "abs:2".- Since:
- 5.0.3
-
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 useEXTERNAL_URL
.- Since:
- 5.0.3
-
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
A file path.
See the comment about file name access.- Since:
- 5.0.17
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
forOrdinal
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
-