|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.spring.util.PropertiesLoader
public class PropertiesLoader
Constructor Summary | |
---|---|
PropertiesLoader()
|
Method Summary | |
---|---|
Properties |
getEnvironmentProperties()
|
protected Properties |
getEnvironmentProperties(String prefix)
Get a handle to our environment properties. |
String |
getEnvironmentPropertyPrefix()
|
String |
getFileEncoding()
|
Properties[] |
getLocalProperties()
|
org.springframework.core.io.Resource[] |
getLocations()
|
org.slf4j.Logger |
getLogger()
|
Properties |
getMergedLocalProperties()
|
PropertyLogger |
getPlogger()
|
Properties |
getProperties()
|
protected Properties |
getProperties(org.springframework.core.io.Resource location,
InputStream is)
Given a resource and an InputStream, load and return a Properties object. |
org.springframework.util.PropertiesPersister |
getPropertiesPersister()
|
Properties |
getResourceProperties()
|
Properties |
getSystemProperties()
|
SystemPropertiesMode |
getSystemPropertiesMode()
|
protected Properties |
handleResourceNotFound(org.springframework.core.io.Resource location)
Throw an exception unless ignoreResourceNotFound is true |
boolean |
isIgnoreResourceNotFound()
|
boolean |
isLocalOverride()
|
boolean |
isSearchSystemEnvironment()
|
boolean |
isUseEnvironmentPropertyPrefix()
|
protected boolean |
isXMLFile(org.springframework.core.io.Resource location)
True if this location represents an XML file, false otherwise |
protected Properties |
loadEnvironmentProperties()
Get properties from the environment |
Properties |
loadProperties()
Fill in a Properties object |
protected Properties |
loadProperties(org.springframework.core.io.Resource location)
Load properties from a Resource object. |
Properties |
loadResourceProperties()
|
protected Properties |
loadSystemProperties()
Get system properties |
protected void |
logResult(PropertyMergeResult result)
|
protected Properties |
mergeLocalProperties()
Merge the Properties[] into a single Properties object |
void |
mergeProperties(PropertiesMergeContext context)
|
Properties |
mergeProperties(Properties local,
Properties resource,
Properties sys,
Properties env)
Merge local, resource, system, and environment properties into a single Properties object. |
PropertyMergeResult |
mergeProperty(PropertiesMergeContext context,
String key)
Merge a property under 'key' from newProps into currentProps using the settings from PropertiesMergeContext |
protected void |
nullSafeClose(InputStream is)
Close the InputStream |
void |
setEnvironmentProperties(Properties environmentProperties)
|
void |
setEnvironmentPropertyPrefix(String environmentPropertyPrefix)
|
void |
setFileEncoding(String fileEncoding)
|
void |
setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
|
void |
setLocalOverride(boolean localOverride)
|
void |
setLocalProperties(Properties[] localProperties)
|
void |
setLocations(org.springframework.core.io.Resource[] locations)
|
void |
setMergedLocalProperties(Properties mergedLocalProperties)
|
void |
setPlogger(PropertyLogger propertiesLogger)
|
void |
setProperties(Properties properties)
|
void |
setPropertiesPersister(org.springframework.util.PropertiesPersister propertiesPersister)
|
void |
setResourceProperties(Properties resourceProperties)
|
void |
setSearchSystemEnvironment(boolean searchSystemEnvironment)
|
void |
setSystemProperties(Properties systemProperties)
|
void |
setSystemPropertiesMode(SystemPropertiesMode systemPropertiesMode)
|
void |
setUseEnvironmentPropertyPrefix(boolean useEnvironmentPropertyPrefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.slf4j.Logger logger
public static final String DEFAULT_ENVIRONMENT_PROPERTY_PREFIX
public static final boolean DEFAULT_IS_USE_ENVIRONMENT_PROPERTY_PREFIX
public static final boolean DEFAULT_IS_LOCAL_OVERRIDE
public static final boolean DEFAULT_IS_IGNORE_RESOURCE_NOT_FOUND
public static final boolean DEFAULT_IS_SEARCH_SYSTEM_ENVIRONMENT
public static final SystemPropertiesMode DEFAULT_SYSTEM_PROPERTIES_MODE
String environmentPropertyPrefix
boolean useEnvironmentPropertyPrefix
SystemPropertiesMode systemPropertiesMode
boolean localOverride
boolean ignoreResourceNotFound
boolean searchSystemEnvironment
String fileEncoding
Properties[] localProperties
org.springframework.core.io.Resource[] locations
org.springframework.util.PropertiesPersister propertiesPersister
PropertyLogger plogger
Properties systemProperties
Properties environmentProperties
Properties resourceProperties
Properties mergedLocalProperties
Properties properties
Constructor Detail |
---|
public PropertiesLoader()
Method Detail |
---|
protected Properties getEnvironmentProperties(String prefix)
protected Properties getProperties(org.springframework.core.io.Resource location, InputStream is) throws IOException
location
- is
-
IOException
protected Properties loadProperties(org.springframework.core.io.Resource location) throws IOException
location
-
IOException
protected boolean isXMLFile(org.springframework.core.io.Resource location)
location
-
protected Properties handleResourceNotFound(org.springframework.core.io.Resource location)
location
-
protected void nullSafeClose(InputStream is) throws IOException
is
-
IOException
protected Properties mergeLocalProperties()
protected Properties loadEnvironmentProperties()
protected Properties loadSystemProperties()
public Properties mergeProperties(Properties local, Properties resource, Properties sys, Properties env)
public Properties loadProperties()
public PropertyMergeResult mergeProperty(PropertiesMergeContext context, String key)
context
- key
- public void mergeProperties(PropertiesMergeContext context)
protected void logResult(PropertyMergeResult result)
public Properties loadResourceProperties() throws IOException
IOException
public boolean isIgnoreResourceNotFound()
public String getFileEncoding()
public Properties[] getLocalProperties()
public void setLocalProperties(Properties[] localProperties)
public org.springframework.core.io.Resource[] getLocations()
public boolean isLocalOverride()
public org.springframework.util.PropertiesPersister getPropertiesPersister()
public String getEnvironmentPropertyPrefix()
public void setEnvironmentPropertyPrefix(String environmentPropertyPrefix)
public org.slf4j.Logger getLogger()
public void setPropertiesPersister(org.springframework.util.PropertiesPersister propertiesPersister)
public void setLocations(org.springframework.core.io.Resource[] locations)
public void setLocalOverride(boolean localOverride)
public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
public void setFileEncoding(String fileEncoding)
public SystemPropertiesMode getSystemPropertiesMode()
public void setSystemPropertiesMode(SystemPropertiesMode systemPropertiesMode)
public boolean isSearchSystemEnvironment()
public void setSearchSystemEnvironment(boolean searchSystemEnvironment)
public void setResourceProperties(Properties resourceProperties)
public void setSystemProperties(Properties systemProperties)
public void setEnvironmentProperties(Properties environmentProperties)
public void setMergedLocalProperties(Properties mergedLocalProperties)
public boolean isUseEnvironmentPropertyPrefix()
public void setUseEnvironmentPropertyPrefix(boolean useEnvironmentPropertyPrefix)
public PropertyLogger getPlogger()
public void setPlogger(PropertyLogger propertiesLogger)
public Properties getProperties()
public void setProperties(Properties properties)
public Properties getSystemProperties()
public Properties getEnvironmentProperties()
public Properties getResourceProperties()
public Properties getMergedLocalProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |