jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r816326 - in /jackrabbit/sandbox/JCR-2170: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/ jackrabbit-core/src/test/java/org/apache/jackrabbit/core/no...
Date Thu, 17 Sep 2009 18:39:01 GMT
Author: mreutegg
Date: Thu Sep 17 18:39:00 2009
New Revision: 816326

URL: http://svn.apache.org/viewvc?rev=816326&view=rev
Log:
JCR-2170: Remove PropDefId and NodeDefId
- make Q*DefinitionImpl immutable again and use builders instead
- fix faulty xml node type test case
- improvements on Q*DefinitionBuilder and impls for compatibility with previously used core
classes

Modified:
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QItemDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QPropertyDefinitionImpl.java

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
Thu Sep 17 18:39:00 2009
@@ -31,8 +31,6 @@
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValueConstraint;
 import org.apache.jackrabbit.spi.commons.QNodeTypeDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 
@@ -90,11 +88,11 @@
         queryable = def.isQueryable();
         nodeDefs = new HashSet<QNodeDefinition>();
         for (QNodeDefinition nd: def.getChildNodeDefs()) {
-            nodeDefs.add(new QNodeDefinitionImpl(nd));
+            nodeDefs.add(nd);
         }
         propDefs = new HashSet<QPropertyDefinition>();
         for (QPropertyDefinition pd: def.getPropertyDefs()) {
-            propDefs.add(new QPropertyDefinitionImpl(pd));
+            propDefs.add(pd);
         }
     }
 

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Thu Sep 17 18:39:00 2009
@@ -72,8 +72,6 @@
 import org.apache.jackrabbit.spi.commons.nodetype.QDefinitionBuilderFactory;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-import org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
@@ -697,7 +695,7 @@
         if (ndefs != null) {
             QNodeDefinition[] qndefs = new QNodeDefinition[ndefs.length];
             for (int i = 0; i < ndefs.length; i++) {
-                QNodeDefinitionImpl qndef = new QNodeDefinitionImpl();
+                QNodeDefinitionBuilder qndef = new QNodeDefinitionBuilder();
                 // declaring node type
                 qndef.setDeclaringNodeType(def.getName());
                 // name
@@ -747,7 +745,7 @@
                 qndef.setOnParentVersion(ndefs[i].getOnParentVersion());
                 qndef.setAllowsSameNameSiblings(ndefs[i].allowsSameNameSiblings());
 
-                qndefs[i] = qndef;
+                qndefs[i] = qndef.build();
             }
             def.setChildNodeDefs(qndefs);
         }
@@ -757,7 +755,7 @@
         if (pdefs != null) {
             QPropertyDefinition[] qpdefs = new QPropertyDefinition[pdefs.length];
             for (int i = 0; i < pdefs.length; i++) {
-                QPropertyDefinitionImpl qpdef = new QPropertyDefinitionImpl();
+                QPropertyDefinitionBuilder qpdef = new QPropertyDefinitionBuilder();
                 // declaring node type
                 qpdef.setDeclaringNodeType(def.getName());
                 // name
@@ -812,7 +810,7 @@
                     qpdef.setDefaultValues(qvalues);
                 }
 
-                qpdefs[i] = qpdef;
+                qpdefs[i] = qpdef.build();
             }
             def.setPropertyDefs(qpdefs);
         }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Thu Sep 17 18:39:00 2009
