Package eu.hobbydev.bracheus.interfaces
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 TypMethodeBeschreibungRetrieves the API key stored in the configuration.getLang()Retrieves the language setting from the configuration.Retrieves the password stored in the configuration.Retrieves the username stored in the configuration.voidSets the API key in the configuration.voidSets the language in the configuration.voidsetPassword(String password) Sets the password in the configuration.voidsetUsername(String username) Sets the username in the configuration.toString()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
Sets the username in the configuration.- Parameter:
username- the username to set.
-
setPassword
Sets the password in the configuration.- Parameter:
password- the password to set.
-
setLang
Sets the language in the configuration.- Parameter:
lang- the language code (e.g., "en", "de") to set.
-
setApiKey
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.
-