|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecebs.rtd.enabler.ConfigManager
public abstract class ConfigManager
Provides settings used throught the RTD Enabler, abstracting some of the platform-specific checks. An appropriate initialise call must be made before attempting to retreive values
Method Summary | |
---|---|
void |
clearCertificateAlias()
Clear the alias for a certificate to be used for client authentication |
void |
clearLoginCredentials()
Clear the basic auth credentials to be used for communicating with RTD |
String |
getCustomerId()
Get the customer ID (specified by the KEYS#CUSTOMER_ID parameter). |
abstract String |
getDeviceId()
Get a device ID to be used when generating the request ID for ModifyRequest instances |
URL |
getDownloadInterfaceURL()
Get the download interface URL |
static ConfigManager |
getInstance()
Get the initialised instance. |
com.squareup.okhttp.OkHttpClient |
getOkHttpClient()
|
String |
getOriginator()
Get the originator used for RTD requests. |
abstract String |
getPlatform()
Get the name of the current platform. |
URL |
getQueryInterfaceURL()
Get the query interface URL |
URL |
getRetailInterfaceURL()
Get the retail interface URL |
abstract String |
getSoftwareBuildVersion()
Get the current software build version |
abstract boolean |
hasConnection()
Can be used to determine if there is currently a connection that can be used for carrying out network operations. |
boolean |
isInTestMode()
Determine if test parameters are being returned. |
void |
setCertificateAlias(String alias)
Set the alias for a certificate to be used for client authentication when communicating with RTD |
void |
setLoginCredentials(String username,
String password)
Set the basic auth credentials to be used for communicating with RTD |
void |
setTestMode(boolean testMode)
Sets whether test parameters should be returned. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ecebs.rtd.enabler.IConfigManager |
---|
closeEnabler |
Method Detail |
---|
public static ConfigManager getInstance() throws IllegalStateException
IllegalStateException
being thrown.
IllegalStateException
- Thrown if a ConfigManager has not been initialisedpublic abstract boolean hasConnection()
public abstract String getPlatform()
public com.squareup.okhttp.OkHttpClient getOkHttpClient()
public abstract String getSoftwareBuildVersion()
public abstract String getDeviceId()
ModifyRequest
instances
public void setTestMode(boolean testMode)
setTestMode
in interface IConfigManager
testMode
- If true, test parameters will be returned by methods.
Else, "live" parameters will be returnedpublic boolean isInTestMode()
public void setCertificateAlias(String alias) throws GeneralSecurityException
alias
- Alias of the client certificate
GeneralSecurityException
public void clearCertificateAlias()
public void setLoginCredentials(String username, String password)
setLoginCredentials
in interface IConfigManager
username
- username for credentialspassword
- password for credentialspublic void clearLoginCredentials()
clearLoginCredentials
in interface IConfigManager
public URL getRetailInterfaceURL()
public URL getDownloadInterfaceURL()
public URL getQueryInterfaceURL()
public String getCustomerId()
KEYS#CUSTOMER_ID
parameter).
KEYS#CUSTOMER_ID
(null if not specified).public String getOriginator()
KEYS#ORIGINATOR
has been set, it will be returned.
Otherwise, the KEYS#CUSTOMER_ID
is used with the platform
name and software build version to create an originator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |