- java.lang.Object
-
- com.appslandia.common.base.MapWrapper<String,String>
-
- com.appslandia.common.base.ConfigMap
-
- com.appslandia.common.base.PropertyConfig
-
- com.appslandia.common.crypto.SecureConfig
-
- All Implemented Interfaces:
Config,Serializable,Map<String,String>
public class SecureConfig extends PropertyConfig
- Author:
- Loc Ha
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.appslandia.common.base.MapWrapper
map
-
-
Constructor Summary
Constructors Constructor Description SecureConfig(char[] password)SecureConfig(Encryptor encryptor)SecureConfig(TextEncryptor textEncryptor)SecureConfig(String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecureConfigenc(String key, boolean value)SecureConfigenc(String key, double value)SecureConfigenc(String key, float value)SecureConfigenc(String key, int value)SecureConfigenc(String key, long value)SecureConfigenc(String key, String value)StringgetString(String key)SecureConfigload(File file)SecureConfigload(InputStream is)SecureConfigload(Reader r)SecureConfigload(String file)SecureConfigset(String key, boolean value)SecureConfigset(String key, double value)SecureConfigset(String key, int value)SecureConfigset(String key, long value)SecureConfigset(String key, String value)-
Methods inherited from class com.appslandia.common.base.PropertyConfig
fromProperties, store, store, store, store, toProperties, toString
-
Methods inherited from class com.appslandia.common.base.MapWrapper
clear, containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.appslandia.common.base.Config
getBool, getDouble, getFormatted, getFormatted, getFormatted, getInt, getLong, getRequiredBool, getRequiredDouble, getRequiredFormatted, getRequiredFormatted, getRequiredFormatted, getRequiredInt, getRequiredLong, getRequiredString, getString, getStringArray
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
SecureConfig
public SecureConfig(char[] password)
-
SecureConfig
public SecureConfig(String password)
-
SecureConfig
public SecureConfig(Encryptor encryptor)
-
SecureConfig
public SecureConfig(TextEncryptor textEncryptor)
-
-
Method Detail
-
load
public SecureConfig load(InputStream is) throws IOException
- Overrides:
loadin classPropertyConfig- Throws:
IOException
-
load
public SecureConfig load(Reader r) throws IOException
- Overrides:
loadin classPropertyConfig- Throws:
IOException
-
load
public SecureConfig load(File file) throws IOException
- Overrides:
loadin classPropertyConfig- Throws:
IOException
-
load
public SecureConfig load(String file) throws IOException
- Overrides:
loadin classPropertyConfig- Throws:
IOException
-
set
public SecureConfig set(String key, String value)
- Overrides:
setin classPropertyConfig
-
set
public SecureConfig set(String key, boolean value)
- Overrides:
setin classPropertyConfig
-
set
public SecureConfig set(String key, int value)
- Overrides:
setin classPropertyConfig
-
set
public SecureConfig set(String key, long value)
- Overrides:
setin classPropertyConfig
-
set
public SecureConfig set(String key, double value)
- Overrides:
setin classPropertyConfig
-
enc
public SecureConfig enc(String key, String value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureConfig enc(String key, boolean value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureConfig enc(String key, int value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureConfig enc(String key, long value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureConfig enc(String key, float value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureConfig enc(String key, double value) throws CryptoException
- Throws:
CryptoException
-
-