Class JcrPluginConfig
java.lang.Object
java.util.AbstractMap<String,Object>
org.hippoecm.frontend.model.map.AbstractValueMap
org.hippoecm.frontend.plugin.config.impl.JcrPluginConfig
- All Implemented Interfaces:
Serializable
,Map<String,
,Object> org.apache.wicket.model.IDetachable
,org.apache.wicket.util.io.IClusterable
,org.apache.wicket.util.value.IValueMap
,IObservable
,IPluginConfig
- Direct Known Subclasses:
JcrClusterConfig
public class JcrPluginConfig
extends AbstractValueMap
implements IPluginConfig, org.apache.wicket.model.IDetachable
The JCR backed implementation of the plugin configuration. It will try to do type conversion
(i.e. string to boolean and vice versa) and single to multiple (and the reverse).
It allows wrapping, so that subclasses can intercept the retrieval of values to e.g. interpolate these.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
detach()
entrySet()
boolean
Equivalence of observables; observation will only be started on one instance.boolean
getBoolean
(String key) getCharSequence
(String key) double
double
getDuration
(String key) getInstant
(String key) int
int
long
long
getName()
The name of the configuration.protected IObservationContext<? extends IPluginConfig>
getPluginConfig
(Object key) Retrieve a child config of a particular name.Retrieve a set of child plugin configurations.String[]
getStringArray
(String key) org.apache.wicket.util.string.StringValue
getStringValue
(String key) int
hashCode()
boolean
org.apache.wicket.util.value.IValueMap
void
setObservationContext
(IObservationContext<? extends IObservable> context) Before observation is started on the observable, an observation context is injected by the observer registry.void
When the firstIObserver
of this observable is registered with the observer registry, observation is started.void
When the lastIObserver
unregisters, observation is stopped.protected void
sync()
toString()
Generates aString
representation of this object.protected Object
protected IHippoMap
unwrapConfig
(IPluginConfig value) protected Object
protected JcrPluginConfig
wrapConfig
(Node node) Methods inherited from class org.hippoecm.frontend.model.map.AbstractValueMap
add, getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsDuration, getAsDuration, getAsEnum, getAsEnum, getAsEnum, getAsInstant, getAsInteger, getAsInteger, getAsLong, getAsLong, getAsTime, putAll, remove
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, isEmpty, keySet, size, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.wicket.util.value.IValueMap
getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsDuration, getAsDuration, getAsEnum, getAsEnum, getAsEnum, getAsInstant, getAsInteger, getAsInteger, getAsLong, getAsLong, getAsTime
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
nodeModel
-
-
Constructor Details
-
JcrPluginConfig
-
-
Method Details
-
sync
protected void sync() -
getNodeModel
-
getName
Description copied from interface:IPluginConfig
The name of the configuration. When the configuration is passed to a plugin, this name is unique within the system. It can therefore be used to construct unique service names.- Specified by:
getName
in interfaceIPluginConfig
-
getBoolean
public boolean getBoolean(String key) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getBoolean
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getBoolean
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getBoolean(String)
-
getDouble
public double getDouble(String key) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getDouble
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getDouble(String)
-
getDouble
public double getDouble(String key, double defaultValue) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getDouble
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getDouble(String, double)
-
getInt
- Specified by:
getInt
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getInt
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getInt(String)
-
getInt
public int getInt(String key, int defaultValue) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getInt
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getInt
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getInt(String, int)
-
getLong
- Specified by:
getLong
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getLong
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getLong(String)
-
getLong
public long getLong(String key, long defaultValue) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getLong
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getLong
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getLong(String, long)
-
getKey
- Specified by:
getKey
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getKey
in classAbstractValueMap
-
getString
- Specified by:
getString
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getString
in classAbstractValueMap
- See Also:
-
IValueMap.getString(String)
-
getString
- Specified by:
getString
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getString
in classAbstractValueMap
- See Also:
-
IValueMap.getString(String, String)
-
getStringArray
- Specified by:
getStringArray
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getStringArray
in classAbstractValueMap
- See Also:
-
IValueMap.getStringArray(String)
-
getStringValue
- Specified by:
getStringValue
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getStringValue
in classAbstractValueMap
- See Also:
-
IValueMap.getStringValue(String)
-
getPluginConfig
Description copied from interface:IPluginConfig
Retrieve a child config of a particular name. In the JCR implementation, this corresponds to a child node of type frontend:pluginconfig.- Specified by:
getPluginConfig
in interfaceIPluginConfig
-
getPluginConfigSet
Description copied from interface:IPluginConfig
Retrieve a set of child plugin configurations.- Specified by:
getPluginConfigSet
in interfaceIPluginConfig
-
getCharSequence
- Specified by:
getCharSequence
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getCharSequence
in classAbstractValueMap
- See Also:
-
IValueMap.getCharSequence(String)
-
getDuration
public Duration getDuration(String key) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getDuration
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getDuration
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getDuration(String)
-
getInstant
public Instant getInstant(String key) throws org.apache.wicket.util.string.StringValueConversionException - Specified by:
getInstant
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
getInstant
in classAbstractValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
-
IValueMap.getInstant(String)
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutable
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
isImmutable
in classAbstractValueMap
-
makeImmutable
public org.apache.wicket.util.value.IValueMap makeImmutable()- Specified by:
makeImmutable
in interfaceorg.apache.wicket.util.value.IValueMap
- Overrides:
makeImmutable
in classAbstractValueMap
-
detach
public void detach()- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
-
get
-
put
-
clear
public void clear() -
entrySet
-
equals
Description copied from interface:IObservable
Equivalence of observables; observation will only be started on one instance.- Specified by:
equals
in interfaceIObservable
- Specified by:
equals
in interfaceMap<String,
Object> - Overrides:
equals
in classAbstractMap<String,
Object>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceIObservable
- Specified by:
hashCode
in interfaceMap<String,
Object> - Overrides:
hashCode
in classAbstractMap<String,
Object> - See Also:
-
toString
Description copied from class:AbstractValueMap
Generates aString
representation of this object.- Overrides:
toString
in classAbstractValueMap
- Returns:
String
representation of thisValueMap
consistent with the tag-attribute style of markup elements. For example:a="x" b="y" c="z"
.
-
wrapConfig
-
unwrapConfig
-
wrap
-
unwrap
-
setObservationContext
Description copied from interface:IObservable
Before observation is started on the observable, an observation context is injected by the observer registry. This context can be used to notify listeners.- Specified by:
setObservationContext
in interfaceIObservable
-
getObservationContext
-
startObservation
public void startObservation()Description copied from interface:IObservable
When the firstIObserver
of this observable is registered with the observer registry, observation is started. Implementations must notify observers until observation is stopped.An implementation should register listeners with external data sources, when appropriate. It is possible for an observable to register as an observer for another observable.
- Specified by:
startObservation
in interfaceIObservable
-
stopObservation
public void stopObservation()Description copied from interface:IObservable
When the lastIObserver
unregisters, observation is stopped. Any listeners or observers registered by the observable must be unregistered by the implementation.- Specified by:
stopObservation
in interfaceIObservable
-