View Javadoc

1   package com.atlassian.sal.api;
2   
3   /**
4    * The kind of URL to return from methods that accept this as a parameter.
5    */
6   public enum UrlMode
7   {
8       /**
9        * Generate a URL that is absolute, using the canonical URL. e.g. http://www.example.com:8080/myapp. Useful for
10       * generating links for emails.
11       */
12      CANONICAL,
13      /**
14       * Generate a URL that is absolute. Will be derived from the URL of a request in the current scope, or
15       * {@link #CANONICAL} if there is no such request. e.g. http://www:8080/myapp.
16       */
17      ABSOLUTE,
18      /**
19       * Generate a URL that is relative, containing just the context path. Will be derived from the URL of a request in
20       * the current scope, or from {@link #CANONICAL} if there is no such request. e.g. /myapp.
21       */
22      RELATIVE,
23      /**
24       * Generate a URL that is relative, containing just the context path. Will be derived from the {@link #CANONICAL}
25       * URL. e.g. /myapp.
26       */
27      RELATIVE_CANONICAL,
28      /**
29       * Generate a URL that is either {@link #CANONICAL} or {@link #RELATIVE}, based on whether there is a request in
30       * the current scope. Useful for macros, web panels and other content that may be rendered in a page or in email.
31       */
32      AUTO
33  }