Class FriendlyUrlUtils


  • public final class FriendlyUrlUtils
    extends Object
    Friendly URL Utils
    • Method Detail

      • convertToFriendlyUrl

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

        public static String replaceByFriendlyUrl​(String strSource,
                                                  Map<String,​String> map,
                                                  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 String cleanUrl​(String strUrl)
        Clean leading slash character
        Parameters:
        strUrl - The source
        Returns:
        The cleaned URL