/*
 * Licensed Materials - Property of Perforce Software, Inc. 
 * © Copyright Perforce Software, Inc. 2014, 2021 
 * © 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 service;

/**
 * 
 * A java bean that represents service data (node), to be used in the SDM model.
 * 
 * @since JViews 8.1
 */
public class ServiceNode {

  // data for service node are properties
  //// id is read only
  private String id = null;

  //// properties
  private String name;
  private String nodeType;
  private boolean acknowledged;
  private boolean alarm;
  private int disk;
  private int memory;
  private String status = "ok";

  //// interaction
  private String message = "Message...";
  private String push; // changed when object is clicked
  private String pushInfo; // changed when status box is clicked

  // constructor

  /**
   * Default constructor, unused
   */
  public ServiceNode() {
  }

  /**
   * Constructs a ServiceNode
   * 
   * @param id
   *          ID of this node
   */
  public ServiceNode(String id) {
    this.id = id;
  }

  /**
   * Constructor for ServiceNode
   */
  public ServiceNode(String id, boolean ack, boolean alarm, int disk, int memory, String name, String nodeType,
      String status) {
    this(id);
    setAcknowledged(ack);
    setAlarm(alarm);
    setDisk(disk);
    setMemory(memory);
    setName(name);
    setNodeType(nodeType);
    setStatus(status);

  }

  // property setters and getters

  /**
   * Returns the acknowledged.
   * 
   * @return the acknowledged.
   */
  public boolean isAcknowledged() {
    return acknowledged;
  }

  /**
   * Sets the acknowledged to set.
   * 
   * @param acknowledged
   *          The acknowledged to set
   */
  public void setAcknowledged(boolean acknowledged) {
    this.acknowledged = acknowledged;
  }

  /**
   * Returns the alarm.
   * 
   * @return the alarm.
   */
  public boolean isAlarm() {
    return alarm;
  }

  /**
   * Sets the alarm to set.
   * 
   * @param alarm
   *          The alarm to set
   */
  public void setAlarm(boolean alarm) {
    this.alarm = alarm;
  }

  /**
   * Returns the disk.
   * 
   * @return the disk.
   */
  public int getDisk() {
    return disk;
  }

  /**
   * Sets the disk to set.
   * 
   * @param disk
   *          The disk to set
   */
  public void setDisk(int disk) {
    this.disk = disk;
  }

  /**
   * Returns the memory.
   * 
   * @return the memory.
   */
  public int getMemory() {
    return memory;
  }

  /**
   * Sets the memory to set.
   * 
   * @param memory
   *          The memory to set
   */
  public void setMemory(int memory) {
    this.memory = memory;
  }

  /**
   * Returns the message.
   * 
   * @return the message.
   */
  public String getMessage() {
    return message;
  }

  /**
   * Sets the message to set.
   * 
   * @param message
   *          The message to set
   */
  public void setMessage(String message) {
    this.message = message;
  }

  /**
   * Returns the name.
   * 
   * @return the name.
   */
  public String getName() {
    return name;
  }

  /**
   * Sets the name to set.
   * 
   * @param name
   *          The name to set
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * Returns the nodeType.
   * 
   * @return the nodeType.
   */
  public String getNodeType() {
    return nodeType;
  }

  /**
   * Sets the nodeType to set.
   * 
   * @param nodeType
   *          The nodeType to set
   */
  public void setNodeType(String nodeType) {
    this.nodeType = nodeType;
  }

  /**
   * Returns the push.
   * 
   * @return the push.
   */
  public String getPush() {
    return push;
  }

  /**
   * Sets the push to set.
   * 
   * @param push
   *          The push to set
   */
  public void setPush(String push) {
    this.push = push;
  }

  /**
   * Returns the pushInteraction.
   * 
   * @return the pushInteraction.
   */
  public String getPushInfo() {
    return pushInfo;
  }

  /**
   * Sets the pushInteraction to set.
   * 
   * @param pushInfo
   *          The pushInteraction to set
   */
  public void setPushInfo(String pushInfo) {
    this.pushInfo = pushInfo;
  }

  /**
   * Returns the status.
   * 
   * @return the status.
   */
  public String getStatus() {
    return status;
  }

  /**
   * Sets the status to set.
   * 
   * @param status
   *          The status to set
   */
  public void setStatus(String status) {
    this.status = status;
  }

  /**
   * Returns the id.
   * 
   * @return the id.
   */
  public String getId() {
    return id;
  }

}