class LegacyKeyStoreUpgradeService extends ComponentSupport {

  public void deleteKeyStoreFiles() {
    log.debug("Deleting legacy trust store from {}", keyStoreBasedir);
    try {
      for (String filename : Arrays.asList(TRUSTED_KEYS_FILENAME, PRIVATE_KEYS_FILENAME)) {
        Files.deleteIfExists(keyStoreBasedir.resolve(filename));
      }
      Files.deleteIfExists(keyStoreBasedir);
    }
    catch (IOException e) { // NOSONAR
      log.warn("Could not delete obsolete trust store from {}. Error: {}", keyStoreBasedir, e.toString());
    }
  }

  @Inject public  LegacyKeyStoreUpgradeService(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                      final ApplicationDirectories appDirectories);

}