Class ConfigurationBackupService

java.lang.Object
org.eblocker.server.http.service.ConfigurationBackupService

public class ConfigurationBackupService extends Object
This service exports/imports configuration to/from a JAR file.

The configuration version is written to the JAR's manifest file.

  • Constructor Details

  • Method Details

    • exportConfiguration

      public void exportConfiguration(OutputStream outputStream, String password) throws IOException
      Exports the configuration to the given OutputStream. The user can provide a password in order to export private keys.
      Parameters:
      outputStream -
      password -
      Throws:
      IOException
    • requiresPassword

      public boolean requiresPassword(InputStream inputStream) throws IOException
      Reads the manifest from the given InputStream and returns whether a password is required to read the contained private keys
      Parameters:
      inputStream -
      Returns:
      Throws:
      IOException
    • verifyConfiguration

      public ConfigBackupImportResult verifyConfiguration(InputStream inputStream, String password) throws IOException
      Verifies the configuration from the given InputStream. If the user has provided a password, private keys are verified.
      Parameters:
      inputStream -
      password -
      Throws:
      IOException
    • importConfiguration

      public ConfigBackupImportResult importConfiguration(InputStream inputStream, String password) throws IOException
      Imports the configuration from the given InputStream. If the user has provided a password, private keys are imported.
      Parameters:
      inputStream -
      password -
      Throws:
      IOException