Class SessionItemOperation<T>
- java.lang.Object
-
- org.apache.jackrabbit.core.session.SessionItemOperation<T>
-
- All Implemented Interfaces:
SessionOperation<T>
public abstract class SessionItemOperation<T> extends Object implements SessionOperation<T>
Session operation for accessing an item at a given path. See the static methods for factories of different kinds of item operations.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 Tperform(ItemManager manager, Path path)Performs this operation using the given item manager.Tperform(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.StringtoString()Returns a string representation of this operation.
-
-
-
Method Detail
-
itemExists
public static SessionItemOperation<Boolean> itemExists(String path)
Creates a session operation for checking the existence of an item at the given path.- Parameters:
path- absolute path of the item- Returns:
- session operation
-
propertyExists
public static SessionItemOperation<Boolean> propertyExists(String path)
Creates a session operation for checking the existence of a property at the given path.- Parameters:
path- absolute path of the property- Returns:
- session operation
-
nodeExists
public static SessionItemOperation<Boolean> nodeExists(String path)
Creates a session operation for checking the existence of a node at the given path.- Parameters:
path- absolute path of the node- Returns:
- session operation
-
getItem
public static SessionItemOperation<ItemImpl> getItem(String path)
Creates a session operation for getting the item at the given path.- Parameters:
path- absolute path of the item- Returns:
- session operation
-
getProperty
public static SessionItemOperation<PropertyImpl> getProperty(String path)
Creates a session operation for getting the property at the given path.- Parameters:
path- absolute path of the property- Returns:
- session operation
-
getNode
public static SessionItemOperation<NodeImpl> getNode(String path)
Creates a session operation for getting the node at the given path.- Parameters:
path- absolute path of the node- Returns:
- session operation
-
remove
public static SessionItemOperation<Object> remove(String path)
Creates a session operation for removing the item at the given path.- Parameters:
path- absolute path of the item- Returns:
- session operation
-
perform
public T perform(SessionContext context) throws RepositoryException
Performs this operation on the specified item. This method resolves the given absolute path and calls the abstractperform(ItemManager, Path)method to actually perform the selected operation.- Specified by:
performin interfaceSessionOperation<T>- Parameters:
context- component context of this session- Throws:
RepositoryException- if the operation fails
-
perform
protected abstract T perform(ItemManager manager, Path path) throws RepositoryException
Performs this operation using the given item manager.- Parameters:
manager- item manager of this sessionpath- resolved path of the item- Throws:
RepositoryException- if the operation fails
-
-