Class FriendlyUrlUtils


  • public final class FriendlyUrlUtils
    extends java.lang.Object
    Friendly URL Utils
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String cleanUrl​(java.lang.String strUrl)
      Clean leading slash character
      static java.lang.String convertToFriendlyUrl​(java.lang.String strSource)
      Normalize a string to a friendly URL
      static java.lang.String replaceByFriendlyUrl​(java.lang.String strSource, java.util.Map<java.lang.String,​java.lang.String> map, java.lang.String strBaseUrl)
      Replace in the source all URL found in the map
      • Methods inherited from class java.lang.Object

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

      • convertToFriendlyUrl

        public static java.lang.String convertToFriendlyUrl​(java.lang.String strSource)
        Normalize a string to a friendly URL
        Parameters:
        strSource - The source
        Returns:
        The converted string
      • replaceByFriendlyUrl

        public static java.lang.String replaceByFriendlyUrl​(java.lang.String strSource,
                                                            java.util.Map<java.lang.String,​java.lang.String> map,
                                                            java.lang.String strBaseUrl)
        Replace in the source all URL found in the map
        Parameters:
        strSource - The source
        map - The Map that contains Friendly URL mapping
        strBaseUrl - The base URL
        Returns:
        The source with found URL replaced
      • cleanUrl

        public static java.lang.String cleanUrl​(java.lang.String strUrl)
        Clean leading slash character
        Parameters:
        strUrl - The source
        Returns:
        The cleaned URL