Class UrlModes


  • public final class UrlModes
    extends java.lang.Object
    Default URL modes sufficient for the most usecases.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final 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

        public static final UrlMode NO_HOSTNAME
        Does generate a externalized URL without any protocol and hostname, independent of any setting in context-specific configuration.
      • FULL_URL

        public static final 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

        public static final 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

        public static final 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

        public static final 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

        public static final 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

        public static final 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

        public static final 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

        public static final 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.