jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r811001 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ jackrabbit-core/...
Date Thu, 03 Sep 2009 15:44:21 GMT
Author: mreutegg
Date: Thu Sep  3 15:44:20 2009
New Revision: 811001

URL: http://svn.apache.org/viewvc?rev=811001&view=rev
Log:
JCR-2170: Remove PropDefId and NodeDefId

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/PropertyValueOperand.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/AuthorizableImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentReadWriteTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/DocumentViewTest.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
Thu Sep  3 15:44:20 2009
@@ -228,12 +228,11 @@
             LockException, ConstraintViolationException,
             RepositoryException {
         NodeImpl parent = (NodeImpl) getParent();
-        PropertyDefinition definition = data.getPropertyDefinition();
         // check multi-value flag
-        if (multipleValues != definition.isMultiple()) {
+        if (multipleValues != isMultiple()) {
             String msg = (multipleValues) ?
                     "Single-valued property can not be set to an array of values:" :
-                    "Multivalued property can not be set to a single value (an array of lenght
one is OK): ";
+                    "Multivalued property can not be set to a single value (an array of length
one is OK): ";
             throw new ValueFormatException(msg + this);
         }
 
@@ -416,7 +415,7 @@
      */
     public InternalValue[] internalGetValues() throws RepositoryException {
         final PropertyDefinition definition = data.getPropertyDefinition();
-        if (definition.isMultiple()) {
+        if (isMultiple()) {
             return getPropertyState().getValues();
         } else {
             throw new ValueFormatException(
@@ -435,7 +434,7 @@
      */
     public InternalValue internalGetValue() throws RepositoryException {
         final PropertyDefinition definition = data.getPropertyDefinition();
-        if (definition.isMultiple()) {
+        if (isMultiple()) {
             throw new ValueFormatException(
                     this + " is a multi-valued property,"
                     + " so it's values can only be retrieved as an array");
@@ -789,7 +788,7 @@
         // check state of this instance
         sanityCheck();
 
-        return data.getPropertyDefinition().isMultiple();
+        return getPropertyState().isMultiValued();
     }
 
     //-----------------------------------------------------------------< Item >

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
Thu Sep  3 15:44:20 2009
@@ -321,7 +321,7 @@
                         } else {
                             rememberNode(n.getPath());
                         }
-                        if (p.getDefinition().isMultiple()) {
+                        if (p.isMultiple()) {
                             p.getLengths();
                         } else {
                             p.getLength();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
Thu Sep  3 15:44:20 2009
@@ -341,7 +341,7 @@
                     return valueFactory.createValue(p);
                 } else if (n.hasProperty(col.getPropertyName())) {
                     Property p = n.getProperty(col.getPropertyName());
-                    if (p.getDefinition().isMultiple()) {
+                    if (p.isMultiple()) {
                         // mvp values cannot be returned
                         return null;
                     } else {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/PropertyValueOperand.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/PropertyValueOperand.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/PropertyValueOperand.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/PropertyValueOperand.java
Thu Sep  3 15:44:20 2009
@@ -104,7 +104,7 @@
         if (prop == null) {
             return EMPTY;
         } else {
-            if (prop.getDefinition().isMultiple()) {
+            if (prop.isMultiple()) {
                 return prop.getValues();
             } else {
                 return new Value[]{prop.getValue()};

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/AuthorizableImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/AuthorizableImpl.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/AuthorizableImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/AuthorizableImpl.java
Thu Sep  3 15:44:20 2009
@@ -185,7 +185,7 @@
         if (hasProperty(name)) {
             Property prop = node.getProperty(name);
             if (isAuthorizableProperty(prop)) {
-                if (prop.getDefinition().isMultiple()) {
+                if (prop.isMultiple()) {
                     return prop.getValues();
                 } else {
                     return new Value[] {prop.getValue()};
@@ -249,7 +249,7 @@
             if (node.hasProperty(name)) {
                 // 'node' is protected -> use setValue instead of Property.remove()
                 Property p = node.getProperty(name);
-                if (p.getDefinition().isMultiple()) {
+                if (p.isMultiple()) {
                     p.setValue((Value[]) null);
                 } else {
                     p.setValue((Value) null);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
Thu Sep  3 15:44:20 2009
@@ -222,7 +222,7 @@
                             Name propertyName = pItr.next();
                             if (node.hasProperty(propertyName)) {
                                 Property prop = node.getProperty(propertyName);
-                                if (prop.getDefinition().isMultiple()) {
+                                if (prop.isMultiple()) {
                                     Value[] values = prop.getValues();
                                     for (int i = 0; i < values.length && !match;
i++) {
                                         match = matches(value, values[i].getString(), exact);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
Thu Sep  3 15:44:20 2009
@@ -795,7 +795,7 @@
      * @throws RepositoryException if an error occurs
      */
     public void copyFrom(PropertyImpl prop) throws RepositoryException {
-        if (prop.getDefinition().isMultiple()) {
+        if (prop.isMultiple()) {
             InternalValue[] values = prop.internalGetValues();
             InternalValue[] copiedValues = new InternalValue[values.length];
             for (int i = 0; i < values.length; i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
Thu Sep  3 15:44:20 2009
@@ -418,7 +418,7 @@
                     && prop.getType() != PropertyType.WEAKREFERENCE) {
                 continue;
             }
-            if (prop.getDefinition().isMultiple()) {
+            if (prop.isMultiple()) {
                 Value[] values = prop.getValues();
                 Value[] newVals = new Value[values.length];
                 for (int i = 0; i < values.length; i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentReadWriteTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentReadWriteTest.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentReadWriteTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentReadWriteTest.java
Thu Sep  3 15:44:20 2009
@@ -64,7 +64,7 @@
                                 try {
                                     for (PropertyIterator it = n.getProperties(); it.hasNext();
) {
                                         Property p = it.nextProperty();
-                                        if (p.getDefinition().isMultiple()) {
+                                        if (p.isMultiple()) {
                                             p.getValues();
                                         } else {
                                             p.getValue();

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/DocumentViewTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/DocumentViewTest.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/DocumentViewTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/xml/DocumentViewTest.java
Thu Sep  3 15:44:20 2009
@@ -114,7 +114,7 @@
                 ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
         try {
             Property property = root.getProperty("multi-value-test/test");
-            assertTrue(message, property.getDefinition().isMultiple());
+            assertTrue(message, property.isMultiple());
             assertEquals(message, property.getValues().length, 2);
             assertTrue(message, property.getValues()[0].getBoolean());
             assertFalse(message, property.getValues()[1].getBoolean());

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java
Thu Sep  3 15:44:20 2009
@@ -357,7 +357,7 @@
 
         int type = property.getType();
         if (type != PropertyType.BINARY || binary) {
-            if (property.getDefinition().isMultiple()) {
+            if (property.isMultiple()) {
                 exportProperty(uri, local, type, property.getValues());
             } else {
                 exportProperty(uri, local, property.getValue());
@@ -365,7 +365,7 @@
         } else {
             ValueFactory factory = session.getValueFactory();
             Value value = factory.createValue("", PropertyType.BINARY);
-            if (property.getDefinition().isMultiple()) {
+            if (property.isMultiple()) {
                 exportProperty(uri, local, type, new Value[] { value });
             } else {
                 exportProperty(uri, local, value);

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
Thu Sep  3 15:44:20 2009
@@ -162,14 +162,14 @@
             // mark binary properties with a leading ':'
             // the value(s) reflect the jcr-values length instead of the binary data.
             String key = ":" + p.getName();
-            if (p.getDefinition().isMultiple()) {
+            if (p.isMultiple()) {
                 long[] binLengths = p.getLengths();
                 writeKeyArray(w, key, binLengths);
             } else {
                 writeKeyValue(w, key, p.getLength());
             }
         } else {
-            boolean isMultiple = p.getDefinition().isMultiple();
+            boolean isMultiple = p.isMultiple();
             if (type == PropertyType.NAME || type == PropertyType.PATH ||
                     type == PropertyType.REFERENCE || type == PropertyType.DATE ||
                     (isMultiple && p.getValues().length == 0)) {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
Thu Sep  3 15:44:20 2009
@@ -335,7 +335,7 @@
      */
     private boolean isMultiple() {
         try {
-            if (exists() && ((Property)item).getDefinition().isMultiple()) {
+            if (exists() && ((Property)item).isMultiple()) {
                 return true;
             }
         } catch (RepositoryException e) {

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/PropertyLengthTest.java
Thu Sep  3 15:44:20 2009
@@ -99,7 +99,7 @@
     }
 
     private static void checkLength(Property p) throws RepositoryException {
-        if (p.getDefinition().isMultiple()) {
+        if (p.isMultiple()) {
             Value[] vals = p.getValues();
             long[] lengths = p.getLengths();
             for (int i = 0; i < lengths.length; i++) {

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java?rev=811001&r1=811000&r2=811001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/PropertyInfoImpl.java
Thu Sep  3 15:44:20 2009
@@ -50,7 +50,7 @@
             throws RepositoryException, NameException {
         super(resolver.getQPath(property.getPath()),
                 idFactory.createPropertyId(property, resolver),
-                property.getType(), property.getDefinition().isMultiple(),
+                property.getType(), property.isMultiple(),
                 getValues(property, resolver, qValueFactory));
     }
 
@@ -67,7 +67,7 @@
                                       NamePathResolver resolver,
                                       QValueFactory factory)
             throws RepositoryException {
-        boolean isMultiValued = property.getDefinition().isMultiple();
+        boolean isMultiValued = property.isMultiple();
         QValue[] values;
         if (isMultiValued) {
             Value[] jcrValues = property.getValues();



Mime
View raw message