Package de.hybris.platform.util.config
Class AbstractConfig
- java.lang.Object
-
- de.hybris.platform.util.config.AbstractConfig
-
- All Implemented Interfaces:
ConfigIntf
- Direct Known Subclasses:
FallbackConfig
,FastHashMapConfig
,HybrisConfig
public abstract class AbstractConfig extends java.lang.Object implements ConfigIntf
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.util.config.ConfigIntf
ConfigIntf.ConfigChangeListener
-
-
Constructor Summary
Constructors Constructor Description AbstractConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clears internal cache.boolean
getBoolean(java.lang.String key, boolean def)
char
getChar(java.lang.String key, char def)
double
getDouble(java.lang.String key, double def)
int
getInt(java.lang.String key, int def)
long
getLong(java.lang.String key, long def)
java.util.Map<java.lang.String,java.lang.String>
getParametersMatching(java.lang.String keyRegExp)
java.lang.String
getString(java.lang.String key, java.lang.String def)
protected void
notifyListeners(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)
void
registerConfigChangeListener(ConfigIntf.ConfigChangeListener listener)
void
unregisterConfigChangeListener(ConfigIntf.ConfigChangeListener listener)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.util.config.ConfigIntf
getAllParameters, getParameter, getParametersMatching, removeParameter, setParameter
-
-
-
-
Method Detail
-
clearCache
public void clearCache()
Description copied from interface:ConfigIntf
Clears internal cache. No need to call it. Method purely to use within tests.- Specified by:
clearCache
in interfaceConfigIntf
-
registerConfigChangeListener
public void registerConfigChangeListener(ConfigIntf.ConfigChangeListener listener)
- Specified by:
registerConfigChangeListener
in interfaceConfigIntf
-
unregisterConfigChangeListener
public void unregisterConfigChangeListener(ConfigIntf.ConfigChangeListener listener)
- Specified by:
unregisterConfigChangeListener
in interfaceConfigIntf
-
notifyListeners
protected void notifyListeners(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)
-
getParametersMatching
public final java.util.Map<java.lang.String,java.lang.String> getParametersMatching(java.lang.String keyRegExp)
- Specified by:
getParametersMatching
in interfaceConfigIntf
-
getBoolean
public boolean getBoolean(java.lang.String key, boolean def)
- Specified by:
getBoolean
in interfaceConfigIntf
-
getInt
public int getInt(java.lang.String key, int def) throws java.lang.NumberFormatException
- Specified by:
getInt
in interfaceConfigIntf
- Throws:
java.lang.NumberFormatException
-
getLong
public long getLong(java.lang.String key, long def) throws java.lang.NumberFormatException
- Specified by:
getLong
in interfaceConfigIntf
- Throws:
java.lang.NumberFormatException
-
getDouble
public double getDouble(java.lang.String key, double def) throws java.lang.NumberFormatException
- Specified by:
getDouble
in interfaceConfigIntf
- Throws:
java.lang.NumberFormatException
-
getString
public java.lang.String getString(java.lang.String key, java.lang.String def)
- Specified by:
getString
in interfaceConfigIntf
-
getChar
public char getChar(java.lang.String key, char def) throws java.lang.IndexOutOfBoundsException
- Specified by:
getChar
in interfaceConfigIntf
- Throws:
java.lang.IndexOutOfBoundsException
-
-