/*
 * Licensed Materials - Property of Rogue Wave Software, Inc. 
 * © Copyright Rogue Wave Software, Inc. 2014, 2015 
 * © Copyright IBM Corp. 2009, 2014
 * © Copyright ILOG 1996, 2009
 * All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * The Software and Documentation were developed at private expense and
 * are "Commercial Items" as that term is defined at 48 CFR 2.101,
 * consisting of "Commercial Computer Software" and
 * "Commercial Computer Software Documentation", as such terms are
 * used in 48 CFR 12.212 or 48 CFR 227.7202-1 through 227.7202-4,
 * as applicable.
 */

package monitoring.web;

import ilog.cpl.datasource.IlpDefaultDataSource;

/**
 * Abstraction that holds references to all data sources used by the sample. 
 */
public class SampleDataSources {

  /**
   * Datasource that contains all the alarms.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The All Module's table alarm view (filtered to show alarms only)</li>
   * </ol>
   */
  private IlpDefaultDataSource alarmsDataSource;

  /**
   * Datasource that contains the entire network.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The Network Module's network view</li>
   * <li>The Network Module's tree view</li>
   * <li>The All Module's table alarm view (filtered to show alarms only)</li>
   * </ol>
   */
  private IlpDefaultDataSource networkDataSource;

  /**
   * Datasource that contains the hierarchical representation of the available 
   * vendors and the inventory provided by each.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The Inventory Module's tree view</li>
   * </ol>
   */
  private IlpDefaultDataSource inventoryDataSource;

  /**
   * Datasource that contains the network representation of the services provided.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The Service Module's network view</li>
   * </ol>
   */
  private IlpDefaultDataSource servicesNetworkDataSource;

  /**
   * Datasource that contains the hierarchical representation of the services provided.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The Service Module's tree view</li>
   * <li>The Service Module's table view</li>
   * </ol>
   */
  private IlpDefaultDataSource servicesDataSource;

  /**
   * Datasource that contains the network representation details of a given service.
   * <br><br>
   * This datasource is used by:
   * <ol>
   * <li>The Service Module's service detail view</li>
   * </ol>
   */
  private IlpDefaultDataSource serviceDataSource;

  //////////////////////////////////////////////////////////////////////////////
  //Initialization
  //////////////////////////////////////////////////////////////////////////////

  /**
   * Note that the data sources are not initialized here as the are configured at 
   * the <code>AbstractSampleContext</code> level as the datasource is integrated 
   * with the backend system. 
   */
  public void initialize() {
  }

  //////////////////////////////////////////////////////////////////////////////
  //Accessors and Modifiers
  //////////////////////////////////////////////////////////////////////////////

  public IlpDefaultDataSource getNetworkDataSource() {
    return networkDataSource;
  }
  public void setNetworkDataSource(IlpDefaultDataSource networkDataSource) {
    this.networkDataSource = networkDataSource;
  }
  public IlpDefaultDataSource getServicesDataSource() {
    return servicesDataSource;
  }
  public void setServicesDataSource(IlpDefaultDataSource serviceDataSource) {
    this.servicesDataSource = serviceDataSource;
  }
  public IlpDefaultDataSource getInventoryDataSource() {
    return inventoryDataSource;
  }
  public void setInventoryDataSource(IlpDefaultDataSource inventoryDataSource) {
    this.inventoryDataSource = inventoryDataSource;
  }
  public IlpDefaultDataSource getServiceDataSource() {
    return serviceDataSource;
  }
  public void setServiceDataSource(IlpDefaultDataSource serviceDataSource) {
    this.serviceDataSource = serviceDataSource;
  }
  public IlpDefaultDataSource getServicesNetworkDataSource() {
    return servicesNetworkDataSource;
  }
  public void setServicesNetworkDataSource(
      IlpDefaultDataSource servicesNetworkDataSource) {
    this.servicesNetworkDataSource = servicesNetworkDataSource;
  }
  public IlpDefaultDataSource getAlarmsDataSource() {
    return alarmsDataSource;
  }
  public void setAlarmsDataSource(IlpDefaultDataSource alarmsDataSource) {
    this.alarmsDataSource = alarmsDataSource;
  }
}