@@ -54,7 +54,7 @@
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
-import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1764,7 +1764,7 @@
     }
 
     private static QNodeDefinition createRootNodeDef() {
-        QNodeDefinitionImpl def = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder def = new QNodeDefinitionBuilder();
 
         // FIXME need a fake declaring node type:
         // rep:root is not quite correct but better than a non-existing node type
@@ -1776,7 +1776,7 @@
         def.setOnParentVersion(OnParentVersionAction.VERSION);
         def.setAllowsSameNameSiblings(false);
         def.setAutoCreated(true);
-        return def;
+        return def.build();
     }
 
     /**

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
Thu Sep 17 18:39:00 2009
@@ -29,9 +29,9 @@
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
 import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
+import org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder;
+import org.apache.jackrabbit.spi.commons.nodetype.QPropertyDefinitionBuilder;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-import org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QValueFactory;
 import org.apache.jackrabbit.spi.QValueConstraint;
@@ -185,18 +185,18 @@
         // property definitions
         List<QPropertyDefinition> properties = new ArrayList<QPropertyDefinition>();
         while (walker.iterateElements(Constants.PROPERTYDEFINITION_ELEMENT)) {
-            QPropertyDefinitionImpl def = getPropDef();
+            QPropertyDefinitionBuilder def = getPropDef();
             def.setDeclaringNodeType(type.getName());
-            properties.add(def);
+            properties.add(def.build());
         }
         type.setPropertyDefs(properties.toArray(new QPropertyDefinition[properties.size()]));
 
         // child node definitions
         List<QNodeDefinition> nodes = new ArrayList<QNodeDefinition>();
         while (walker.iterateElements(Constants.CHILDNODEDEFINITION_ELEMENT)) {
-            QNodeDefinitionImpl def = getChildNodeDef();
+            QNodeDefinitionBuilder def = getChildNodeDef();
             def.setDeclaringNodeType(type.getName());
-            nodes.add(def);
+            nodes.add(def.build());
         }
         type.setChildNodeDefs(nodes.toArray(new QNodeDefinition[nodes.size()]));
 
@@ -212,9 +212,9 @@
      *                                     illegal name
      * @throws NamespaceException if a namespace is not defined
      */
