package de.ivu.elect.business.dokumente.control;

public class ExceptionCollectorProgressMonitor implements ProgressMonitor {

  private String messageKey;

  private Exception exception;

  @Override
  public void progress(Enum<?> progress) {

  }

  @Override
  public void progress(Enum<?> progress, int count, int size) {

  }

  @Override
  public void progress(Enum<?> progress, String message) {

  }

  @Override
  public void progress(Enum<?> progress, int count, int size, Object... params) {

  }

  @Override
  public boolean isCanceled() {
    return exception != null;
  }

  @Override
  public void addError(String messageKey, Exception e) {
    this.messageKey = messageKey;
    this.exception = e;
  }

  public String getMessageKey() {
    return messageKey;
  }

  public Exception getException() {
    return exception;
  }
}
