Class AbstractUrlResolver<T>

    • Constructor Detail

      • AbstractUrlResolver

        public AbstractUrlResolver()
    • Method Detail

      • setThreadContextService

        public void setThreadContextService​(ThreadContextService threadContextService)
      • urlSafe

        protected java.lang.String urlSafe​(java.lang.String text)
        Encode string with UTF8 encoding and then convert a string into a URL safe version of the string. Only upper and lower case letters and numbers are retained. All other characters are replaced by a hyphen (-).
        Parameters:
        text - the text to sanitize
        Returns:
        the safe version of the text
      • urlEncode

        protected java.lang.String urlEncode​(java.lang.String source)
        Url encodes a string
        Parameters:
        source - A string to encode
        Returns:
        A Url encoded string
      • getKey

        protected java.lang.String getKey​(T source)
        Get the cache key for the source instance.
        Parameters:
        source - the source instance
        Returns:
        the cache key or null if caching is not supported
      • resolve

        public java.lang.String resolve​(T source)
        Description copied from interface: UrlResolver
        Resolve the url path for the source type.
        Specified by:
        resolve in interface UrlResolver<T>
        Parameters:
        source - the source type.
        Returns:
        the URL path
      • resolveInternal

        protected abstract java.lang.String resolveInternal​(T source)
        Resolve the url path for the source type.
        Parameters:
        source - the source type.
        Returns:
        the URL path