-    private QPropertyDefinitionImpl getPropDef()
+    private QPropertyDefinitionBuilder getPropDef()
             throws InvalidNodeTypeDefException, NameException, NamespaceException {
-        QPropertyDefinitionImpl def = new QPropertyDefinitionImpl();
+        QPropertyDefinitionBuilder def = new QPropertyDefinitionBuilder();
         String name = walker.getAttribute(Constants.NAME_ATTRIBUTE);
         if (name.equals("*")) {
             def.setName(NameConstants.ANY_NAME);
@@ -317,8 +317,8 @@
      * @throws NameException if the definition contains an illegal name
      * @throws NamespaceException if a namespace is not defined
      */
-    private QNodeDefinitionImpl getChildNodeDef() throws NameException, NamespaceException
{
-        QNodeDefinitionImpl def = new QNodeDefinitionImpl();
+    private QNodeDefinitionBuilder getChildNodeDef() throws NameException, NamespaceException
{
+        QNodeDefinitionBuilder def = new QNodeDefinitionBuilder();
         String name = walker.getAttribute(Constants.NAME_ATTRIBUTE);
         if (name.equals("*")) {
             def.setName(NameConstants.ANY_NAME);

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
Thu Sep 17 18:39:00 2009
@@ -18,12 +18,13 @@
 
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-import org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder;
+import org.apache.jackrabbit.spi.commons.nodetype.QPropertyDefinitionBuilder;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.spi.NameFactory;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QNodeDefinition;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -121,18 +122,18 @@
         bar.setName(nameFactory.create("", "bar"));
         bar.setSupertypes(new Name[]{NameConstants.NT_BASE});
 
-        QNodeDefinitionImpl myBarInFoo = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder myBarInFoo = new QNodeDefinitionBuilder();
         myBarInFoo.setRequiredPrimaryTypes(new Name[]{bar.getName()});
         myBarInFoo.setName(nameFactory.create("", "myBarInFoo"));
         myBarInFoo.setDeclaringNodeType(foo.getName());
 
-        QNodeDefinitionImpl myFooInBar = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder myFooInBar = new QNodeDefinitionBuilder();
         myFooInBar.setRequiredPrimaryTypes(new Name[]{foo.getName()});
         myFooInBar.setName(nameFactory.create("", "myFooInBar"));
         myFooInBar.setDeclaringNodeType(bar.getName());
 
-        foo.setChildNodeDefs(new QNodeDefinitionImpl[]{myBarInFoo});
-        bar.setChildNodeDefs(new QNodeDefinitionImpl[]{myFooInBar});
+        foo.setChildNodeDefs(new QNodeDefinition[]{myBarInFoo.build()});
+        bar.setChildNodeDefs(new QNodeDefinition[]{myFooInBar.build()});
         ntDefCollection = new LinkedList();
         ntDefCollection.add(foo);
         ntDefCollection.add(bar);
@@ -166,12 +167,12 @@
         foo.setSupertypes(new Name[]{NameConstants.NT_BASE});
 
 
-        QNodeDefinitionImpl myBarInFoo = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder myBarInFoo = new QNodeDefinitionBuilder();
         myBarInFoo.setRequiredPrimaryTypes(new Name[]{nameFactory.create("", "I_am_an_invalid_required_primary_type")});
         myBarInFoo.setName(nameFactory.create("", "myNTInFoo"));
         myBarInFoo.setDeclaringNodeType(foo.getName());
 
-        foo.setChildNodeDefs(new QNodeDefinitionImpl[]{myBarInFoo});
+        foo.setChildNodeDefs(new QNodeDefinition[]{myBarInFoo.build()});
         ntDefCollection = new LinkedList();
         ntDefCollection.add(foo);
 
@@ -211,36 +212,38 @@
         final NodeTypeDef cmsObject = new NodeTypeDef();
         cmsObject.setName(nameFactory.create("", "CmsObject"));
         cmsObject.setSupertypes(new Name[]{NameConstants.NT_BASE});
-        QNodeDefinitionImpl parentFolder = new QNodeDefinitionImpl();
+
+        QNodeDefinitionBuilder parentFolder = new QNodeDefinitionBuilder();
         parentFolder.setRequiredPrimaryTypes(new Name[]{folder.getName()});
         parentFolder.setName(nameFactory.create("", "parentFolder"));
         parentFolder.setDeclaringNodeType(cmsObject.getName());
-        cmsObject.setChildNodeDefs(new QNodeDefinitionImpl[]{parentFolder});
+        cmsObject.setChildNodeDefs(new QNodeDefinition[]{parentFolder.build()});
 
 
         final NodeTypeDef document = new NodeTypeDef();
         document.setName(nameFactory.create("", "Document"));
         document.setSupertypes(new Name[]{cmsObject.getName()});
-        QPropertyDefinitionImpl sizeProp = new QPropertyDefinitionImpl();
+        QPropertyDefinitionBuilder sizeProp = new QPropertyDefinitionBuilder();
         sizeProp.setName(nameFactory.create("", "size"));
         sizeProp.setRequiredType(PropertyType.LONG);
         sizeProp.setDeclaringNodeType(document.getName());
-        document.setPropertyDefs(new QPropertyDefinition[]{sizeProp});
+        document.setPropertyDefs(new QPropertyDefinition[]{sizeProp.build()});
 
 
         folder.setSupertypes(new Name[]{cmsObject.getName()});
 
-        QNodeDefinitionImpl folders = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder folders = new QNodeDefinitionBuilder();
         folders.setRequiredPrimaryTypes(new Name[]{folder.getName()});
         folders.setName(nameFactory.create("", "folders"));
         folders.setDeclaringNodeType(folder.getName());
 
-        QNodeDefinitionImpl documents = new QNodeDefinitionImpl();
+        QNodeDefinitionBuilder documents = new QNodeDefinitionBuilder();
         documents.setRequiredPrimaryTypes(new Name[]{document.getName()});
         documents.setName(nameFactory.create("", "documents"));
         documents.setDeclaringNodeType(folder.getName());
 
-        folder.setChildNodeDefs(new QNodeDefinitionImpl[]{folders, documents});
+        folder.setChildNodeDefs(new QNodeDefinition[]{
+                folders.build(), documents.build()});
         ntDefCollection = new LinkedList();
         ntDefCollection.add(folder);
         ntDefCollection.add(document);

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/xml/TestAll.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
Thu Sep 17 18:39:00 2009
@@ -401,8 +401,8 @@
                 PropertyType.UNDEFINED, def.getRequiredType());
         assertEquals("emptyProperty multiple",
                 false, def.isMultiple());
-        assertEquals("emptyProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("emptyProperty defaultValues",
+                def.getDefaultValues());
         assertEquals("emptyProperty valueConstraints",
                 0, def.getValueConstraints().length);
     }
@@ -416,8 +416,8 @@
                 1, def.getValueConstraints().length);
         assertEquals("binaryProperty valueConstraints[0]",
                 "[0,)", (def.getValueConstraints())[0].getString());
-        assertEquals("binaryProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("binaryProperty defaultValues",
+                def.getDefaultValues());
     }
 
     /** Test for the <code>boolean</code> property definition type. */
@@ -517,8 +517,8 @@
         assertEquals("pathProperty valueConstraints[0]",
                 "{}\t{http://www.apache.org/jackrabbit/test}testPath",
                 (def.getValueConstraints())[0].getString());
-        assertEquals("pathProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("pathProperty defaultValues",
+                def.getDefaultValues());
     }
 
     /** Test for the <code>path</code> property definition type. */
