Class SeoConfigUtil

java.lang.Object
org.apache.ofbiz.webapp.SeoConfigUtil

public final class SeoConfigUtil extends Object
SeoConfigUtil - SEO Configuration file utility.
  • Method Details

    • 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(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 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 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 Map<String,String> getCharFilters()
      Get char filters.
      Returns:
      char filters (java.util.Map<String, String>)
    • getSeoPatterns

      public static Map<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 Map<String,String> getSeoReplacements()
      Get seo replacement configures.
      Returns:
      seo replacement configures (java.util.Map<String, String>)
    • getForwardReplacements

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

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

      @Deprecated public static boolean isSpecialProductId(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(String productId) throws 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:
      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 String getSpecialProductId(String productId)
      Deprecated.
      Get a product id is in the special list.
      Returns:
      String of the original product id
    • getDefaultResponseCode

      public static int getDefaultResponseCode()