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 * Generate a URL that is absolute, using the canonical URL. e.g. http://www.example.com:8080/myapp. Useful for
9 * generating links for emails.
10 */
11 CANONICAL,
12 /**
13 * Generate a URL that is absolute. Will be derived from the URL of a request in the current scope, or
14 * {@link #CANONICAL} if there is no such request. e.g. http://www:8080/myapp.
15 */
16 ABSOLUTE,
17 /**
18 * Generate a URL that is relative, containing just the context path. Will be derived from the URL of a request in
19 * the current scope, or from {@link #CANONICAL} if there is no such request. e.g. /myapp.
20 */
21 RELATIVE,
22 /**
23 * Generate a URL that is relative, containing just the context path. Will be derived from the {@link #CANONICAL}
24 * URL. e.g. /myapp.
25 */
26 RELATIVE_CANONICAL,
27 /**
28 * Generate a URL that is either {@link #CANONICAL} or {@link #RELATIVE}, based on whether there is a request in
29 * the current scope. Useful for macros, web panels and other content that may be rendered in a page or in email.
30 */
31 AUTO
32 }