Package com.atlassian.webresource.api
Enum Class UrlMode
- All Implemented Interfaces:
Serializable,Comparable<UrlMode>,Constable
A formatting mode for URLs. Used to specify to
WebResourceManager methods whether to use absolute URLs,
relative URLs, or allow the concrete implementation to decide- Since:
- 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAbsolute URL format, with URL scheme, hostname, port (if non-standard for the scheme), and context path.Unspecified URL format, indicating that either absolute or relative URLs are acceptable.Relative URL format, starting with a slash and the context path. -
Method Summary
-
Enum Constant Details
-
ABSOLUTE
Absolute URL format, with URL scheme, hostname, port (if non-standard for the scheme), and context path. -
RELATIVE
Relative URL format, starting with a slash and the context path. -
AUTO
Unspecified URL format, indicating that either absolute or relative URLs are acceptable. Implementations are free to determine which mode to use based on any criteria of their choosing. For example, an implementation may choose to return a relative URL if it detects that it is running in the context of an HTTP request, and an absolute URL if it detects that it is not. Or it may choose to always return an absolute URL, or always return a relative URL. Callers should only useUrlMode#AUTOwhen they are sure that either an absolute or a relative URL will be appropriate, and should not rely on any particular observed behavior regarding how this value is interpreted, which may vary across different implementations.
-
-
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
-