public enum Environment extends Enum<Environment>
Enum Constant and Description |
---|
CUSTOM |
HOSTED_VM |
LOCAL_VM |
PRODUCTION |
SANDBOX |
Modifier and Type | Method and Description |
---|---|
static Environment |
createEnvironment(String baseUrl,
String xmlBaseUrl)
If a custom environment needs to be supported, this convenience create
method can be used to pass in a custom baseUrl.
|
static Environment |
createEnvironment(String baseUrl,
String xmlBaseUrl,
String cardPresentUrl)
If a custom environment needs to be supported, this convenience create
method can be used to pass in a custom baseUrl.
|
String |
getBaseUrl() |
static boolean |
getBooleanProperty(String propertyName)
Reads a boolean value from property file and/or the environment
Values in property file supersede the values set in environment
|
String |
getCardPresentUrl() |
static int |
getIntProperty(String propertyName)
Reads a integer value from property file and/or the environment
Values in property file supersede the values set in environment
|
static String |
getProperty(String propertyName)
Reads the value from property file and/or the environment
Values in property file supersede the values set in environment
|
String |
getXmlBaseUrl() |
static Environment |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Environment[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Environment SANDBOX
public static final Environment PRODUCTION
public static final Environment LOCAL_VM
public static final Environment HOSTED_VM
public static final Environment CUSTOM
public static Environment[] values()
for (Environment c : Environment.values()) System.out.println(c);
public static Environment valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getBaseUrl()
public String getXmlBaseUrl()
public String getCardPresentUrl()
public static Environment createEnvironment(String baseUrl, String xmlBaseUrl)
baseUrl
- xmlBaseUrl
- public static Environment createEnvironment(String baseUrl, String xmlBaseUrl, String cardPresentUrl)
baseUrl
- xmlBaseUrl
- cardPresentUrl
- public static int getIntProperty(String propertyName)
propertyName
- name of the integer property to readpublic static boolean getBooleanProperty(String propertyName)
propertyName
- name of the boolean property to readCopyright © 2021. All rights reserved.