Class 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 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

        protected abstract T perform​(ItemManager manager,
                                     Path path)
                              throws RepositoryException
        Performs this operation using the given item manager.
        Parameters:
        manager - item manager of this session
        path - resolved path of the item
        Throws:
        RepositoryException - if the operation fails
      • toString

        public String toString()
        Returns a string representation of this operation.
        Overrides:
        toString in class Object
        Returns:
        "getItem(/path/to/item)", etc.