public class Config extends Object
Modifier and Type | Field and Description |
---|---|
static 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 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 |
---|---|
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.
|
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(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 |
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 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 void setCookieName(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 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()
Copyright © 2021 DeviceAtlas Limited. All rights reserved.