Author: justin
Date: Thu Apr 29 02:01:33 2010
New Revision: 939175
URL: http://svn.apache.org/viewvc?rev=939175&view=rev
Log:
SLING-1509 - adding nicer toString message
Modified:
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/Modification.java
Modified:
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/Modification.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/Modification.java?rev=939175&r1=939174&r2=939175&view=diff
==============================================================================
---
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/Modification.java
(original)
+++
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/Modification.java
Thu Apr 29 02:01:33 2010
@@ -47,7 +47,7 @@ public class Modification {
/**
* Records a 'modified' change
- *
+ *
* @param path path of the item that was modified
*/
public static Modification onModified(String path) {
@@ -56,7 +56,7 @@ public class Modification {
/**
* Records a 'created' change
- *
+ *
* @param path path of the item that was created
*/
public static Modification onCreated(String path) {
@@ -65,7 +65,7 @@ public class Modification {
/**
* Records a 'deleted' change
- *
+ *
* @param path path of the item that was deleted
*/
public static Modification onDeleted(String path) {
@@ -77,7 +77,7 @@ public class Modification {
* <p/>
* Note: the moved change only records the basic move command. the implied
* changes on the moved properties and sub nodes are not recorded.
- *
+ *
* @param srcPath source path of the node that was moved
* @param dstPath destination path of the node that was moved.
*/
@@ -90,7 +90,7 @@ public class Modification {
* <p/>
* Note: the copy change only records the basic copy command. the implied
* changes on the copied properties and sub nodes are not recorded.
- *
+ *
* @param srcPath source path of the node that was copied
* @param dstPath destination path of the node that was copied.
*/
@@ -100,7 +100,7 @@ public class Modification {
/**
* Records a 'order' change.
- *
+ *
* @param orderedPath Path of the node that was reordered
* @param beforeSibbling Name of the sibbling node before which the source
node has
* been inserted.
@@ -117,4 +117,14 @@ public class Modification {
final String source, final String dest) {
return new Modification(type, source, dest);
}
+
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("Modification[type=").append(type).append(",
source=").append(source);
+ if (destination != null) {
+ builder.append(", dest=").append(destination);
+ }
+ builder.append("]");
+ return builder.toString();
+ }
}