public class Settings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLIENT_ID_KEY |
static java.lang.String |
CLIENT_SECRET_KEY |
private java.lang.String |
clientID |
private java.lang.String |
clientSecret |
static java.lang.String |
INSTANCE |
private static org.slf4j.Logger |
LOGGER
Private property to construct a logger for this class.
|
private java.util.Properties |
prop
Private property that contains the SDK settings
|
private java.lang.String |
region |
static java.lang.String |
REGION |
Constructor and Description |
---|
Settings() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClientId() |
java.lang.String |
getClientSecret() |
java.lang.String |
getRegion() |
java.lang.String |
getURL(java.lang.String name) |
java.lang.String |
getURL(java.lang.String name,
int id) |
java.lang.String |
getURL(java.lang.String name,
long id) |
java.lang.String |
getURL(java.lang.String name,
java.lang.String id) |
private java.lang.Boolean |
loadBooleanProperty(java.lang.String propertyKey)
Loads a property of the type Boolean from the Properties object
|
private java.util.List<java.lang.String> |
loadListProperty(java.lang.String propertyKey)
Loads a property of the type List from the Properties object
|
private void |
loadPropFile(java.lang.String propFileName)
Loads the settings from the properties file
|
private java.lang.String |
loadStringProperty(java.lang.String propertyKey)
Loads a property of the type String from the Properties object
|
private java.net.URL |
loadURLProperty(java.lang.String propertyKey)
Loads a property of the type URL from the Properties object
|
private static final org.slf4j.Logger LOGGER
private java.util.Properties prop
public static final java.lang.String CLIENT_ID_KEY
public static final java.lang.String CLIENT_SECRET_KEY
public static final java.lang.String INSTANCE
public static final java.lang.String REGION
private java.lang.String clientID
private java.lang.String clientSecret
private java.lang.String region
public java.lang.String getClientId()
public java.lang.String getClientSecret()
public java.lang.String getRegion()
public java.lang.String getURL(java.lang.String name, java.lang.String id)
public java.lang.String getURL(java.lang.String name, int id)
public java.lang.String getURL(java.lang.String name, long id)
public java.lang.String getURL(java.lang.String name)
private void loadPropFile(java.lang.String propFileName) throws java.io.IOException, Error
propFileName
- the name of the filejava.io.IOException
Error
private java.lang.String loadStringProperty(java.lang.String propertyKey)
propertyKey
- the property nameprivate java.lang.Boolean loadBooleanProperty(java.lang.String propertyKey)
propertyKey
- the property nameprivate java.util.List<java.lang.String> loadListProperty(java.lang.String propertyKey)
propertyKey
- the property nameprivate java.net.URL loadURLProperty(java.lang.String propertyKey)
propertyKey
- the property name