Class BasicConfigurationHelper<T>
- java.lang.Object
-
- net.obvj.confectory.internal.helper.BasicConfigurationHelper<T>
-
- Type Parameters:
T- the source type which configuration data is to be retrieved
- All Implemented Interfaces:
ConfigurationDataRetriever<T>,ConfigurationHelper<T>
- Direct Known Subclasses:
BeanConfigurationHelper,PropertiesConfigurationHelper
public abstract class BasicConfigurationHelper<T> extends Object implements ConfigurationHelper<T>
A basic, abstract Configuration Helper object providing common infrastructure for concrete implementations.- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetBean()Returns the configuration bean used by this data retriever, typically for manual handling and/or troubleshooting purposes.BooleangetBoolean(String key)Returns theBooleanobject associated with the specifiedkey.DoublegetDouble(String key)Returns theDoubleobject associated with the specifiedkey.IntegergetInteger(String key)Returns theIntegerobject associated with the specifiedkey.LonggetLong(String key)Returns theLongobject associated with the specifiedkey.BooleangetMandatoryBoolean(String key)Returns theBooleanobject associated with the specifiedkey, throwing an exception if not found.DoublegetMandatoryDouble(String key)Returns theDoubleobject associated with the specifiedkey, throwing an exception if not found.IntegergetMandatoryInteger(String key)Returns theIntegerobject associated with the specifiedkey, throwing an exception if not found.LonggetMandatoryLong(String key)Returns theLongobject associated with the specifiedkey, throwing an exception if not found.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.obvj.confectory.ConfigurationDataRetriever
get, getAsString, getMandatoryString, getString
-
Methods inherited from interface net.obvj.confectory.internal.helper.ConfigurationHelper
configurationMerger
-
-
-
-
Method Detail
-
getBean
public T getBean()
Description copied from interface:ConfigurationDataRetrieverReturns the configuration bean used by this data retriever, typically for manual handling and/or troubleshooting purposes.- Specified by:
getBeanin interfaceConfigurationDataRetriever<T>- Returns:
- the configuration bean (Note: it can be
nullif theConfigurationis marked as optional)
-
getBoolean
public Boolean getBoolean(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theBooleanobject associated with the specifiedkey.- Specified by:
getBooleanin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath)- Returns:
- the
Booleanobject associated with the specifiedkey;nullif not found
-
getMandatoryBoolean
public Boolean getMandatoryBoolean(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theBooleanobject associated with the specifiedkey, throwing an exception if not found.- Specified by:
getMandatoryBooleanin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath)- Returns:
- the
Booleanvalue associated with the specifiedkey; nevernull
-
getInteger
public Integer getInteger(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theIntegerobject associated with the specifiedkey.- Specified by:
getIntegerin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath- Returns:
- the
Integerobject associated with the specifiedkey;nullif not found
-
getMandatoryInteger
public Integer getMandatoryInteger(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theIntegerobject associated with the specifiedkey, throwing an exception if not found.- Specified by:
getMandatoryIntegerin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath)- Returns:
- the
Integerobject associated with the specifiedkey; nevernull
-
getLong
public Long getLong(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theLongobject associated with the specifiedkey.- Specified by:
getLongin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath- Returns:
- the
Longobject associated with the specifiedkey;nullif not found
-
getMandatoryLong
public Long getMandatoryLong(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theLongobject associated with the specifiedkey, throwing an exception if not found.- Specified by:
getMandatoryLongin interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath)- Returns:
- the
Longobject associated with the specifiedkey; nevernull
-
getDouble
public Double getDouble(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theDoubleobject associated with the specifiedkey.- Specified by:
getDoublein interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath- Returns:
- the
Doubleobject associated with the specifiedkey;nullif not found
-
getMandatoryDouble
public Double getMandatoryDouble(String key)
Description copied from interface:ConfigurationDataRetrieverReturns theDoubleobject associated with the specifiedkey, throwing an exception if not found.- Specified by:
getMandatoryDoublein interfaceConfigurationDataRetriever<T>- Parameters:
key- the object key (some implementations may also accept a path expression, e.g:JSONPath)- Returns:
- the
Doubleobject associated with the specifiedkey; nevernull
-
-