class AccountLocalConfigPermissioningController implements TransactionPermissioningProvider {

  public AllowlistOperationResult addAccounts(final List<String> accounts) {
    final List<String> normalizedAccounts = normalizeAccounts(accounts);
    final AllowlistOperationResult inputValidationResult = inputValidation(normalizedAccounts);
    if (inputValidationResult != AllowlistOperationResult.SUCCESS) {
      return inputValidationResult;
    }

    boolean inputHasExistingAccount =
        normalizedAccounts.stream().anyMatch(accountAllowlist::contains);
    if (inputHasExistingAccount) {
      return AllowlistOperationResult.ERROR_EXISTING_ENTRY;
    }

    final List<String> oldAllowlist = new ArrayList<>(this.accountAllowlist);
    this.accountAllowlist.addAll(normalizedAccounts);
    try {
      verifyConfigurationFileState(oldAllowlist);
      updateConfigurationFile(accountAllowlist);
      verifyConfigurationFileState(accountAllowlist);
    } catch (IOException e) {
      revertState(oldAllowlist);
      return AllowlistOperationResult.ERROR_ALLOWLIST_PERSIST_FAIL;
    } catch (AllowlistFileSyncException e) {
      return AllowlistOperationResult.ERROR_ALLOWLIST_FILE_SYNC;
    }
    return AllowlistOperationResult.SUCCESS;
  }

  public  AccountLocalConfigPermissioningController(
      final LocalPermissioningConfiguration configuration, final MetricsSystem metricsSystem);
  public  AccountLocalConfigPermissioningController(
      final LocalPermissioningConfiguration configuration,
      final AllowlistPersistor allowlistPersistor,
      final MetricsSystem metricsSystem);

}