public abstract class OnDemandPresentationElementDecorator extends PresentationElementDecorator
PresentationElementDecorator
decorating items and areas on demand. The result of the decoration
will be cached to prevent executing the same decoration multiple times.Constructor and Description |
---|
OnDemandPresentationElementDecorator(PresentationElement pWrappedElement) |
Modifier and Type | Method and Description |
---|---|
protected abstract PresentationElement |
decorateArea(PresentationElement pArea)
Decorates one single area.
|
protected abstract List<? extends PresentationElement> |
decorateItem(PresentationElement pElement)
Decorates one single
PresentationElement . |
Map<String,PresentationElement> |
getAreas()
Returns the areas in a
PresentationElement that represents
a group. |
List<PresentationElement> |
getItems()
Returns the summaries in a
PresentationElement that represents
an area. |
List<String> |
getKeys()
Returns the names of the areas in a
PresentationElement that represents
a group. |
getContent, getFields, getLabel, getOptions, getParent, getType, getWrappedElement
public OnDemandPresentationElementDecorator(PresentationElement pWrappedElement)
public Map<String,PresentationElement> getAreas()
PresentationElement
PresentationElement
that represents
a group. If this property has zero length then the PresentationElement
represents an area or a summary, not a group.getAreas
in interface PresentationElement
getAreas
in class PresentationElementDecorator
protected abstract PresentationElement decorateArea(PresentationElement pArea)
pArea
- the area to decoratenull
, the area will not be availablepublic List<PresentationElement> getItems()
PresentationElement
PresentationElement
that represents
an area. If this property has zero length then the PresentationElement
represents a group or a summary, not an area.getItems
in interface PresentationElement
getItems
in class PresentationElementDecorator
protected abstract List<? extends PresentationElement> decorateItem(PresentationElement pElement)
PresentationElement
. The method will be invoked when someone asks for the item. The result
will be cached.
Subclasses might return zero, one or several items. The method should never return null.pElement
- the element to decorateList
of PresentationElement
's. This method can never return null
, but should
instead return an empty List
public List<String> getKeys()
PresentationElement
PresentationElement
that represents
a group. The names are returned in the order they are defined in the
layout-group
resource. If this property has zero length then the
PresentationElement
represents an area or a summary, not a group.getKeys
in interface PresentationElement
getKeys
in class PresentationElementDecorator
© 1998- 2018 Stibo DX