Class URLUtil


  • public class URLUtil
    extends java.lang.Object
    This class contains utility methods for URL related operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.util.List<java.lang.String>> buildQueryMapFromString​(java.lang.String queryString)  
      static java.lang.String buildQueryStringFromMapArray​(java.util.Map<java.lang.String,​java.lang.String[]> parameterMap)  
      static java.lang.String buildQueryStringFromMapList​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameterMap)  
      static java.lang.String getContextPath()
      Returns the current URL of the Web Client without request path and query string.
      static java.lang.String getCurrentUrl()
      This method returns the current URL of the Web Client including server name, port, context path and query string.
      static java.lang.String getQueryString()
      Returns the query string from the current URL.
      • Methods inherited from class java.lang.Object

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

      • getCurrentUrl

        public static java.lang.String getCurrentUrl()
        This method returns the current URL of the Web Client including server name, port, context path and query string. This method can only be used form within ZK context.
        Returns:
        current URL of the web client
      • getQueryString

        public static java.lang.String getQueryString()
        Returns the query string from the current URL. If no query string is present, an empty string is returned. The returned query string will begin with "?". This method can only be used form within ZK context.
        Returns:
        current query string
      • getContextPath

        public static java.lang.String getContextPath()
        Returns the current URL of the Web Client without request path and query string. This method can only be used form within ZK context.
        Returns:
        current url of the Web Client without request path and query string
      • buildQueryStringFromMapList

        public static java.lang.String buildQueryStringFromMapList​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameterMap)
      • buildQueryStringFromMapArray

        public static java.lang.String buildQueryStringFromMapArray​(java.util.Map<java.lang.String,​java.lang.String[]> parameterMap)
      • buildQueryMapFromString

        public static java.util.Map<java.lang.String,​java.util.List<java.lang.String>> buildQueryMapFromString​(java.lang.String queryString)