Document JCRX API
authorMathieu <mbaudier@argeo.org>
Wed, 16 Nov 2022 08:19:30 +0000 (09:19 +0100)
committerMathieu <mbaudier@argeo.org>
Wed, 16 Nov 2022 08:19:30 +0000 (09:19 +0100)
org.argeo.cms.jcr/src/org/argeo/jcr/Jcr.java
org.argeo.cms.jcr/src/org/argeo/jcr/JcrxApi.java

index 2ff49e7ce92c988902a54d613acd6e39ef39ea08..88f534503d5a142e5a4d87d4deec57a0e5c24979 100644 (file)
@@ -49,11 +49,15 @@ public class Jcr {
        /**
         * The name of a node which will be serialized as XML text, as per section 7.3.1
         * of the JCR 2.0 specifications.
+        * 
+        * @see Workspace#NAME_JCR_XMLTEXT
         */
        public final static String JCR_XMLTEXT = "jcr:xmltext";
        /**
         * The name of a property which will be serialized as XML text, as per section
         * 7.3.1 of the JCR 2.0 specifications.
+        * 
+        * @see Workspace#NAME_JCR_XMLCHARACTERS
         */
        public final static String JCR_XMLCHARACTERS = "jcr:xmlcharacters";
        /**
index 666b2593e5992dbb980f8e12e43c194fddb1f5c4..ff61a622c70236599d946db806b11832faf1a130 100644 (file)
@@ -67,7 +67,7 @@ public class JcrxApi {
                try {
                        if (node.hasNode(name)) {
                                Node child = node.getNode(name);
-                               setXmlValue(node, child, value);
+                               setXmlValue(child, value);
                        } else
                                node.addNode(name, JcrxType.JCRX_XMLVALUE).addNode(Jcr.JCR_XMLTEXT, JcrxType.JCRX_XMLTEXT)
                                                .setProperty(Jcr.JCR_XMLCHARACTERS, value);
@@ -76,7 +76,8 @@ public class JcrxApi {
                }
        }
 
-       public static void setXmlValue(Node node, Node child, String value) {
+       /** Set the value as XML characters. */
+       public static void setXmlValue(Node child, String value) {
                try {
                        if (!child.hasNode(Jcr.JCR_XMLTEXT))
                                child.addNode(Jcr.JCR_XMLTEXT, JcrxType.JCRX_XMLTEXT);