Package eu.hobbydev.bracheus.classes
Klasse ConfigurationHolder
java.lang.Object
eu.hobbydev.bracheus.classes.ConfigurationHolder
- Alle implementierten Schnittstellen:
ConfigurationHolder
Represents a configuration holder that stores user credentials and settings.
This class is designed to be serialized/deserialized using Jackson for XML handling.
The fields include the username, password, language preference, and API key, which are
essential for configuring a user's account and application settings.
The class implements the `ConfigurationHolder` interface, ensuring that these fields can
be accessed and modified through getter and setter methods.
Example use case:
- This class can be used to manage user-specific configuration data, such as authentication
credentials, language settings, and API keys. It can be loaded from or saved to an XML
configuration file for persistence across application sessions.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets the API key stored in this configuration.getLang()Gets the language preference stored in this configuration.Gets the password stored in this configuration.Gets the username stored in this configuration.voidSets the API key in this configuration.voidSets the language preference in this configuration.voidsetPassword(String password) Sets the password in this configuration.voidsetUsername(String username) Sets the username in this configuration.toString()Returns a string representation of this configuration.
-
Konstruktordetails
-
ConfigurationHolder
public ConfigurationHolder()
-
-
Methodendetails
-
getUsername
Gets the username stored in this configuration.- Angegeben von:
getUsernamein SchnittstelleConfigurationHolder- Gibt zurück:
- the username
-
getPassword
Gets the password stored in this configuration.- Angegeben von:
getPasswordin SchnittstelleConfigurationHolder- Gibt zurück:
- the password
-
getLang
Gets the language preference stored in this configuration. The language code can be a standard code such as "EN" for English.- Angegeben von:
getLangin SchnittstelleConfigurationHolder- Gibt zurück:
- the language code (e.g., "EN")
-
getApiKey
Gets the API key stored in this configuration.- Angegeben von:
getApiKeyin SchnittstelleConfigurationHolder- Gibt zurück:
- the API key
-
setUsername
Sets the username in this configuration.- Angegeben von:
setUsernamein SchnittstelleConfigurationHolder- Parameter:
username- the username to set
-
setPassword
Sets the password in this configuration.- Angegeben von:
setPasswordin SchnittstelleConfigurationHolder- Parameter:
password- the password to set
-
setLang
Sets the language preference in this configuration.- Angegeben von:
setLangin SchnittstelleConfigurationHolder- Parameter:
lang- the language code to set (e.g., "EN")
-
setApiKey
Sets the API key in this configuration.- Angegeben von:
setApiKeyin SchnittstelleConfigurationHolder- Parameter:
apiKey- the API key to set
-
toString
Returns a string representation of this configuration. This method masks sensitive information (password and API key) for security purposes.- Angegeben von:
toStringin SchnittstelleConfigurationHolder- Setzt außer Kraft:
toStringin KlasseObject- Gibt zurück:
- a string containing all configuration fields, with the password and API key masked
-