Class BrokerPropertiesService

java.lang.Object
org.powertac.samplebroker.core.BrokerPropertiesService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service
public class BrokerPropertiesService
extends Object
implements org.springframework.context.ApplicationContextAware
Supports annotation-based configuration of broker components from properties or xml config files.
Author:
John Collins
  • Constructor Details

  • Method Details

    • setUserConfig

      public void setUserConfig​(File userConfig)
    • addProperties

      public void addProperties​(Properties props)
      Adds the Properties structure to the broker configuration. Earlier configuration sources take precedence over later sources.
    • addProperties

      public void addProperties​(org.apache.commons.configuration2.PropertiesConfiguration props)
      Adds the PropertiesConfiguration to the broker configuration. Earlier configuration sources take precedence over later sources.
    • configureMe

      public void configureMe​(Object target)
    • configureInstances

      public Collection<?> configureInstances​(Class<?> target)
    • getProperty

      public String getProperty​(String name)
    • getProperty

      public String getProperty​(String name, String defaultValue)
    • getIntegerProperty

      public Integer getIntegerProperty​(String name, Integer defaultValue)
    • getDoubleProperty

      public Double getDoubleProperty​(String name, Double defaultValue)
    • setApplicationContext

      public void setApplicationContext​(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setProperty

      public void setProperty​(String key, Object value)
      Changes the value of a property (or adds a property).