public class Config
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_COOKIE_NAME
The default cookie name that the client side properties would be set to.
|
static boolean |
DEFAULT_INCLUDE_LANG_PROPS
The default config value for getProperties(HEADERS) or getProperties(REQUEST)
to check the Accept-Language header and include properties to the property
set for getting client's language and locale preferences.
|
static boolean |
DEFAULT_INCLUDE_MATCH_INFO
The default config value for getProperties() to include the matched and
unmatched parts of the User-Agent to the property set.
|
static boolean |
DEFAULT_INCLUDE_UA_PROPS
The default config value for getProperties() to include User-Agent dynamic
properties.
|
static int |
DEFAULT_MAX_CACHE_ENTRIES
The default config value for result (Properties object) caching.
|
static boolean |
DEFAULT_RETURN_NULL_WHEN_NO_PROPERTIES
The default config value for getProperties() return value
when there was no properties.
|
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCookieName()
Get the cookie name that the client side properties would be set to.
|
boolean |
getIncludeLangProps()
Get if the language/locale properties are being included in the property set or not.
|
boolean |
getIncludeMatchInfo()
To get if getProperties() include the matched and unmatched parts of the
User-Agent to the property set.
|
boolean |
getIncludeUaProps()
Get if the User-Agent properties are being included in the property set or not.
|
int |
getMaxCacheEntries()
Get the max number of results to be cached.
|
boolean |
getReturnNullWhenNoProperties()
Get if the value returned by getProperties() should be null when there are
no properties to return or an instance of Properties that has no Property
inside it should be returned.
|
void |
setCookieName(java.lang.String cookieName)
To change the cookie name that the client side properties would be set to.
|
void |
setIncludeLangProps(boolean includeLangProps)
To disable or enable getProperties(HEADERS) or getProperties(REQUEST)
including language and locale properties.
|
void |
setIncludeMatchInfo(boolean includeMatchInfo)
To disable or enable getProperties() including the matched and unmatched
parts of the User-Agent to the property set.
|
void |
setIncludeUaProps(boolean includeUaProps)
To disable or enable getProperties() including User-Agent dynamic properties.
|
void |
setMaxCacheEntries(int maxCacheEntries)
Set the max number of results to be cached.
|
void |
setReturnNullWhenNoProperties(boolean returnNullWhenNoProperties)
Set if the value returned by the getProperties() method should be null when
there are no properties to return or whether an empty Properties object
should be returned instead.
|
public static final java.lang.String DEFAULT_COOKIE_NAME
public static final boolean DEFAULT_INCLUDE_UA_PROPS
public static final boolean DEFAULT_INCLUDE_LANG_PROPS
public static final boolean DEFAULT_INCLUDE_MATCH_INFO
public static final boolean DEFAULT_RETURN_NULL_WHEN_NO_PROPERTIES
public static final int DEFAULT_MAX_CACHE_ENTRIES
public void setCookieName(java.lang.String cookieName)
cookieName
- The cookie name which the client side properties are set to.
Set to null to turn off using client-side properties.public java.lang.String getCookieName()
public void setIncludeUaProps(boolean includeUaProps)
includeUaProps
- True=includepublic boolean getIncludeUaProps()
public void setIncludeLangProps(boolean includeLangProps)
includeLangProps
- true=includepublic boolean getIncludeLangProps()
public void setIncludeMatchInfo(boolean includeMatchInfo)
includeMatchInfo
- true=includepublic boolean getIncludeMatchInfo()
public void setReturnNullWhenNoProperties(boolean returnNullWhenNoProperties)
returnNullWhenNoProperties
- true = return null on emptypublic boolean getReturnNullWhenNoProperties()
public void setMaxCacheEntries(int maxCacheEntries)
maxCacheEntries
- public int getMaxCacheEntries()