- All Implemented Interfaces and Traits:
- MetaClassExtensionProvider
@org.osgi.service.component.annotations.Component(service = MetaClassExtensionProvider, immediate = true)
@Slf4j("LOG")
class DefaultMetaClassExtensionProvider
extends Object
This default metaclass provider adds additional methods to all instances of the classes outlined below.
com.day.cq.wcm.api.Page
- iterator() - Allows usage of Groovy closure operators (
each
,
eachWithIndex
) to iterate over child pages of the current page.
- recurse(Closure closure) - Recursively invoke this closure on each descendant page of the current page.
- getNode() - Get the
jcr:content
node of the current page, returning null if it does not exist
.
- get(String propertyName) - Get the named property value from the
jcr:content
node of the
current page, with the return type determined dynamically by Property.getType()
.
- set(String propertyName, Object value) - Set the named property value on the
jcr:content
node
of the current page. An array value argument can be used to set multi-valued properties.
javax.jcr.Node
- iterator() - Allows usage of Groovy closure operators (
each
,
eachWithIndex
) to iterate over child nodes of the current node.
- get(String propertyName) - Get the named property value, with the return type determined dynamically by Property.getType().
- set(String propertyName, Object value) - Set the named property value. An array value argument can be
used to set multi-valued properties.
- set(Map properties) - Set properties using the key/value pairs in the map as the property names/values.
- getOrAddNode(String name) - Get the named child node if it exists; otherwise, add it.
- getOrAddNode(String name, String primaryNodeTypeName) - Get the named child node if it exists; otherwise,
add it with the given node type.
- removeNode(String name) - Remove the child node with the given name,
returning true if the node was removed.
- recurse(Closure closure) - Recursively invoke this closure on each descendant node of the current node.
- recurse(String primaryNodeTypeName, Closure closure) - Recursively invoke this closure on each descendant
node of the current node that matches the given node type.
- recurse(Collection<String> primaryNodeTypeNames, Closure closure) - Recursively invoke this closure
on each descendant node of the current node that matches any of the given node types.
javax.jcr.Binary
- withBinary(Closure closure) - Execute the closure and automatically dispose of the binary's resources when
the closure completes. The closure accepts a single argument with the current binary instance.
javax.servlet.ServletRequest
- getAt(String name) - Supports use of the subscript operator to get a request parameter value. If the
value is an array, a list will be returned.