public abstract class PropFileBaseLoader extends BaseLoader implements ReadLoader, LocalFileLoader
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
missingFileAProblem |
protected Property<String> |
pathProp
Property containing the path of a property file.
|
protected String |
pathStr
String containing path of a property file.
|
protected boolean |
unknownPropertyAProblem |
| Constructor and Description |
|---|
PropFileBaseLoader() |
| Modifier and Type | Method and Description |
|---|---|
SamplePrinter |
getConfigSamplePrinter()
Returns a ConfigSamplePrinter, which can be used to print a configuration
sample for this Loader.
|
protected String |
getEffectivePath(ValidatedValuesWithContext existingValues)
Utility method to simplify finding the effective path.
|
List<Property> |
getInstanceConfig()
A list of properties that the user has specified as being configuration
properties for this Loader.
|
String |
getLoaderDialect()
The type dialect of the loader.
|
String |
getLoaderType()
The type of the loader, such as JNDI, PropertyFile, SystemProperty,
etc..
|
boolean |
isMissingFileAProblem()
If true, a loader that loads from a file will report a Problem that will
stop application startup if it cannot find the configured file.
|
boolean |
isTrimmingRequiredForStringValues()
If true, values for string properties are trimmed by the Trimmer of
the property they are associated with.
|
boolean |
isUnknownPropertyAProblem()
If true, an unrecognized name is considered a problem that will stop
application startup.
|
LoaderValues |
loadInputStreamToProps(InputStream inputStream,
String fromPath,
StaticPropertyConfigurationInternal appConfigDef,
ValidatedValuesWithContext existingValues) |
void |
setFilePath(Property<String> path)
Sets the path to the file to be loaded.
|
void |
setFilePath(String path)
Sets the path to the file to be loaded.
|
void |
setMissingFileAProblem(boolean isAProblem)
If set true, a file path that does not point to a file is a Problem/error.
|
void |
setUnknownPropertyAProblem(boolean isAProblem)
If true, an unrecognized property name is considered a problem/error.
|
attemptToAdd, attemptToAdd, createValue, findDuplicateProperty, getClassConfig, releaseResourcesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassConfig, getSpecificLoadDescription, load, releaseResourcesprotected Property<String> pathProp
protected String pathStr
protected boolean missingFileAProblem
protected boolean unknownPropertyAProblem
public LoaderValues loadInputStreamToProps(InputStream inputStream, String fromPath, StaticPropertyConfigurationInternal appConfigDef, ValidatedValuesWithContext existingValues) throws org.yarnandtail.andhow.load.LoaderException
protected String getEffectivePath(ValidatedValuesWithContext existingValues)
existingValues - public List<Property> getInstanceConfig()
LoadergetInstanceConfig in interface LoadergetInstanceConfig in class BaseLoaderpublic boolean isTrimmingRequiredForStringValues()
LoaderisTrimmingRequiredForStringValues in interface Loaderpublic SamplePrinter getConfigSamplePrinter()
LoadergetConfigSamplePrinter in interface LoadergetConfigSamplePrinter in class BaseLoaderpublic String getLoaderType()
LoadergetLoaderType in interface Loaderpublic String getLoaderDialect()
LoadergetLoaderDialect in interface Loaderpublic void setUnknownPropertyAProblem(boolean isAProblem)
ReadLoadersetUnknownPropertyAProblem in interface ReadLoaderpublic boolean isUnknownPropertyAProblem()
ReadLoaderisUnknownPropertyAProblem in interface ReadLoaderpublic void setMissingFileAProblem(boolean isAProblem)
LocalFileLoadersetMissingFileAProblem in interface LocalFileLoaderpublic boolean isMissingFileAProblem()
LocalFileLoaderisMissingFileAProblem in interface LocalFileLoaderpublic void setFilePath(String path)
LocalFileLoadersetFilePath in interface LocalFileLoaderpublic void setFilePath(Property<String> path)
LocalFileLoadersetFilePath in interface LocalFileLoaderCopyright © 2017. All rights reserved.