package WEB-INF.classes.wenrgise.common.exception;

import java.io.Serializable;
import java.util.ArrayList;
import wenrgise.common.exception.BaseException;

public class EnrgiseApplicationException extends BaseException implements Serializable {
  private ArrayList oListExceptions;
  
  private ArrayList oArguments;
  
  private String errorType = null;
  
  public EnrgiseApplicationException() {}
  
  public EnrgiseApplicationException(String sMsgKey) {
    super(sMsgKey);
    this.errorType = "E";
  }
  
  public EnrgiseApplicationException(String sMsgKey, String errorType) {
    super(sMsgKey);
    this.errorType = errorType;
  }
  
  public EnrgiseApplicationException(String sMsgKey, ArrayList oArguments) {
    super(sMsgKey);
    this.oArguments = oArguments;
    this.errorType = "E";
  }
  
  public EnrgiseApplicationException(String sMsgKey, ArrayList oArguments, String sErrorType) {
    super(sMsgKey);
    this.oArguments = oArguments;
    this.errorType = sErrorType;
  }
  
  public ArrayList getList() {
    return this.oListExceptions;
  }
  
  public void setList(ArrayList oListExceptions) {
    this.oListExceptions = oListExceptions;
  }
  
  public void addToList(wenrgise.common.exception.EnrgiseApplicationException oAppExcp) {
    if (this.oListExceptions == null)
      this.oListExceptions = new ArrayList(); 
    this.oListExceptions.add(oAppExcp);
  }
  
  public ArrayList getArguments() {
    return this.oArguments;
  }
  
  public void setArguments(ArrayList newOArguments) {
    this.oArguments = newOArguments;
  }
  
  public String getErrorType() {
    return this.errorType;
  }
}
