public abstract class SessionItemOperation<T> extends Object implements SessionOperation<T>
| Modifier and Type | Method and Description |
|---|---|
static SessionItemOperation<ItemImpl> |
getItem(String path)
Creates a session operation for getting the item at the given path.
|
static SessionItemOperation<NodeImpl> |
getNode(String path)
Creates a session operation for getting the node at the given path.
|
static SessionItemOperation<PropertyImpl> |
getProperty(String path)
Creates a session operation for getting the property at the given path.
|
static SessionItemOperation<Boolean> |
itemExists(String path)
Creates a session operation for checking the existence of an item
at the given path.
|
static SessionItemOperation<Boolean> |
nodeExists(String path)
Creates a session operation for checking the existence of a node
at the given path.
|
protected abstract T |
perform(ItemManager manager,
Path path)
Performs this operation using the given item manager.
|
T |
perform(SessionContext context)
Performs this operation on the specified item.
|
static SessionItemOperation<Boolean> |
propertyExists(String path)
Creates a session operation for checking the existence of a property
at the given path.
|
static SessionItemOperation<Object> |
remove(String path)
Creates a session operation for removing the item at the given path.
|
String |
toString()
Returns a string representation of this operation.
|
public static SessionItemOperation<Boolean> itemExists(String path)
path - absolute path of the itempublic static SessionItemOperation<Boolean> propertyExists(String path)
path - absolute path of the propertypublic static SessionItemOperation<Boolean> nodeExists(String path)
path - absolute path of the nodepublic static SessionItemOperation<ItemImpl> getItem(String path)
path - absolute path of the itempublic static SessionItemOperation<PropertyImpl> getProperty(String path)
path - absolute path of the propertypublic static SessionItemOperation<NodeImpl> getNode(String path)
path - absolute path of the nodepublic static SessionItemOperation<Object> remove(String path)
path - absolute path of the itempublic T perform(SessionContext context) throws RepositoryException
perform(ItemManager, Path) method to actually perform the
selected operation.perform in interface SessionOperation<T>context - component context of this sessionRepositoryException - if the operation failsprotected abstract T perform(ItemManager manager, Path path) throws RepositoryException
manager - item manager of this sessionpath - resolved path of the itemRepositoryException - if the operation failsCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.