All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.bjoernpetersen.jmusicbot.config.ConfigStorageAdapter Maven / Gradle / Ivy

There is a newer version: 0.25.0
Show newest version
package com.github.bjoernpetersen.jmusicbot.config;

import java.util.Map;
import javax.annotation.Nonnull;

/**
 * An adapter for loading and storing config entries and secrets.
 */
public interface ConfigStorageAdapter {

  @Nonnull
  Map loadPlaintext();

  /**
   * 

Persistently stores config entries. These can be stored in plaintext.

* *

This method is likely to be called often, so it should be fast and should not need user * interaction.

* * @param plain a map of config entries */ void storePlaintext(@Nonnull Map plain); @Nonnull Map loadSecrets(); /** *

Stores the secrets in a secure manner.

* *

This method is likely to be called often, so it should be fast and should not need user * interaction.

* * @param secrets a map of config entries with secret values */ void storeSecrets(@Nonnull Map secrets); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy