public class SimpleAtomConfig extends Object implements AtomConfig
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_NUMBER_OBJECT_TYPES |
static int |
DEFAULT_MAX_OBJECT_TYPE_COOKIE_LENGTH |
static int |
DEFAULT_MAX_PAGE_SIZE |
Constructor and Description |
---|
SimpleAtomConfig() |
SimpleAtomConfig(int maxPageSize,
int maxNumObjects,
int maxCookieLength) |
Modifier and Type | Method and Description |
---|---|
Boolean |
getBooleanContainerProperty(String key)
Gets the property value for the given key as a Boolean.
|
boolean |
getBooleanContainerProperty(String key,
boolean defaultValue)
Gets the property value for the given key as a boolean, returning the defaultValue if the located property value
null . |
String |
getContainerProperty(String key)
Gets the property value for the given key as a String.
|
String |
getContainerProperty(String key,
String defaultValue)
Gets the property value for the given key as a String., returning the defaultValue if the located property value
is blank (
null or all characters are whitespace). |
Level |
getLogLevel()
The current log level for the Atom.
|
Long |
getLongContainerProperty(String key)
Gets the property value for the given key as a Long.
|
long |
getLongContainerProperty(String key,
long defaultValue)
Gets the property value for the given key as a Long, returning the defaultValue if the located property value
null . |
int |
getMaxNumberObjectTypes()
Returns the maximum number of object types allowed to be returned from a browse request.
|
int |
getMaxObjectTypeCookieLength()
Returns the maximum number of characters allowed in an ObjectType cookie.
|
int |
getMaxPageSize()
Returns the maximum page size recommended by the Atom.
|
AtomProxyConfig |
getProxyConfig()
Returns ProxyConfig object with access to Atom proxy properties such as proxyHost, proxyPort etc.
|
void |
setProxyConfig(AtomProxyConfig proxyConfig)
Setter method for AtomProxyConfig to overwrite the default implementation of SimpleAtomProxyConfig instance if
needed.
|
SimpleAtomConfig |
withContainerProperty(String propertyKey,
String propertyValue)
Builder method to set any container properties.
|
public static final int DEFAULT_MAX_PAGE_SIZE
public static final int DEFAULT_MAX_NUMBER_OBJECT_TYPES
public static final int DEFAULT_MAX_OBJECT_TYPE_COOKIE_LENGTH
public SimpleAtomConfig()
public SimpleAtomConfig(int maxPageSize, int maxNumObjects, int maxCookieLength)
public SimpleAtomConfig withContainerProperty(String propertyKey, String propertyValue)
HashMap
with key value pairspropertyKey
- the key of property to be storedpropertyValue
- the associated value of the key to be storedpublic void setProxyConfig(AtomProxyConfig proxyConfig)
proxyConfig
- Atom proxy configuration information which may be of use to a developer. Connector devs can
use the SimpleAtomProxyConfig builder to create a new instance and pass it in as an argument here.public String getContainerProperty(String key)
AtomConfig
getContainerProperty
in interface AtomConfig
key
- key of the desired propertynull
if not found.public String getContainerProperty(String key, String defaultValue)
AtomConfig
null
or all characters are whitespace).getContainerProperty
in interface AtomConfig
key
- key of the desired propertydefaultValue
- value to return if property value is blankpublic Boolean getBooleanContainerProperty(String key)
AtomConfig
getBooleanContainerProperty
in interface AtomConfig
key
- key of the desired propertynull
if not found or isn't "true" or "false".public boolean getBooleanContainerProperty(String key, boolean defaultValue)
AtomConfig
null
.getBooleanContainerProperty
in interface AtomConfig
key
- key of the desired propertydefaultValue
- value to return if property value is null
public Long getLongContainerProperty(String key)
AtomConfig
getLongContainerProperty
in interface AtomConfig
key
- key of the desired propertynull
if not found.public long getLongContainerProperty(String key, long defaultValue)
AtomConfig
null
.getLongContainerProperty
in interface AtomConfig
key
- key of the desired propertydefaultValue
- value to return if property value is null
public AtomProxyConfig getProxyConfig()
AtomConfig
getProxyConfig
in interface AtomConfig
public int getMaxPageSize()
AtomConfig
getMaxPageSize
in interface AtomConfig
public int getMaxNumberObjectTypes()
AtomConfig
getMaxNumberObjectTypes
in interface AtomConfig
public int getMaxObjectTypeCookieLength()
AtomConfig
getMaxObjectTypeCookieLength
in interface AtomConfig
public Level getLogLevel()
AtomConfig
getLogLevel
in interface AtomConfig