Class Modification

java.lang.Object
org.apache.sling.servlets.post.Modification

public class Modification extends Object
  • Constructor Details

  • Method Details

    • getType

      public ModificationType getType()
    • getSource

      public String getSource()
    • getDestination

      public String getDestination()
    • onModified

      public static Modification onModified(String path)
      Records a 'modified' change
      Parameters:
      path - path of the item that was modified
      Returns:
      the modification
    • onCreated

      public static Modification onCreated(String path)
      Records a 'created' change
      Parameters:
      path - path of the item that was created
      Returns:
      the modification
    • onDeleted

      public static Modification onDeleted(String path)
      Records a 'deleted' change
      Parameters:
      path - path of the item that was deleted
      Returns:
      the modification
    • onMoved

      public static Modification onMoved(String srcPath, String dstPath)
      Records a 'moved' change.

      Note: the moved change only records the basic move command. the implied changes on the moved properties and sub nodes are not recorded.

      Parameters:
      srcPath - source path of the node that was moved
      dstPath - destination path of the node that was moved.
      Returns:
      the modification
    • onCopied

      public static Modification onCopied(String srcPath, String dstPath)
      Records a 'copied' change.

      Note: the copy change only records the basic copy command. the implied changes on the copied properties and sub nodes are not recorded.

      Parameters:
      srcPath - source path of the node that was copied
      dstPath - destination path of the node that was copied.
      Returns:
      the modification
    • onOrder

      public static Modification onOrder(String orderedPath, String beforeSibling)
      Records a 'order' change.
      Parameters:
      orderedPath - Path of the node that was reordered
      beforeSibling - Name of the sibling node before which the source node has been inserted.
      Returns:
      the modification
    • onChange

      protected static Modification onChange(ModificationType type, String source)
    • onChange

      protected static Modification onChange(ModificationType type, String source, String dest)
    • onCheckin

      public static Modification onCheckin(String path)
    • onCheckout

      public static Modification onCheckout(String path)
    • onRestore

      public static Modification onRestore(String path, String version)
    • toString

      public String toString()
      Overrides:
      toString in class Object