public abstract class AbstractPropertySourceLoader extends Object implements PropertySourceLoader, Toggleable, Ordered
PropertySourceLoader interface.| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_POSITIONDefault position for the property source loader. | 
| protected org.slf4j.Logger | log | 
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractPropertySourceLoader() | 
| protected  | AbstractPropertySourceLoader(boolean logEnabled) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected MapPropertySource | createPropertySource(String name,
                    Map<String,Object> map,
                    int order) | 
| int | getOrder() | 
| boolean | isLogEnabled()Deprecated. 
 don't need to have this method | 
| Optional<PropertySource> | load(String resourceName,
    ResourceLoader resourceLoader)Load a  PropertySourcefor the givenEnvironment. | 
| Optional<PropertySource> | loadEnv(String resourceName,
       ResourceLoader resourceLoader,
       ActiveEnvironment activeEnvironment)Load a  PropertySourcefor the givenEnvironment. | 
| protected abstract void | processInput(String name,
            InputStream input,
            Map<String,Object> finalMap) | 
| protected void | processMap(Map<String,Object> finalMap,
          Map map,
          String prefix) | 
| Map<String,Object> | read(String name,
    InputStream input)Read a property source from an input stream. | 
| protected Optional<InputStream> | readInput(ResourceLoader resourceLoader,
         String fileName) | 
| void | setLogEnabled(boolean logEnabled)Deprecated. 
 set logEnabled value by constructor | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadisEnabledgetExtensions, readpublic static final int DEFAULT_POSITION
protected org.slf4j.Logger log
protected AbstractPropertySourceLoader()
protected AbstractPropertySourceLoader(boolean logEnabled)
public int getOrder()
public Optional<PropertySource> load(String resourceName, ResourceLoader resourceLoader)
PropertySourceLoaderPropertySource for the given Environment.load in interface PropertySourceLoaderresourceName - The resourceName of the resource to loadresourceLoader - The ResourceLoader to retrieve the resourcePropertySourcepublic Optional<PropertySource> loadEnv(String resourceName, ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment)
PropertySourceLoaderPropertySource for the given Environment.loadEnv in interface PropertySourceLoaderresourceName - The resourceName of the resource to loadresourceLoader - The ResourceLoader to retrieve the resourceactiveEnvironment - The environment to loadPropertySourceprotected MapPropertySource createPropertySource(String name, Map<String,Object> map, int order)
name - The name of the property sourcemap - The maporder - The order of the property sourcepublic Map<String,Object> read(String name, InputStream input) throws IOException
PropertySourceReaderread in interface PropertySourceReadername - The name of the property sourceinput - The bytesIOException - if there is an error processing the property sourceprotected Optional<InputStream> readInput(ResourceLoader resourceLoader, String fileName)
resourceLoader - The resource loaderfileName - The file nameOptionalprotected abstract void processInput(String name, InputStream input, Map<String,Object> finalMap) throws IOException
name - The nameinput - The input streamfinalMap - The map with all the properties processedIOException - If the input stream doesn't existprotected void processMap(Map<String,Object> finalMap, Map map, String prefix)
finalMap - The map with all the properties processedmap - The map to processprefix - The prefix for the keys@Deprecated public boolean isLogEnabled()
@Deprecated public void setLogEnabled(boolean logEnabled)
logEnabled - is log enabled