[Yanel-commits] rev 60831 - public/yanel/trunk/src/resources/comment/src/java/org/wyona/yanel/impl/resources/comment
michi at wyona.com
michi at wyona.com
Thu Sep 22 07:44:45 CEST 2011
Author: michi
Date: 2011-09-22 07:44:45 +0200 (Thu, 22 Sep 2011)
New Revision: 60831
Modified:
public/yanel/trunk/src/resources/comment/src/java/org/wyona/yanel/impl/resources/comment/CommentResource.java
Log:
another StringBuilder replacement started
Modified: public/yanel/trunk/src/resources/comment/src/java/org/wyona/yanel/impl/resources/comment/CommentResource.java
===================================================================
--- public/yanel/trunk/src/resources/comment/src/java/org/wyona/yanel/impl/resources/comment/CommentResource.java 2011-09-22 05:33:10 UTC (rev 60830)
+++ public/yanel/trunk/src/resources/comment/src/java/org/wyona/yanel/impl/resources/comment/CommentResource.java 2011-09-22 05:44:45 UTC (rev 60831)
@@ -112,6 +112,21 @@
* @param comment Comment which might has been submitted, but is not valid
*/
private StringBuilder generateNoValidCommentSubmittedYetXML(String path, String message, CommentV1 comment) {
+/* TODO ...
+ Document doc = XMLHelper.createDocument(null, "no-valid-comment-submitted-yet");
+ Element rootElem = doc.getDocumentElement();
+ rootElem.setAttribute("path", path);
+
+ if (message != null) {
+ sb.append("<message>" + message + "</message>");
+ Element messageElem = doc.createElement("message");
+ messageElem.appendChild(doc.createTextNode(message));
+ rootElem.appendChild(messageElem);
+ }
+
+ return new StringBuilder(XMLHelper.documentToString(doc, false, false, null));
+*/
+
StringBuilder sb = new StringBuilder("<?xml version=\"1.0\"?>");
sb.append("<no-valid-comment-submitted-yet path=\"" + path + "\">");
if (message != null) {
More information about the Yanel-commits
mailing list