Class AbstractPluginDecorator
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- org.hippoecm.frontend.model.map.AbstractValueMap
-
- org.hippoecm.frontend.plugin.config.impl.AbstractPluginDecorator
-
- 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:
AbstractClusterDecorator
,InheritingPluginConfig
public abstract class AbstractPluginDecorator extends AbstractValueMap implements IPluginConfig, org.apache.wicket.model.IDetachable
- See Also:
- Serialized Form
-
-
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
Fields Modifier and Type Field Description protected IObservationContext<IPluginConfig>
obContext
protected IPluginConfig
upstream
-
Constructor Summary
Constructors Constructor Description AbstractPluginDecorator(IPluginConfig upstream)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(Object key)
protected abstract Object
decorate(Object object)
void
detach()
Set<Map.Entry<String,Object>>
entrySet()
boolean
equals(Object o)
Equivalence of observables; observation will only be started on one instance.Object
get(Object key)
double
getDouble(String key)
double
getDouble(String key, double defaultValue)
Duration
getDuration(String key)
Instant
getInstant(String key)
String
getName()
The name of the configuration.protected IObservationContext<? extends IPluginConfig>
getObservationContext()
IPluginConfig
getPluginConfig(Object key)
Retrieve a child config of a particular name.Set<IPluginConfig>
getPluginConfigSet()
Retrieve a set of child plugin configurations.int
hashCode()
boolean
isImmutable()
org.apache.wicket.util.value.IValueMap
makeImmutable()
void
setObservationContext(IObservationContext<? extends IObservable> context)
Before observation is started on the observable, an observation context is injected by the observer registry.void
startObservation()
When the firstIObserver
of this observable is registered with the observer registry, observation is started.void
stopObservation()
When the lastIObserver
unregisters, observation is stopped.String
toString()
Generates aString
representation of this object.protected Object
wrap(Object obj)
protected IPluginConfig
wrapConfig(IPluginConfig config)
-
Methods inherited from class org.hippoecm.frontend.model.map.AbstractValueMap
add, clear, getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsDuration, getAsDuration, getAsEnum, getAsEnum, getAsEnum, getAsInstant, getAsInteger, getAsInteger, getAsLong, getAsLong, getAsTime, getBoolean, getCharSequence, getInt, getInt, getKey, getLong, getLong, getString, getString, getStringArray, getStringValue, putAll, remove
-
Methods inherited from class java.util.AbstractMap
clone, containsValue, isEmpty, keySet, put, 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, getBoolean, getCharSequence, getInt, getInt, getKey, getLong, getLong, getString, getString, getStringArray, getStringValue
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
upstream
protected IPluginConfig upstream
-
obContext
protected IObservationContext<IPluginConfig> obContext
-
-
Constructor Detail
-
AbstractPluginDecorator
public AbstractPluginDecorator(IPluginConfig upstream)
-
-
Method Detail
-
getName
public String 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
-
getPluginConfig
public IPluginConfig getPluginConfig(Object key)
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
public Set<IPluginConfig> getPluginConfigSet()
Description copied from interface:IPluginConfig
Retrieve a set of child plugin configurations.- Specified by:
getPluginConfigSet
in interfaceIPluginConfig
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,Object>
- Overrides:
containsKey
in classAbstractMap<String,Object>
-
toString
public String 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"
.
-
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
-
wrapConfig
protected IPluginConfig wrapConfig(IPluginConfig config)
-
equals
public boolean equals(Object o)
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:
IObservable.equals(Object)
-
setObservationContext
public void setObservationContext(IObservationContext<? extends IObservable> context)
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
protected IObservationContext<? extends IPluginConfig> 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
-
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)
-
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)
-
-