Class SeoConfigUtil
- java.lang.Object
-
- org.apache.ofbiz.product.category.SeoConfigUtil
-
public final class SeoConfigUtil extends java.lang.Object
SeoConfigUtil - SEO Configuration file utility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
addSpecialProductId(java.lang.String productId)
Deprecated.static boolean
checkCategoryUrl()
Check whether category url is enabled.static boolean
checkUseUrlRegexp()
Check whether url regexp should be used.static java.lang.String
getCategoryUrlSuffix()
Get category url suffix.static java.util.Map<java.lang.String,java.lang.String>
getCharFilters()
Get char filters.static int
getDefaultResponseCode()
static java.util.Map<java.lang.String,java.lang.String>
getForwardReplacements()
Get forward replacement configures.static java.util.Map<java.lang.String,java.lang.Integer>
getForwardResponseCodes()
Get forward response codes.static org.apache.oro.text.regex.Pattern
getGeneralRegexpPattern()
Get the general regexp pattern.static java.util.Map<java.lang.String,org.apache.oro.text.regex.Pattern>
getSeoPatterns()
Get seo url pattern configures.static java.util.Map<java.lang.String,java.lang.String>
getSeoReplacements()
Get seo replacement configures.static java.lang.String
getSpecialProductId(java.lang.String productId)
Deprecated.static java.util.List<org.apache.oro.text.regex.Pattern>
getUserExceptionPatterns()
Get user exception url pattern configures.static void
init()
Initialize url regular express configuration.static boolean
isCategoryNameEnabled()
Check whether category name is enabled.static boolean
isCategoryUrlEnabled(java.lang.String contextPath)
Check whether the context path is enabled.static boolean
isInitialed()
Check whether the configuration file has been read.static boolean
isJSessionIdAnonEnabled()
Check whether jsessionid is enabled for anonymous.static boolean
isJSessionIdUserEnabled()
Check whether jsessionid is enabled for user.static boolean
isSpecialProductId(java.lang.String productId)
Deprecated.
-
-
-
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()
-
-