Class UrlModes
- java.lang.Object
-
- io.wcm.handler.url.UrlModes
-
public final class UrlModes extends Object
Default URL modes sufficient for the most usecases.
-
-
Field Summary
Fields Modifier and Type Field Description static @NotNull UrlModeDEFAULTDefault mode: Does generate a full externalized URL only if both siteUrl and siteUrlSecure parameter are set in context-specific configuration.static @NotNull UrlModeFULL_URLEnforce the generation of a full URL with protocol and hostname.static @NotNull UrlModeFULL_URL_FORCENONSECUREEnforce the generation of a full URL with protocol and hostname and non-secure mode.static @NotNull UrlModeFULL_URL_FORCESECUREEnforce the generation of a full URL with protocol and hostname and secure mode.static @NotNull UrlModeFULL_URL_PROTOCOLRELATIVEEnforce the generation of a full URL with hostname and "//" as protocol (protocol-relative mode).static @NotNull UrlModeFULL_URL_PUBLISHEnforce the generation of a full URL with protocol and hostname.static @NotNull UrlModeFULL_URL_PUBLISH_FORCENONSECUREEnforce the generation of a full URL with protocol and hostname and non-secure mode.static @NotNull UrlModeFULL_URL_PUBLISH_FORCESECUREEnforce the generation of a full URL with protocol and hostname and secure mode.static @NotNull UrlModeFULL_URL_PUBLISH_PROTOCOLRELATIVEEnforce the generation of a full URL with hostname and "//" as protocol (protocol-relative mode).static @NotNull UrlModeNO_HOSTNAMEDoes generate a externalized URL without any protocol and hostname, independent of any setting in context-specific configuration.
-
-
-
Field Detail
-
DEFAULT
@NotNull public static final @NotNull UrlMode DEFAULT
Default mode: Does generate a full externalized URL only if both siteUrl and siteUrlSecure parameter are set in context-specific configuration. If not set, only URLs without hostname are generated.If the target is an internal content page, siteUrl or siteUrlSecure is chosen automatically depending on the secure state of the page.
-
NO_HOSTNAME
@NotNull public static final @NotNull UrlMode NO_HOSTNAME
Does generate a externalized URL without any protocol and hostname, independent of any setting in context-specific configuration.
-
FULL_URL
@NotNull public static final @NotNull UrlMode FULL_URL
Enforce the generation of a full URL with protocol and hostname.If the target is an internal content page, siteUrl or siteUrlSecure is chosen automatically depending on the secure state of page.
On author instance always the author URL is used.
-
FULL_URL_FORCENONSECURE
@NotNull public static final @NotNull UrlMode FULL_URL_FORCENONSECURE
Enforce the generation of a full URL with protocol and hostname and non-secure mode.On author instance always the author URL is used.
-
FULL_URL_FORCESECURE
@NotNull public static final @NotNull UrlMode FULL_URL_FORCESECURE
Enforce the generation of a full URL with protocol and hostname and secure mode.If siteUrlSecure is not set, siteUrl is used.
On author instance always the author URL is used.
-
FULL_URL_PROTOCOLRELATIVE
@NotNull public static final @NotNull UrlMode FULL_URL_PROTOCOLRELATIVE
Enforce the generation of a full URL with hostname and "//" as protocol (protocol-relative mode).Using "//" instead of "http://" or "https://" results in using the same protocol as the current request in the browser.
On author instance always the author URL is used.
-
FULL_URL_PUBLISH
@NotNull public static final @NotNull UrlMode FULL_URL_PUBLISH
Enforce the generation of a full URL with protocol and hostname.If the target is an internal content page, siteUrl or siteUrlSecure is chosen automatically depending on the secure state of page.
Always uses the Site URLs configured for the publish instance, even if running on an author instance.
-
FULL_URL_PUBLISH_FORCENONSECURE
@NotNull public static final @NotNull UrlMode FULL_URL_PUBLISH_FORCENONSECURE
Enforce the generation of a full URL with protocol and hostname and non-secure mode.Always uses the Site URLs configured for the publish instance, even if running on an author instance.
-
FULL_URL_PUBLISH_FORCESECURE
@NotNull public static final @NotNull UrlMode FULL_URL_PUBLISH_FORCESECURE
Enforce the generation of a full URL with protocol and hostname and secure mode.If siteUrlSecure is not set, siteUrl is used.
Always uses the Site URLs configured for the publish instance, even if running on an author instance.
-
FULL_URL_PUBLISH_PROTOCOLRELATIVE
@NotNull public static final @NotNull UrlMode FULL_URL_PUBLISH_PROTOCOLRELATIVE
Enforce the generation of a full URL with hostname and "//" as protocol (protocol-relative mode).Using "//" instead of "http://" or "https://" results in using the same protocol as the current request in the browser.
Always uses the Site URLs configured for the publish instance, even if running on an author instance.
-
-