@@ -531,8 +531,8 @@
         assertEquals("pathProperty valueConstraints[0]",
                 "{}\t{http://www.apache.org/jackrabbit/test}testPath\t{}*",
                 (def.getValueConstraints())[0].getString());
-        assertEquals("pathProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("pathProperty defaultValues",
+                def.getDefaultValues());
     }
 
     /** Test for the <code>path</code> property definition type. */
@@ -545,8 +545,8 @@
         assertEquals("pathProperty valueConstraints[0]",
                 "{http://www.apache.org/jackrabbit/test}testPath\t{}*",
                 (def.getValueConstraints())[0].getString());
-        assertEquals("pathProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("pathProperty defaultValues",
+                def.getDefaultValues());
     }
 
     /** Test for the <code>reference</code> property definition type. */
@@ -559,8 +559,8 @@
         assertEquals("referenceProperty valueConstraints[0]",
                 "{http://www.jcp.org/jcr/nt/1.0}base",
                 (def.getValueConstraints())[0].getString());
-        assertEquals("referenceProperty defaultValues",
-                0, def.getDefaultValues().length);
+        assertNull("referenceProperty defaultValues",
+                def.getDefaultValues());
     }
 
     /** Test for the <code>string</code> property definition type. */

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QItemDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QItemDefinitionImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QItemDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QItemDefinitionImpl.java
Thu Sep 17 18:39:00 2009
@@ -20,12 +20,9 @@
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
 import java.io.Serializable;
 
-import javax.jcr.version.OnParentVersionAction;
-
 /**
  * This abstract class implements the <code>QItemDefinition</code>
  * interface and additionally provides setter methods for the
@@ -36,32 +33,32 @@
     /**
      * The name of the child item.
      */
-    private Name name;
+    private final Name name;
 
     /**
      * The name of the declaring node type.
      */
-    private Name declaringNodeType;
+    private final Name declaringNodeType;
 
     /**
      * The 'autoCreated' flag.
      */
-    private boolean autoCreated;
+    private final boolean autoCreated;
 
     /**
      * The 'onParentVersion' attribute.
      */
-    private int onParentVersion;
+    private final int onParentVersion;
 
     /**
      * The 'protected' flag.
      */
-    private boolean writeProtected;
+    private final boolean writeProtected;
 
     /**
      * The 'mandatory' flag.
      */
-    private boolean mandatory;
+    private final boolean mandatory;
 
     /**
      * HashCode of this object
@@ -69,14 +66,6 @@
     protected transient int hashCode = 0;
 
     /**
-     * Default constructor.
-     */
-    public QItemDefinitionImpl() {
-        this(NameConstants.ANY_NAME, null, false, false,
-                OnParentVersionAction.COPY, false);
-    }
-
-    /**
      * Creates a new <code>QItemDefinitionImpl</code>.
      *
      * @param name              the name of the child item.
@@ -86,7 +75,7 @@
      * @param onParentVersion   the on parent version behaviour.
      * @param isProtected       if this item is protected.
      */
