Package net.authorize
Enum Environment
- java.lang.Object
-
- java.lang.Enum<Environment>
-
- net.authorize.Environment
-
- All Implemented Interfaces:
Serializable,Comparable<Environment>
public enum Environment extends Enum<Environment>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOMHOSTED_VMLOCAL_VMPRODUCTIONSANDBOX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EnvironmentcreateEnvironment(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 EnvironmentcreateEnvironment(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.StringgetBaseUrl()static booleangetBooleanProperty(String propertyName)Reads a boolean value from property file and/or the environment Values in property file supersede the values set in environmentStringgetCardPresentUrl()static intgetIntProperty(String propertyName)Reads a integer value from property file and/or the environment Values in property file supersede the values set in environmentstatic StringgetProperty(String propertyName)Reads the value from property file and/or the environment Values in property file supersede the values set in environmentStringgetXmlBaseUrl()static EnvironmentvalueOf(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.
-
-
-
Enum Constant Detail
-
SANDBOX
public static final Environment SANDBOX
-
PRODUCTION
public static final Environment PRODUCTION
-
LOCAL_VM
public static final Environment LOCAL_VM
-
HOSTED_VM
public static final Environment HOSTED_VM
-
CUSTOM
public static final Environment CUSTOM
-
-
Method Detail
-
values
public static Environment[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Environment c : Environment.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Environment valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getBaseUrl
public String getBaseUrl()
- Returns:
- the baseUrl
-
getXmlBaseUrl
public String getXmlBaseUrl()
- Returns:
- the xmlBaseUrl
-
getCardPresentUrl
public String getCardPresentUrl()
- Returns:
- the cardPresentUrl
-
createEnvironment
public 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.- Parameters:
baseUrl-xmlBaseUrl-- Returns:
- Environment object
-
createEnvironment
public 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.- Parameters:
baseUrl-xmlBaseUrl-cardPresentUrl-- Returns:
- Environment object
-
getIntProperty
public 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- Parameters:
propertyName- name of the integer property to read- Returns:
- int property value
-
getBooleanProperty
public 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- Parameters:
propertyName- name of the boolean property to read- Returns:
- boolean property value
-
-