Class DataManager

java.lang.Object
yearreview.app.data.DataManager

public class DataManager extends Object
Manages all DataSource by creating them from a given configuration and loading them.
Author:
ColdStone37
  • Field Details

    • sources

      private final Map<String,DataSource> sources
      List of DataSources loaded from the configuration.
    • logger

      private static final Logger logger
  • Constructor Details

    • DataManager

      public DataManager(XmlNode dataConfig)
      Creates a DataManager from a given configuration.
      Parameters:
      dataConfig - configuration
  • Method Details

    • getSourceByTag

      public DataSource getSourceByTag(String tag)
      Gets a DataSource by its tag.
      Parameters:
      tag - tag to search for
      Returns:
      the DataSource or null if no DataSource with that tag exists
    • loadData

      public void loadData()
      Loads the data of all DataSources on multiple Threads.