-    public QItemDefinitionImpl(Name name, Name declaringNodeType,
+    QItemDefinitionImpl(Name name, Name declaringNodeType,
                         boolean isAutoCreated, boolean isMandatory,
                         int onParentVersion, boolean isProtected) {
         this.name = name;
@@ -97,75 +86,6 @@
         this.writeProtected = isProtected;
     }
 
-    /**
-     * Sets the name of declaring node type.
-     *
-     * @param declaringNodeType name of the declaring node type (must not be
-     *                          <code>null</code>)
-     */
-    public void setDeclaringNodeType(Name declaringNodeType) {
-        if (declaringNodeType == null) {
-            throw new IllegalArgumentException("declaringNodeType can not be null");
-        }
-        this.declaringNodeType = declaringNodeType;
-    }
-
-    /**
-     * Sets the name of the child item.
-     *
-     * @param name name of child item (must not be  <code>null</code>)
-     */
-    public void setName(Name name) {
-        if (name == null) {
-            throw new IllegalArgumentException("name can not be null");
-        }
-        this.name = name;
-    }
-
-    /**
-     * Sets the 'autoCreated' flag.
-     *
-     * @param autoCreated a <code>boolean</code>
-     */
-    public void setAutoCreated(boolean autoCreated) {
-        this.autoCreated = autoCreated;
-    }
-
-    /**
-     * Sets the 'onParentVersion' attribute.
-     *
-     * @param onParentVersion any of the following constants:
-     * <UL>
-     *    <LI><code>OnParentVersionAction.COPY</code>
-     *    <LI><code>OnParentVersionAction.VERSION</code>
-     *    <LI><code>OnParentVersionAction.INITIALIZE</code>
-     *    <LI><code>OnParentVersionAction.COMPUTE</code>
-     *    <LI><code>OnParentVersionAction.IGNORE</code>
-     *    <LI><code>OnParentVersionAction.ABORT</code>
-     * </UL>
-     */
-    public void setOnParentVersion(int onParentVersion) {
-        this.onParentVersion = onParentVersion;
-    }
-
-    /**
-     * Sets the 'protected' flag.
-     *
-     * @param writeProtected a <code>boolean</code>
-     */
-    public void setProtected(boolean writeProtected) {
-        this.writeProtected = writeProtected;
-    }
-
-    /**
-     * Sets the 'mandatory' flag.
-     *
-     * @param mandatory a <code>boolean</code>
-     */
-    public void setMandatory(boolean mandatory) {
-        this.mandatory = mandatory;
-    }
-
     //--------------------------------------------------------------< QItemDefinition
>
     /**
      * {@inheritDoc}

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeDefinitionImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeDefinitionImpl.java
Thu Sep 17 18:39:00 2009
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
 import java.util.Arrays;
 import java.util.TreeSet;
@@ -33,25 +32,16 @@
     /**
      * The name of the default primary type.
      */
-    private Name defaultPrimaryType;
+    private final Name defaultPrimaryType;
 
     /**
      * The names of the required primary types.
      */
     private final Set<Name> requiredPrimaryTypes = new HashSet<Name>();
-
     /**
      * The 'allowsSameNameSiblings' flag.
      */
-    private boolean allowsSameNameSiblings;
-
-    /**
-     * Default constructor.
-     */
-    public QNodeDefinitionImpl() {
-        super();
-        requiredPrimaryTypes.add(NameConstants.NT_BASE);
-    }
+    private final boolean allowsSameNameSiblings;
 
     /**
      * Copy constructor.
@@ -92,39 +82,7 @@
         this.allowsSameNameSiblings = allowsSameNameSiblings;
     }
 
-    /**
-     * Sets the name of default primary type.
-     *
-     * @param defaultNodeType the name of the default primary type.
-     */
-    public void setDefaultPrimaryType(Name defaultNodeType) {
-        this.defaultPrimaryType = defaultNodeType;
-    }
-
-    /**
-     * Sets the names of the required primary types.
-     *
-     * @param requiredPrimaryTypes the names of the required primary types.
-     */
-    public void setRequiredPrimaryTypes(Name[] requiredPrimaryTypes) {
-        if (requiredPrimaryTypes == null) {
-            throw new IllegalArgumentException("requiredPrimaryTypes can not be null");
-        }
-        this.requiredPrimaryTypes.clear();
-        this.requiredPrimaryTypes.addAll(Arrays.asList(requiredPrimaryTypes));
-    }
-
-    /**
-     * Sets the 'allowsSameNameSiblings' flag.
-     *
-     * @param allowsSameNameSiblings whether to allow same named siblings.
-     */
-    public void setAllowsSameNameSiblings(boolean allowsSameNameSiblings) {
-        this.allowsSameNameSiblings = allowsSameNameSiblings;
-    }
-
     //-------------------------------------------------------< QNodeDefinition >
-
     /**
      * {@inheritDoc}
      */

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
Thu Sep 17 18:39:00 2009
@@ -52,6 +52,8 @@
  */
 public class QNodeTypeDefinitionImpl implements QNodeTypeDefinition, Serializable, Cloneable
{
 
+    private static final long serialVersionUID = -4065300714874671511L;
+
     /**
      * The name of the node definition.
      */
@@ -101,7 +103,6 @@
      * The list of property definitions.
      */
     private final Set<QNodeDefinition> childNodeDefs;
-
     /**
      * Unmodifiable collection of dependent node type <code>Name</code>s.
      * @see #getDependencies()
@@ -491,7 +492,7 @@
             if (pd instanceof Serializable) {
                 defs.add(pd);
             } else {
-                defs.add(new QPropertyDefinitionImpl(pd));
+                defs.add(pd);
             }
         }
         return defs;

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java
Thu Sep 17 18:39:00 2009
@@ -20,14 +20,11 @@
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QValueConstraint;
-import org.apache.jackrabbit.spi.commons.query.qom.Operator;
 
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.jcr.PropertyType;
-
 /**
  * <code>QPropertyDefinitionImpl</code> implements SPI property
  * definition interface.
@@ -38,44 +35,37 @@
     /**
      * The required type.
      */
-    private int requiredType = PropertyType.UNDEFINED;
+    private final int requiredType;
 
     /**
      * The value constraints.
      */
-    private QValueConstraint[] valueConstraints = QValueConstraint.EMPTY_ARRAY;
+    private final QValueConstraint[] valueConstraints;
 
     /**
      * The default values.
      */
-    private QValue[] defaultValues = QValue.EMPTY_ARRAY;
+    private final QValue[] defaultValues;
 
     /**
      * The 'multiple' flag
      */
-    private boolean multiple = false;
+    private final boolean multiple;
 
     /**
      * The available query operators
      */
-    private String[] availableQueryOperators = Operator.getAllQueryOperators();
+    private final String[] availableQueryOperators;
 
     /**
      * The 'fullTextSearcheable' flag
      */
-    private boolean fullTextSearchable = true;
+    private final boolean fullTextSearchable;
 
     /**
      * The 'queryOrderable' flag
      */
-    private boolean queryOrderable = true;
-
-    /**
-     * Default constructor.
-     */
-    public QPropertyDefinitionImpl() {
-        super();
-    }
+    private final boolean queryOrderable;
 
     /**
      * Copy constructor.
@@ -138,81 +128,6 @@
         this.queryOrderable = isQueryOrderable;
     }
 
-    /**
-     * Sets the required type
-     *
-     * @param requiredType the required type.
-     */
-    public void setRequiredType(int requiredType) {
-        this.requiredType = requiredType;
-    }
-
-    /**
-     * Sets the value constraints.
-     *
-     * @param valueConstraints the value constraints.
-     */
-    public void setValueConstraints(QValueConstraint[] valueConstraints) {
-        if (valueConstraints != null) {
-            this.valueConstraints = valueConstraints;
-        } else {
-            this.valueConstraints = QValueConstraint.EMPTY_ARRAY;
-        }
-    }
-
-    /**
-     * Sets the default values.
-     *
-     * @param defaultValues the default values.
-     */
-    public void setDefaultValues(QValue[] defaultValues) {
-        if (defaultValues != null) {
-            this.defaultValues = defaultValues;
-        } else {
-            this.defaultValues = QValue.EMPTY_ARRAY;
-        }
-    }
-
-    /**
-     * Sets the 'multiple' flag.
-     *
-     * @param multiple whether the property is multi-valued.
-     */
-    public void setMultiple(boolean multiple) {
-        this.multiple = multiple;
-    }
-
-    /**
-     * Sets the 'fulltext searchable' flag.
-     *
-     * @param fullTextSearchable whether the property is fulltext searchable.
-     */
-    public void setFullTextSearchable(boolean fullTextSearchable) {
-        this.fullTextSearchable = fullTextSearchable;
-    }
-
-    /**
-     * Sets the 'query orderable' flag.
-     *
-     * @param queryOrderable whether the property is orderable.
-     */
-    public void setQueryOrderable(boolean queryOrderable) {
-        this.queryOrderable = queryOrderable;
-    }
-
-    /**
-     * Sets the 'available' query operators.
-     *
-     * @param queryOperators the available query operators.
-     */
-    public void setAvailableQueryOperators(String[] queryOperators) {
-        if (queryOperators != null) {
-            this.availableQueryOperators = queryOperators;
-        } else {
-            this.availableQueryOperators = new String[0];
-        }
-    }
-
     //------------------------------------------------< QPropertyDefinition >---
     /**
      * {@inheritDoc}

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QDefinitionBuilderFactory.java
Thu Sep 17 18:39:00 2009
@@ -327,10 +327,6 @@
 
         @Override
         public void build() {
-            if (builder.getRequiredPrimaryTypes() == null) {
-                builder.addRequiredPrimaryType(NameConstants.NT_BASE);
-            }
-
             ntd.childNodeDefs.add(builder.build());
         }
     }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QItemDefinitionBuilder.java
Thu Sep 17 18:39:00 2009
@@ -17,21 +17,23 @@
 package org.apache.jackrabbit.spi.commons.nodetype;
 
 import javax.jcr.nodetype.ItemDefinition;
+import javax.jcr.version.OnParentVersionAction;
 
 import org.apache.jackrabbit.spi.QItemDefinition;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
 /**
  * A builder for {@link QItemDefinition}.
  */
 public abstract class QItemDefinitionBuilder {
 
-    private Name name;
-    private Name declaringType;
-    private boolean isAutocreated;
-    private int onParentVersion;
-    private boolean isProtected;
-    private boolean isMandatory;
+    private Name name = NameConstants.ANY_NAME;
+    private Name declaringType = null;
+    private boolean isAutocreated = false;
+    private int onParentVersion = OnParentVersionAction.COPY;
+    private boolean isProtected = false;
+    private boolean isMandatory = false;
 
     /**
      * @param name  the name of the child item definition being build

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QNodeDefinitionBuilder.java
Thu Sep 17 18:39:00 2009
@@ -16,13 +16,14 @@
  */
 package org.apache.jackrabbit.spi.commons.nodetype;
 
-import java.util.List;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Set;
+import java.util.HashSet;
 
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
 /**
  * A builder for a {@link QNodeDefinition}.
@@ -30,7 +31,7 @@
 public class QNodeDefinitionBuilder extends QItemDefinitionBuilder {
 
     private Name defaultPrimaryType;
-    private List<Name> requiredPrimaryTypes;
+    private Set<Name> requiredPrimaryTypes = new HashSet<Name>();
     private boolean allowsSameNameSiblings;
 
     /**
@@ -55,9 +56,6 @@
      * @param name the name of a required primary type.
      */
     public void addRequiredPrimaryType(Name name) {
-        if (requiredPrimaryTypes == null) {
-            requiredPrimaryTypes = new ArrayList<Name>();
-        }
         requiredPrimaryTypes.add(name);
     }
 
@@ -66,10 +64,9 @@
      *              definition being built.
      */
     public void setRequiredPrimaryTypes(Name[] names) {
-        if (names == null) {
-            requiredPrimaryTypes = null;
-        } else {
-            requiredPrimaryTypes = new ArrayList<Name>(Arrays.asList(names));
+        requiredPrimaryTypes.clear();
+        if (names != null) {
+            requiredPrimaryTypes.addAll(Arrays.asList(names));
         }
     }
 
@@ -78,8 +75,8 @@
      *         definition being built.
      */
     public Name[] getRequiredPrimaryTypes() {
-        if (requiredPrimaryTypes == null) {
-            return null;
+        if (requiredPrimaryTypes.isEmpty()) {
+            return new Name[]{NameConstants.NT_BASE};
         } else {
             return requiredPrimaryTypes.toArray(new Name[requiredPrimaryTypes.size()]);
         }
@@ -111,7 +108,10 @@
      *                               instance.
      */
     public QNodeDefinition build() throws IllegalStateException {
-        return new QNodeDefinitionImpl(getName(), getDeclaringNodeType(), getAutoCreated(),
getMandatory(), getOnParentVersion(), getProtected(), getDefaultPrimaryType(), getRequiredPrimaryTypes(),
getAllowsSameNameSiblings());
+        return new QNodeDefinitionImpl(getName(), getDeclaringNodeType(),
+                getAutoCreated(), getMandatory(), getOnParentVersion(),
+                getProtected(), getDefaultPrimaryType(),
+                getRequiredPrimaryTypes(), getAllowsSameNameSiblings());
     }
 
 }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/QPropertyDefinitionBuilder.java
Thu Sep 17 18:39:00 2009
@@ -21,6 +21,7 @@
 import java.util.Arrays;
 
 import javax.jcr.nodetype.PropertyDefinition;
+import javax.jcr.PropertyType;
 
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValue;
@@ -33,10 +34,10 @@
  */
 public class QPropertyDefinitionBuilder extends QItemDefinitionBuilder {
 
-    private int requiredType;
+    private int requiredType = PropertyType.UNDEFINED;
     private List<QValueConstraint> valueConstraints = new ArrayList<QValueConstraint>();
     private List<QValue> defaultValues;
-    private boolean isMultiple;
+    private boolean isMultiple = false;
     private boolean fullTextSearchable = true;
     private boolean queryOrderable = true;
     private String[] queryOperators = Operator.getAllQueryOperators();

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QPropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QPropertyDefinitionImpl.java?rev=816326&r1=816325&r2=816326&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QPropertyDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/QPropertyDefinitionImpl.java
Thu Sep 17 18:39:00 2009
@@ -18,10 +18,8 @@
 
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QValueFactory;
-import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
-import org.apache.jackrabbit.spi.commons.conversion.IllegalNameException;
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
@@ -29,7 +27,6 @@
 import javax.jcr.nodetype.PropertyDefinition;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
-import javax.jcr.NamespaceException;
 
 /**
  * <code>QPropertyDefinitionImpl</code> implements a property
@@ -90,21 +87,4 @@
         }
         return defaultValues;
     }
-
-    /**
-     * Convert String jcr names to Name objects.
-     *
-     * @param aqos
-     * @param resolver
-     * @return
-     * @throws NamespaceException
-     * @throws IllegalNameException
-     */
-    private static Name[] convertQueryOperators(String[] aqos, NamePathResolver resolver)
throws NamespaceException, IllegalNameException {
-        Name[] names = new Name[aqos.length];
-        for (int i = 0; i < aqos.length; i++) {
-            names[i] = resolver.getQName(aqos[i]);
-        }
-        return names;
-    }
 }



Mime
View raw message