Class PropertiesSecretManager
java.lang.Object
org.deltava.util.system.PropertiesSecretManager
- All Implemented Interfaces:
SecretManager
A secrets manager that uses properties files.
- Since:
- 10.5
- Version:
- 10.5
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PropertiesSecretManager
Creates the Secret Manager.- Parameters:
srcFile
- the source property file name
-
-
Method Details
-
getKeys
Description copied from interface:SecretManager
Returns the names of all the secrets.- Specified by:
getKeys
in interfaceSecretManager
- Returns:
- a Collection of secret names
-
get
Description copied from interface:SecretManager
Retrieves a secret.- Specified by:
get
in interfaceSecretManager
- Parameters:
name
- the secret name- Returns:
- the secret value, or null if not found
-
size
public int size()Description copied from interface:SecretManager
Returns the number of loaded secrets.- Specified by:
size
in interfaceSecretManager
- Returns:
- the number of secrets
-
load
Description copied from interface:SecretManager
Optional initialization method- Specified by:
load
in interfaceSecretManager
- Throws:
IOException
- if an erorr occurs
-