package com.oguerreiro.resilient.error;

public class ImporterOrganizationNotAccessibleException extends ResilientException {
  private static final String CODE = "E015";

  public ImporterOrganizationNotAccessibleException(String sheetName, int row, String variableCode,
      String inputOrganizationCode, String importerOrganizationCode) {
    super("Sheet [" + sheetName + "]; Row [" + row + "]; Variable [" + variableCode + "]; Input Org. Code ["
        + inputOrganizationCode + "]; Importer Org. Code [" + importerOrganizationCode
        + "]. Input Organization must be a children of the Importer Organization.");

    addMessageArg(sheetName);
    addMessageArg(row);
    addMessageArg(variableCode);
    addMessageArg(inputOrganizationCode);
    addMessageArg(importerOrganizationCode);
  }

  @Override
  public String getMessageCode() {
    return CODE;
  }

}