public abstract class AbstractConfig extends Object implements org.apache.wicket.util.io.IClusterable
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractConfig.IKey<T>
Simple interface to enrich the
Map key with some
functionality like assertion of value type and default value
handling. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConfig()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
all() |
protected <T> String |
getString(AbstractConfig.IKey<T> key)
returns the value as string according to given key.
|
boolean |
isEmpty() |
protected static <T> AbstractConfig.IKey<T> |
newKey(String key,
T defaultValue)
creates a new key.
|
protected <T> AbstractConfig |
put(AbstractConfig.IKey<T> key,
T value)
puts a new config to the configuration map.
|
protected <T> T |
remove(AbstractConfig.IKey<T> key)
removes the given key (and its value) from configuration map.
|
String |
toJsonString() |
protected ConfigModel |
wrap(org.apache.wicket.model.IModel<String> model)
Wraps IModel<String> in ConfigModel to serialize it as
simple String in the produced JSON.
|
public final String toJsonString()
public final boolean isEmpty()
protected final <T> AbstractConfig put(AbstractConfig.IKey<T> key, T value)
AbstractConfig.IKey implementation.key - mandatory parametervalue - mandatory parameterprotected final <T> T remove(AbstractConfig.IKey<T> key)
key - the key to removeprotected final <T> String getString(AbstractConfig.IKey<T> key)
key - The key to read.protected ConfigModel wrap(org.apache.wicket.model.IModel<String> model)
model - The model to wrap.protected static <T> AbstractConfig.IKey<T> newKey(String key, T defaultValue)
key - string representation of this keydefaultValue - The default valueCopyright © 2013 agilecoders.de. All Rights Reserved.