Package org.tanukisoftware.wrapper
Class WrapperPropertyUtil
java.lang.Object
org.tanukisoftware.wrapper.WrapperPropertyUtil
A collection of utility methods which make it easy to work with Wrapper
configuration Properties without littering code with error handling.
System Properties can be accessed with the WrapperSystemPropertyUtil
class.
- Author:
- Tanuki Software Development Team <support@tanukisoftware.com>
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBooleanProperty
(String name, boolean defaultValue) Resolves a boolean property.static int
getIntProperty
(String name, int defaultValue) Resolves an integer property.static long
getLongProperty
(String name, long defaultValue) Resolves a long property.static String
getStringProperty
(String name, String defaultValue) Resolves a string property.
-
Method Details
-
getStringProperty
Resolves a string property.- Parameters:
name
- The name of the property to lookup.defaultValue
- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getBooleanProperty
Resolves a boolean property.- Parameters:
name
- The name of the property to lookup.defaultValue
- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getIntProperty
Resolves an integer property.- Parameters:
name
- The name of the property to lookup.defaultValue
- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-
getLongProperty
Resolves a long property.- Parameters:
name
- The name of the property to lookup.defaultValue
- The value to return if it is not set or is invalid.- Returns:
- The requested property value.
-