Class SeoConfigUtil


  • public final class SeoConfigUtil
    extends java.lang.Object
    SeoConfigUtil - SEO Configuration file utility.
    • Method Detail

      • init

        public static void init()
        Initialize url regular express configuration.
      • isInitialed

        public static boolean isInitialed()
        Check whether the configuration file has been read.
        Returns:
        a boolean value to indicate whether the configuration file has been read.
      • checkUseUrlRegexp

        public static boolean checkUseUrlRegexp()
        Check whether url regexp should be used.
        Returns:
        a boolean value to indicate whether url regexp should be used.
      • getGeneralRegexpPattern

        public static org.apache.oro.text.regex.Pattern getGeneralRegexpPattern()
        Get the general regexp pattern.
        Returns:
        the general regexp pattern.
      • checkCategoryUrl

        public static boolean checkCategoryUrl()
        Check whether category url is enabled.
        Returns:
        a boolean value to indicate whether category url is enabled.
      • isCategoryUrlEnabled

        public static boolean isCategoryUrlEnabled​(java.lang.String contextPath)
        Check whether the context path is enabled.
        Returns:
        a boolean value to indicate whether the context path is enabled.
      • isCategoryNameEnabled

        public static boolean isCategoryNameEnabled()
        Check whether category name is enabled.
        Returns:
        a boolean value to indicate whether category name is enabled.
      • getCategoryUrlSuffix

        public static java.lang.String getCategoryUrlSuffix()
        Get category url suffix.
        Returns:
        String category url suffix.
      • isJSessionIdAnonEnabled

        public static boolean isJSessionIdAnonEnabled()
        Check whether jsessionid is enabled for anonymous.
        Returns:
        a boolean value to indicate whether jsessionid is enabled for anonymous.
      • isJSessionIdUserEnabled

        public static boolean isJSessionIdUserEnabled()
        Check whether jsessionid is enabled for user.
        Returns:
        a boolean value to indicate whether jsessionid is enabled for user.
      • getUserExceptionPatterns

        public static java.util.List<org.apache.oro.text.regex.Pattern> getUserExceptionPatterns()
        Get user exception url pattern configures.
        Returns:
        user exception url pattern configures (java.util.List<Pattern>)
      • getCharFilters

        public static java.util.Map<java.lang.String,​java.lang.String> getCharFilters()
        Get char filters.
        Returns:
        char filters (java.util.Map<String, String>)
      • getSeoPatterns

        public static java.util.Map<java.lang.String,​org.apache.oro.text.regex.Pattern> getSeoPatterns()
        Get seo url pattern configures.
        Returns:
        seo url pattern configures (java.util.Map<String, Pattern>)
      • getSeoReplacements

        public static java.util.Map<java.lang.String,​java.lang.String> getSeoReplacements()
        Get seo replacement configures.
        Returns:
        seo replacement configures (java.util.Map<String, String>)
      • getForwardReplacements

        public static java.util.Map<java.lang.String,​java.lang.String> getForwardReplacements()
        Get forward replacement configures.
        Returns:
        forward replacement configures (java.util.Map<String, String>)
      • getForwardResponseCodes

        public static java.util.Map<java.lang.String,​java.lang.Integer> getForwardResponseCodes()
        Get forward response codes.
        Returns:
        forward response code configures (java.util.Map<String, Integer>)
      • isSpecialProductId

        @Deprecated
        public static boolean isSpecialProductId​(java.lang.String productId)
        Deprecated.
        Check whether a product id is in the special list. If we cannot get a product from a lower cased or upper cased product id, then it's special.
        Returns:
        boolean to indicate whether the product id is special.
      • addSpecialProductId

        @Deprecated
        public static boolean addSpecialProductId​(java.lang.String productId)
                                           throws java.lang.Exception
        Deprecated.
        Add a special product id to the special list.
        Parameters:
        productId - a product id get from database.
        Returns:
        true to indicate it has been added to special product id; false to indicate it's not special.
        Throws:
        java.lang.Exception - to indicate there's already same lower cased product id in the list but value is a different product id.
      • getSpecialProductId

        @Deprecated
        public static java.lang.String getSpecialProductId​(java.lang.String productId)
        Deprecated.
        Get a product id is in the special list.
        Returns:
        String of the original product id
      • getDefaultResponseCode

        public static int getDefaultResponseCode()