/*
 * 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 monitoring.web.controls.EquipmentControls;
import monitoring.web.controls.NetworkControls;
import monitoring.web.controls.SharedControls;
import monitoring.web.controls.TableControls;
import monitoring.web.controls.TreeControls;

/**
 * Abstraction that holds references to all controls used by the sample. 
 */
public class SampleControls {

  //Controls
  private NetworkControls networkControls;
  private EquipmentControls equipmentControls;
  private TableControls tableControls;
  private TreeControls treeControls;
  private SharedControls sharedControls;

  /**
   * Creates all the controls. 
   */
  public SampleControls() {
    networkControls = new NetworkControls();
    equipmentControls = new EquipmentControls();
    treeControls = new TreeControls();
    sharedControls = new SharedControls();
    tableControls = new TableControls();
  }

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

  /**
   * Initializes all the controls.
   */
  public void initialize(AbstractSampleContext sampleContext) {
    networkControls.initialize(sampleContext);
    equipmentControls.initialize(sampleContext);
    treeControls.initialize();
    sharedControls.initialize();
    tableControls.initialize();
  }

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

  public EquipmentControls getEquipmentControls() {
    return equipmentControls;
  }
  public void setEquipmentControls(EquipmentControls equipmentControls) {
    this.equipmentControls = equipmentControls;
  }
  public NetworkControls getNetworkControls() {
    return networkControls;
  }
  public void setNetworkControls(NetworkControls networkControls) {
    this.networkControls = networkControls;
  }
  public TableControls getTableControls() {
    return tableControls;
  }
  public void setTableControls(TableControls tableControls) {
    this.tableControls = tableControls;
  }
  public TreeControls getTreeControls() {
    return treeControls;
  }
  public void setTreeControls(TreeControls treeControls) {
    this.treeControls = treeControls;
  }
  public SharedControls getSharedControls() {
    return sharedControls;
  }
  public void setSharedControls(SharedControls sharedControls) {
    this.sharedControls = sharedControls;
  }
}