jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1360984 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java
Date Thu, 12 Jul 2012 22:13:30 GMT
Author: jukka
Date: Thu Jul 12 22:13:30 2012
New Revision: 1360984

URL: http://svn.apache.org/viewvc?rev=1360984&view=rev
Log:
OAK-127: Support for XML imports

Handle the jcr:mixinTypes property in system view imports

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java?rev=1360984&r1=1360983&r2=1360984&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/XmlImportHandler.java
Thu Jul 12 22:13:30 2012
@@ -80,9 +80,15 @@ public class XmlImportHandler extends De
                 if (values.size() == 1) {
                     if (name.equals("jcr:primaryType")) {
                         node.setPrimaryType(values.get(0));
+                    } else if (name.equals("jcr:mixinTypes")) {
+                        node.addMixin(values.get(0));
                     } else {
                         node.setProperty(name, values.get(0));
                     }
+                } else if (name.equals("jcr:mixinTypes")) {
+                    for (String value : values) {
+                        node.addMixin(value);
+                    }
                 } else {
                     node.setProperty(name, values.toArray(new String[values.size()]));
                 }



Mime
View raw message