- All Implemented Interfaces and Traits:
- MetaClassExtensionProvider
@org.osgi.service.component.annotations.Component(service: MetaClassExtensionProvider, immediate: true)
@Slf4j(value: LOG)
class JcrMetaClassExtensionProvider
extends Object
implements MetaClassExtensionProvider
This metaclass provider adds additional methods to all instances of the classes outlined below.
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.