public abstract class BaseLoader extends Object implements Loader
| Constructor and Description |
|---|
BaseLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
attemptToAdd(PropertyConfigurationInternal appConfigDef,
List<ValidatedValue> values,
ProblemList<Problem> loaderProblems,
Property prop,
Object value)
Util method to attempt to load an object of an unknown type to a property.
|
protected void |
attemptToAdd(PropertyConfigurationInternal appConfigDef,
List<ValidatedValue> values,
ProblemList<Problem> loaderProblems,
String key,
Object value)
Util method to load an Object value to a named Property.
|
protected void |
attemptToAdd(PropertyConfigurationInternal appConfigDef,
List<ValidatedValue> values,
ProblemList<Problem> loaderProblems,
String key,
String strValue)
Util method to load a String to a property by name.
|
protected void |
attemptToAddIfNotDuplicate(PropertyConfigurationInternal appConfigDef,
List<ValidatedValue> values,
ProblemList<Problem> loaderProblems,
ValidatedValue validatedValue)
Adds the ValidatedValue to the VV list if it is not a duplicate.
|
protected <T> ValidatedValue |
createValue(PropertyConfigurationInternal appConfigDef,
Property<T> prop,
String untrimmedString) |
protected ValidatedValue |
findDuplicateProperty(ValidatedValue current,
List<ValidatedValue> values) |
Class<?> |
getClassConfig()
Returns a PropertyGroup used to globally configure a class of Loader.
|
SamplePrinter |
getConfigSamplePrinter()
Returns a ConfigSamplePrinter, which can be used to print a configuration
sample for this Loader.
|
List<Property> |
getInstanceConfig()
A list of properties that the user has specified as being configuration
properties for this Loader.
|
protected Property |
mapNametoProperty(PropertyConfigurationInternal appConfigDef,
String name)
Maps the passed Property name or alias to a Property or null if it cannot be found.
|
void |
releaseResources()
Release any resources held by this loader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLoaderDialect, getLoaderType, getSpecificLoadDescription, isTrimmingRequiredForStringValues, loadpublic Class<?> getClassConfig()
LoadergetClassConfig in interface Loaderpublic List<Property> getInstanceConfig()
LoadergetInstanceConfig in interface Loaderpublic SamplePrinter getConfigSamplePrinter()
LoadergetConfigSamplePrinter in interface Loaderprotected void attemptToAdd(PropertyConfigurationInternal appConfigDef, List<ValidatedValue> values, ProblemList<Problem> loaderProblems, String key, String strValue)
appConfigDef - Used to look up the property name for find the actual propertyvalues - List of PropertyValues to add to, which should be only the value of this loader.loaderProblems - A list of Problems to add to if there is a loader related problemkey - The property namestrValue - The property valueprotected void attemptToAdd(PropertyConfigurationInternal appConfigDef, List<ValidatedValue> values, ProblemList<Problem> loaderProblems, String key, Object value)
appConfigDef - Used to look up the property name for find the actual propertyvalues - List of PropertyValues to add to, which should be only the value of this loader.loaderProblems - A list of Problems to add to if there is a loader related problemkey - The property namevalue - The property value as an Object, already of the expected type for the Property.protected void attemptToAdd(PropertyConfigurationInternal appConfigDef, List<ValidatedValue> values, ProblemList<Problem> loaderProblems, Property prop, Object value)
appConfigDef - Used to look up the property name for find the actual propertyvalues - List of PropertyValues to add to, which should be only the value of this loader.loaderProblems - A list of LoaderProblems to add to if there is a loader related problemprop - The Property to load tovalue - The Object to be loaded to this property. If a String and that does
not match the Property type, parsing is attempted to convert it.protected void attemptToAddIfNotDuplicate(PropertyConfigurationInternal appConfigDef, List<ValidatedValue> values, ProblemList<Problem> loaderProblems, ValidatedValue validatedValue)
appConfigDef - Used to look up the property name for find the actual propertyvalues - List of PropertyValues to add to, which should be only the value of this loader.loaderProblems - A list of Problems to add to if there is a loader related problemvalidatedValue - The validated value to load, which may be null which is a no-op.protected ValidatedValue findDuplicateProperty(ValidatedValue current, List<ValidatedValue> values)
protected <T> ValidatedValue createValue(PropertyConfigurationInternal appConfigDef, Property<T> prop, String untrimmedString) throws ParsingException
ParsingExceptionprotected Property mapNametoProperty(PropertyConfigurationInternal appConfigDef, String name)
appConfigDef - The AppConfigname - The name, which will be trimmed and converted to an effective name.public void releaseResources()
LoaderreleaseResources in interface LoaderCopyright © 2021. All rights reserved.