public abstract class Ops extends Object
Constructor and Description |
---|
Ops() |
Modifier and Type | Method and Description |
---|---|
static NodeOperation |
addNode(String name) |
static NodeOperation |
addNode(String name,
String type) |
static NodeOperation |
addProperty(String name,
Object newValue)
Adds property.
|
static NodeOperation |
addProperty(String name,
String newValue)
Deprecated.
since 5.5.6 - kept for runtime compatibility. If a class was compiled against this method previously,
removal of it would cause a
NoSuchMethodError during runtime. |
static NodeOperation |
getNode(String name) |
static NodeOperation |
getOrAddNode(String name,
String nodeType)
Gets or adds node depending on whether it existed or not.
|
static NodeOperation |
ifTrue(boolean bool)
Executes all then() defined ops only when passed in flag is evaluated true, behaves as noop otherwise.
|
static NodeOperation |
moveNode(String nodeName,
String dest)
Moves a node, using session-scoped operation.
|
static NodeOperation |
noop()
No operation; can be useful in ternary expression, for instance.
|
static NodeOperation |
onChildNodes()
Executes then() ops on all child nodes.
|
static NodeOperation |
onChildNodes(AbstractPredicate<javax.jcr.Node> predicate)
Executes then() ops on all child nodes that are evaluated true by the predicate.
|
static NodeOperation |
renameNode(String currentName,
String newName)
Renames a node.
|
static NodeOperation |
renameProperty(String name,
String newName)
Renames a property by creating a new one and copying the value.
|
static NodeOperation |
setProperty(String name,
Object newValue)
Sets the value of an existing property, ignoring its current value.
|
public static NodeOperation addNode(String name)
public static NodeOperation addNode(String name, String type)
public static NodeOperation getNode(String name)
public static NodeOperation addProperty(String name, Object newValue)
@Deprecated public static NodeOperation addProperty(String name, String newValue)
NoSuchMethodError
during runtime.public static NodeOperation setProperty(String name, Object newValue)
javax.jcr.ItemNotFoundException
- if the property does not exist.public static NodeOperation renameNode(String currentName, String newName)
public static NodeOperation renameProperty(String name, String newName)
public static NodeOperation moveNode(String nodeName, String dest)
public static NodeOperation noop()
public static final NodeOperation getOrAddNode(String name, String nodeType)
public static final NodeOperation onChildNodes()
public static final NodeOperation onChildNodes(AbstractPredicate<javax.jcr.Node> predicate)
public static final NodeOperation ifTrue(boolean bool)
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.