org.apache.sling.servlets.post
Class Modification

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

public class Modification
extends java.lang.Object


Constructor Summary
Modification(ModificationType type, java.lang.String source, java.lang.String destination)
           
 
Method Summary
 java.lang.String getDestination()
           
 java.lang.String getSource()
           
 ModificationType getType()
           
protected static Modification onChange(ModificationType type, java.lang.String source)
           
protected static Modification onChange(ModificationType type, java.lang.String source, java.lang.String dest)
           
static Modification onCopied(java.lang.String srcPath, java.lang.String dstPath)
          Records a 'copied' change.
static Modification onCreated(java.lang.String path)
          Records a 'created' change
static Modification onDeleted(java.lang.String path)
          Records a 'deleted' change
static Modification onModified(java.lang.String path)
          Records a 'modified' change
static Modification onMoved(java.lang.String srcPath, java.lang.String dstPath)
          Records a 'moved' change.
static Modification onOrder(java.lang.String orderedPath, java.lang.String beforeSibbling)
          Records a 'order' change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Modification

public Modification(ModificationType type,
                    java.lang.String source,
                    java.lang.String destination)
Method Detail

getType

public ModificationType getType()

getSource

public java.lang.String getSource()

getDestination

public java.lang.String getDestination()

onModified

public static Modification onModified(java.lang.String path)
Records a 'modified' change

Parameters:
path - path of the item that was modified

onCreated

public static Modification onCreated(java.lang.String path)
Records a 'created' change

Parameters:
path - path of the item that was created

onDeleted

public static Modification onDeleted(java.lang.String path)
Records a 'deleted' change

Parameters:
path - path of the item that was deleted

onMoved

public static Modification onMoved(java.lang.String srcPath,
                                   java.lang.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.

onCopied

public static Modification onCopied(java.lang.String srcPath,
                                    java.lang.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.

onOrder

public static Modification onOrder(java.lang.String orderedPath,
                                   java.lang.String beforeSibbling)
Records a 'order' change.

Parameters:
orderedPath - Path of the node that was reordered
beforeSibbling - Name of the sibbling node before which the source node has been inserted.

onChange

protected static Modification onChange(ModificationType type,
                                       java.lang.String source)

onChange

protected static Modification onChange(ModificationType type,
                                       java.lang.String source,
                                       java.lang.String dest)


Copyright © 2007-2009. All Rights Reserved.