@Service public class ServerPropertiesService extends Object implements org.powertac.common.interfaces.ServerProperties, org.powertac.common.interfaces.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.configuration.ConfigurationException, IOException
org.apache.commons.configuration.ConfigurationExceptionIOExceptionpublic void addProperties(Properties props)
public void configureMe(Object target)
configureMe in interface org.powertac.common.interfaces.ServerConfigurationpublic Collection<?> configureInstances(Class<?> target)
configureInstances in interface org.powertac.common.interfaces.ServerConfigurationpublic Collection<?> configureNamedInstances(List<?> instances)
configureNamedInstances in interface org.powertac.common.interfaces.ServerConfigurationpublic void publishConfiguration(Object target)
publishConfiguration in interface org.powertac.common.interfaces.ServerConfigurationpublic Properties getPublishedConfiguration()
public void saveBootstrapState(Object thing)
saveBootstrapState in interface org.powertac.common.interfaces.ServerConfigurationpublic Properties getBootstrapState()
public String getProperty(String name)
getProperty in interface org.powertac.common.interfaces.ServerPropertiespublic String getProperty(String name, String defaultValue)
getProperty in interface org.powertac.common.interfaces.ServerPropertiespublic Integer getIntegerProperty(String name, Integer defaultValue)
getIntegerProperty in interface org.powertac.common.interfaces.ServerPropertiespublic Double getDoubleProperty(String name, Double defaultValue)
getDoubleProperty in interface org.powertac.common.interfaces.ServerPropertiespublic void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2016 Power TAC. All Rights Reserved.