Enum UrlMode

java.lang.Object
java.lang.Enum<UrlMode>
com.atlassian.sal.api.UrlMode
All Implemented Interfaces:
Serializable, Comparable<UrlMode>, java.lang.constant.Constable

public enum UrlMode extends Enum<UrlMode>
The kind of URL to return from methods that accept this as a parameter.
  • Enum Constant Details

    • CANONICAL

      public static final UrlMode CANONICAL
      Generate a URL that is absolute, using the canonical URL. e.g. http://www.example.com:8080/myapp. Useful for generating links for emails.
    • ABSOLUTE

      public static final UrlMode ABSOLUTE
      Generate a URL that is absolute. Will be derived from the URL of a request in the current scope, or CANONICAL if there is no such request. e.g. http://www:8080/myapp.
    • RELATIVE

      public static final UrlMode RELATIVE
      Generate a URL that is relative, containing just the context path. Will be derived from the URL of a request in the current scope, or from CANONICAL if there is no such request. e.g. /myapp.
    • RELATIVE_CANONICAL

      public static final UrlMode RELATIVE_CANONICAL
      Generate a URL that is relative, containing just the context path. Will be derived from the CANONICAL URL. e.g. /myapp.
    • AUTO

      public static final UrlMode AUTO
      Generate a URL that is either CANONICAL or RELATIVE, based on whether there is a request in the current scope. Useful for macros, web panels and other content that may be rendered in a page or in email.
  • Method Details

    • values

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

      public static UrlMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null