public class Configuration extends UnitilsConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
overridingProperties |
protected Properties |
properties |
| Constructor and Description |
|---|
Configuration(Properties properties)
Creates a configuration for the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
Properties |
getAllProperties() |
Boolean |
getBoolean(String propertyName,
String... classifiers)
Gets the boolean value for the property with the given name.
|
List<Boolean> |
getBooleanList(String propertyName,
String... classifiers)
Gets the list of comma separated boolean values for the property with the given name.
|
Class<?> |
getClass(String propertyName,
String... classifiers)
Gets the class value for the property with the given name.
|
List<Class<?>> |
getClassList(String propertyName,
String... classifiers)
Gets the list of comma separated class values for the property with the given name.
|
<T extends Enum<T>> |
getEnumList(Class<T> type,
String propertyName,
String... classifiers)
Gets the list of comma separated enum values for the property with the given name.
|
<T extends Enum<T>> |
getEnumValue(Class<T> type,
String propertyName,
String... classifiers)
Gets the enum value for the property with the given name.
|
<T> T |
getInstanceOf(Class<T> type,
String... classifiers)
Gets an instance of the given type (typically an interface).
|
<T> List<T> |
getInstanceOfList(Class<T> type,
String... classifiers)
Gets the list of comma separated instances of the given type (typically an interface).
|
Integer |
getInteger(String propertyName,
String... classifiers)
Gets the int value for the property with the given name.
|
List<Integer> |
getIntegerList(String propertyName,
String... classifiers)
Gets the list of comma separated int values for the property with the given name.
|
Long |
getLong(String propertyName,
String... classifiers)
Gets the long value for the property with the given name.
|
List<Long> |
getLongList(String propertyName,
String... classifiers)
Gets the list of comma separated long values for the property with the given name.
|
Boolean |
getOptionalBoolean(String propertyName,
String... classifiers)
Gets the boolean value for the property with the given name.
|
List<Boolean> |
getOptionalBooleanList(String propertyName,
String... classifiers)
Gets the list of comma separated boolean values for the property with the given name.
|
Class<?> |
getOptionalClass(String propertyName,
String... classifiers)
Gets the class value for the property with the given name.
|
List<Class<?>> |
getOptionalClassList(String propertyName,
String... classifiers)
Gets the list of comma separated class values for the property with the given name.
|
<T extends Enum<T>> |
getOptionalEnumList(Class<T> type,
String propertyName,
String... classifiers)
Gets the list of comma separated enum values for the property with the given name.
|
<T extends Enum<T>> |
getOptionalEnumValue(Class<T> type,
String propertyName,
String... classifiers)
Gets the enum value for the property with the given name.
|
<T> T |
getOptionalInstanceOf(Class<T> type,
String... classifiers)
Gets an instance of the given type (typically an interface).
|
<T> List<T> |
getOptionalInstanceOfList(Class<T> type,
String... classifiers)
Gets the list of comma separated instances of the given type (typically an interface).
|
Integer |
getOptionalInteger(String propertyName,
String... classifiers)
Gets the int value for the property with the given name.
|
List<Integer> |
getOptionalIntegerList(String propertyName,
String... classifiers)
Gets the list of comma separated int values for the property with the given name.
|
Long |
getOptionalLong(String propertyName,
String... classifiers)
Gets the long value for the property with the given name.
|
List<Long> |
getOptionalLongList(String propertyName,
String... classifiers)
Gets the list of comma separated long values for the property with the given name.
|
String |
getOptionalString(String propertyName,
String... classifiers)
Gets the string value for the property with the given name.
|
List<String> |
getOptionalStringList(String propertyName,
String... classifiers)
Gets the list of comma separated string values for the property with the given name.
|
<T> List<T> |
getOptionalValueListOfType(Class<T> type,
String propertyName,
String... classifiers) |
<T> T |
getOptionalValueOfType(Class<T> type,
String propertyName,
String... classifiers) |
Properties |
getOverridingProperties() |
protected String |
getProperty(String propertyName) |
String |
getString(String propertyName,
String... classifiers)
Gets the string value for the property with the given name.
|
List<String> |
getStringList(String propertyName,
String... classifiers)
Gets the list of comma separated string values for the property with the given name.
|
<T> List<T> |
getValueListOfType(Class<T> type,
String propertyName,
String... classifiers) |
<T> T |
getValueOfType(Class<T> type,
String propertyName,
String... classifiers) |
protected String |
nameToString(String propertyName,
String... classifiers) |
void |
setOverridingProperties(Properties overridingProperties) |
protected Boolean |
toBoolean(String value,
String propertyName,
String... classifiers) |
protected Class<?> |
toClass(String value,
String propertyName,
String[] classifiers) |
protected <T extends Enum<T>> |
toEnum(Class<T> type,
String value,
String propertyName,
String[] classifiers) |
protected <T> T |
toInstance(Class<T> type,
String value,
String propertyName,
String... classifiers) |
protected <T> T |
toInstance(String value,
String propertyName,
String... classifiers) |
protected Integer |
toInteger(String value,
String propertyName,
String... classifiers) |
protected Long |
toLong(String value,
String propertyName,
String... classifiers) |
protected List<String> |
toStringList(String value) |
protected <T> T |
toValueOfType(Class<T> type,
String value,
String propertyName,
String... classifiers) |
containsProperty, getBoolean, getBoolean, getInstance, getInstance, getInt, getInt, getLong, getLong, getProperties, getString, getString, getStringList, getStringListprotected Properties properties
protected Properties overridingProperties
public Configuration(Properties properties)
properties - All configuration properties, not nullpublic Properties getOverridingProperties()
public void setOverridingProperties(Properties overridingProperties)
public Properties getAllProperties()
public String getString(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public String getOptionalString(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<String> getStringList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<String> getOptionalStringList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Boolean getBoolean(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Boolean getOptionalBoolean(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Boolean> getBooleanList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Boolean> getOptionalBooleanList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Integer getInteger(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Integer getOptionalInteger(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Integer> getIntegerList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Integer> getOptionalIntegerList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Long getLong(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Long getOptionalLong(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Long> getLongList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Long> getOptionalLongList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Class<?> getClass(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public Class<?> getOptionalClass(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Class<?>> getClassList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public List<Class<?>> getOptionalClassList(String propertyName, String... classifiers)
propertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T> T getInstanceOf(Class<T> type, String... classifiers)
getInstanceOf in class UnitilsConfigurationtype - The type of the instanceclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T> T getOptionalInstanceOf(Class<T> type, String... classifiers)
type - The type of the instanceclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T> List<T> getInstanceOfList(Class<T> type, String... classifiers)
type - The type of the instanceclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T> List<T> getOptionalInstanceOfList(Class<T> type, String... classifiers)
type - The type of the instanceclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T extends Enum<T>> T getEnumValue(Class<T> type, String propertyName, String... classifiers)
type - The enum type, not nullpropertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T extends Enum<T>> T getOptionalEnumValue(Class<T> type, String propertyName, String... classifiers)
type - The enum type, not nullpropertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T extends Enum<T>> List<T> getEnumList(Class<T> type, String propertyName, String... classifiers)
type - The enum type, not nullpropertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T extends Enum<T>> List<T> getOptionalEnumList(Class<T> type, String propertyName, String... classifiers)
type - The enum type, not nullpropertyName - The name, not nullclassifiers - An optional list of classifiers for the property name (see class javadoc for more info)public <T> T getValueOfType(Class<T> type, String propertyName, String... classifiers)
public <T> T getOptionalValueOfType(Class<T> type, String propertyName, String... classifiers)
public <T> List<T> getValueListOfType(Class<T> type, String propertyName, String... classifiers)
public <T> List<T> getOptionalValueListOfType(Class<T> type, String propertyName, String... classifiers)
protected <T extends Enum<T>> T toEnum(Class<T> type, String value, String propertyName, String[] classifiers)
protected <T> T toInstance(Class<T> type, String value, String propertyName, String... classifiers)
Copyright © 2016. All Rights Reserved.