@Service public class ServerPropertiesService extends Object implements ServerProperties, ServerConfiguration, org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
ServerPropertiesService()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProperties(Properties props)
Adds the properties in props to the current configuration.
|
Collection<?> |
configureInstances(Class<?> target) |
void |
configureMe(Object target) |
Collection<?> |
configureNamedInstances(List<?> instances) |
Properties |
getBootstrapState() |
Double |
getDoubleProperty(String name,
Double defaultValue) |
Integer |
getIntegerProperty(String name,
Integer defaultValue) |
String |
getProperty(String name) |
String |
getProperty(String name,
String defaultValue) |
Properties |
getPublishedConfiguration()
Returns the published configuration as a Properties instance
|
void |
publishConfiguration(Object target) |
void |
recycle()
Come here to re-configure from scratch.
|
void |
saveBootstrapState(Object thing) |
void |
setApplicationContext(org.springframework.context.ApplicationContext context) |
void |
setProperty(String key,
Object value)
Changes the value of a property (or adds a property).
|
void |
setUserConfig(URL userConfigURL) |
public void recycle()
public void setUserConfig(URL userConfigURL) throws org.apache.commons.configuration2.ex.ConfigurationException, IOException
org.apache.commons.configuration2.ex.ConfigurationExceptionIOExceptionpublic void addProperties(Properties props)
public void configureMe(Object target)
configureMe in interface ServerConfigurationpublic Collection<?> configureInstances(Class<?> target)
configureInstances in interface ServerConfigurationpublic Collection<?> configureNamedInstances(List<?> instances)
configureNamedInstances in interface ServerConfigurationpublic void publishConfiguration(Object target)
publishConfiguration in interface ServerConfigurationpublic Properties getPublishedConfiguration()
public void saveBootstrapState(Object thing)
saveBootstrapState in interface ServerConfigurationpublic Properties getBootstrapState()
public String getProperty(String name)
getProperty in interface ServerPropertiespublic String getProperty(String name, String defaultValue)
getProperty in interface ServerPropertiespublic Integer getIntegerProperty(String name, Integer defaultValue)
getIntegerProperty in interface ServerPropertiespublic Double getDoubleProperty(String name, Double defaultValue)
getDoubleProperty in interface ServerPropertiespublic void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2017 Power TAC. All rights reserved.