Schnittstelle ConfigurationHolder

Alle bekannten Implementierungsklassen:
ConfigurationHolder

public interface ConfigurationHolder
The `ConfigurationHolder` interface is designed to provide a contract for holding and managing configuration data related to an application. It defines methods for retrieving and setting configuration values such as the username, password, language, and API key. Implementations of this interface are expected to provide access to these settings, enabling their use across the application. The interface includes getter and setter methods for each configuration item, ensuring that the values can be easily accessed and updated. The `toString` method allows for a textual representation of the configuration information. Implementing classes should provide the actual functionality for retrieving and storing the configuration data, either from a file, a database, or some other source.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    Retrieves the API key stored in the configuration.
    Retrieves the language setting from the configuration.
    Retrieves the password stored in the configuration.
    Retrieves the username stored in the configuration.
    void
    setApiKey(String apiKey)
    Sets the API key in the configuration.
    void
    Sets the language in the configuration.
    void
    setPassword(String password)
    Sets the password in the configuration.
    void
    setUsername(String username)
    Sets the username in the configuration.
    Returns a string representation of the configuration object, typically containing the current settings such as the username, password, language, and API key.
  • Methodendetails

    • getUsername

      String getUsername()
      Retrieves the username stored in the configuration.
      Gibt zurück:
      the username.
    • getPassword

      String getPassword()
      Retrieves the password stored in the configuration.
      Gibt zurück:
      the password.
    • getLang

      String getLang()
      Retrieves the language setting from the configuration.
      Gibt zurück:
      the language code (e.g., "en", "de").
    • getApiKey

      String getApiKey()
      Retrieves the API key stored in the configuration.
      Gibt zurück:
      the API key.
    • setUsername

      void setUsername(String username)
      Sets the username in the configuration.
      Parameter:
      username - the username to set.
    • setPassword

      void setPassword(String password)
      Sets the password in the configuration.
      Parameter:
      password - the password to set.
    • setLang

      void setLang(String lang)
      Sets the language in the configuration.
      Parameter:
      lang - the language code (e.g., "en", "de") to set.
    • setApiKey

      void setApiKey(String apiKey)
      Sets the API key in the configuration.
      Parameter:
      apiKey - the API key to set.
    • toString

      String toString()
      Returns a string representation of the configuration object, typically containing the current settings such as the username, password, language, and API key. The specific format is implementation-dependent.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a string representation of the configuration.