org.sakaiproject.util
Class SakaiProperties.SakaiPropertiesFactoryBean
java.lang.Object
org.sakaiproject.util.SakaiProperties.SakaiPropertiesFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
- Enclosing class:
- SakaiProperties
public class SakaiProperties.SakaiPropertiesFactoryBean
- extends Object
- implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
Blatantly stolen from the Spring classes in order to get access to the properties files as they are read in,
this could not be done by overrides because the stupid finals and private vars, this is why frameworks should
never use final and private in their code.... sigh
- Author:
- Spring Framework, Aaron Zeckoski (azeckoski @ vt.edu)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_FILE_EXTENSION
public static final String XML_FILE_EXTENSION
- See Also:
- Constant Field Values
SakaiProperties.SakaiPropertiesFactoryBean
public SakaiProperties.SakaiPropertiesFactoryBean()
getLoadedProperties
public Map<String,Properties> getLoadedProperties()
- Returns:
- a map of file -> properties for everything loaded here
setSingleton
public final void setSingleton(boolean singleton)
isSingleton
public final boolean isSingleton()
- Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean
afterPropertiesSet
public final void afterPropertiesSet()
throws IOException
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
IOException
getObject
public final Object getObject()
throws IOException
- Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
- Throws:
IOException
getObjectType
public Class getObjectType()
- Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean
createInstance
protected Object createInstance()
throws IOException
- Throws:
IOException
setProperties
public void setProperties(Properties properties)
setPropertiesArray
public void setPropertiesArray(Properties[] propertiesArray)
setLocation
public void setLocation(org.springframework.core.io.Resource location)
setLocations
public void setLocations(org.springframework.core.io.Resource[] locations)
setLocalOverride
public void setLocalOverride(boolean localOverride)
setIgnoreResourceNotFound
public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
setFileEncoding
public void setFileEncoding(String encoding)
setPropertiesPersister
public void setPropertiesPersister(org.springframework.util.PropertiesPersister propertiesPersister)
mergeProperties
protected Properties mergeProperties()
throws IOException
- Return a merged Properties instance containing both the loaded properties
and properties set on this FactoryBean.
- Throws:
IOException
loadProperties
protected void loadProperties(Properties props)
throws IOException
- Load properties into the given instance.
- Parameters:
props - the Properties instance to load into
- Throws:
IOException - in case of I/O errors- See Also:
setLocations(org.springframework.core.io.Resource[])
Copyright © 2003-2013 The Sakai Foundation. All Rights Reserved.