
package de.ivu.elect.jee.exchange;

import de.ivu.elect.jee.presentation.Icons;
import de.ivu.elect.jee.presentation.status.OutputSeverity;

public enum ViolationLevel {
  INFO {
    @Override
    public String getIcon(Icons icons) {
      return icons.getIconInfo();
    }

    @Override
    public OutputSeverity getOutputSeverity() {
      return OutputSeverity.INFO;
    }
  },
  WARNING {
    @Override
    public String getIcon(Icons icons) {
      return icons.getIconWarning();
    }

    @Override
    public boolean isWarning() {
      return true;
    }

    @Override
    public OutputSeverity getOutputSeverity() {
      return OutputSeverity.WARN;
    }
  },
  ERROR {
    @Override
    public String getIcon(Icons icons) {
      return icons.getIconCancel();
    }

    @Override
    public boolean isError() {
      return true;
    }

    @Override
    public OutputSeverity getOutputSeverity() {
      return OutputSeverity.ERROR;
    }
  };

  public abstract String getIcon(Icons icons);

  public boolean isError() {
    return false;
  }

  public boolean isWarning() {
    return false;
  }

  public abstract OutputSeverity getOutputSeverity();
}
