Package com.saperion.config
Enum SaAgentConfig
- java.lang.Object
-
- java.lang.Enum<SaAgentConfig>
-
- com.saperion.config.SaAgentConfig
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SaAgentConfig>
public enum SaAgentConfig extends java.lang.Enum<SaAgentConfig>
This class is responsible to read the system configurations.- Since:
- 8.0.1
- Author:
- Pritam Biswas
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBooleanProperty(java.lang.String key, boolean defaultValue)
Get the value of a property as a booleanint
getIntegerProperty(java.lang.String key, int defaultValue)
Get the value of a property as an integerjava.lang.String
getProperty(java.lang.String key)
Get the property by key and returns the corresponding value asString
java.lang.String
getProperty(java.lang.String key, java.lang.String defaultValue)
Get the property by key and return the corresponding value asString
.static SaAgentConfig
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SaAgentConfig[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final SaAgentConfig DEFAULT
-
-
Method Detail
-
values
public static SaAgentConfig[] 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 (SaAgentConfig c : SaAgentConfig.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SaAgentConfig valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Get the property by key and returns the corresponding value asString
- Parameters:
key
-- Returns:
- The value or null if not found
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
Get the property by key and return the corresponding value asString
. Return defaultValue if not found- Parameters:
key
-- Returns:
- The corresponding value or the default value if not found
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
Get the value of a property as a boolean- Parameters:
key
-defaultValue
-- Returns:
- The corresponding value or default value if not found
-
getIntegerProperty
public int getIntegerProperty(java.lang.String key, int defaultValue)
Get the value of a property as an integer- Parameters:
key
-defaultValue
-- Returns:
- The corresponding value or default value if not found
-
-