Package org.apache.ofbiz.webapp
Class SeoConfigUtil
java.lang.Object
org.apache.ofbiz.webapp.SeoConfigUtil
SeoConfigUtil - SEO Configuration file utility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addSpecialProductId
(String productId) Deprecated.static boolean
Check whether category url is enabled.static boolean
Check whether url regexp should be used.static String
Get category url suffix.Get char filters.static int
Get forward replacement configures.Get forward response codes.static org.apache.oro.text.regex.Pattern
Get the general regexp pattern.Get seo url pattern configures.Get seo replacement configures.static String
getSpecialProductId
(String productId) Deprecated.static List<org.apache.oro.text.regex.Pattern>
Get user exception url pattern configures.static void
init()
Initialize url regular express configuration.static boolean
Check whether category name is enabled.static boolean
isCategoryUrlEnabled
(String contextPath) Check whether the context path is enabled.static boolean
Check whether the configuration file has been read.static boolean
Check whether jsessionid is enabled for anonymous.static boolean
Check whether jsessionid is enabled for user.static boolean
isSpecialProductId
(String productId) Deprecated.
-
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
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
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
Get user exception url pattern configures.- Returns:
- user exception url pattern configures (java.util.List<Pattern>)
-
getCharFilters
Get char filters.- Returns:
- char filters (java.util.Map<String, String>)
-
getSeoPatterns
Get seo url pattern configures.- Returns:
- seo url pattern configures (java.util.Map<String, Pattern>)
-
getSeoReplacements
Get seo replacement configures.- Returns:
- seo replacement configures (java.util.Map<String, String>)
-
getForwardReplacements
Get forward replacement configures.- Returns:
- forward replacement configures (java.util.Map<String, String>)
-
getForwardResponseCodes
Get forward response codes.- Returns:
- forward response code configures (java.util.Map<String, Integer>)
-
isSpecialProductId
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.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.Get a product id is in the special list.- Returns:
- String of the original product id
-
getDefaultResponseCode
public static int getDefaultResponseCode()
-