chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1455682 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl: DocumentImpl.java DocumentVersionImpl.java StoredObjectImpl.java
Date Tue, 12 Mar 2013 19:42:25 GMT
Author: jens
Date: Tue Mar 12 19:42:25 2013
New Revision: 1455682

URL: http://svn.apache.org/r1455682
Log:
InMemory: return all properties that are in the type definition for * in filter

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java?rev=1455682&r1=1455681&r2=1455682&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
Tue Mar 12 19:42:25 2013
@@ -149,7 +149,7 @@ public class DocumentImpl extends Abstra
         // overwrite the version related properties
         if (FilterParser.isContainedInFilter(PropertyIds.VERSION_SERIES_ID, requestedIds))
{
             properties.put(PropertyIds.VERSION_SERIES_ID, objFactory.createPropertyIdData(
-                    PropertyIds.VERSION_SERIES_ID, (String)null));
+                    PropertyIds.VERSION_SERIES_ID, getId()));
         }
         if (FilterParser.isContainedInFilter(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT, requestedIds))
{
             properties.put(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT, objFactory.createPropertyBooleanData(
@@ -185,11 +185,9 @@ public class DocumentImpl extends Abstra
         }
         
         // CMIS 1.1
-        boolean cmis11 = InMemoryServiceContext.getCallContext().getCmisVersion() != CmisVersion.CMIS_1_0;
-
-        if (cmis11 && FilterParser.isContainedInFilter(PropertyIds.IS_PRIVATE_WORKING_COPY,
requestedIds)) {
+        if (FilterParser.isContainedInFilter(PropertyIds.IS_PRIVATE_WORKING_COPY, requestedIds))
{
             properties.put(PropertyIds.IS_PRIVATE_WORKING_COPY,
-                    objFactory.createPropertyBooleanData(PropertyIds.IS_PRIVATE_WORKING_COPY,
(Boolean) null));
+                    objFactory.createPropertyBooleanData(PropertyIds.IS_PRIVATE_WORKING_COPY,
false));
         }
         
     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java?rev=1455682&r1=1455681&r2=1455682&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
Tue Mar 12 19:42:25 2013
@@ -271,9 +271,7 @@ public class DocumentVersionImpl extends
         }
 
         // CMIS 1.1
-        boolean cmis11 = InMemoryServiceContext.getCallContext().getCmisVersion() != CmisVersion.CMIS_1_0;
-
-        if (cmis11 && FilterParser.isContainedInFilter(PropertyIds.IS_PRIVATE_WORKING_COPY,
requestedIds)) {
+        if (FilterParser.isContainedInFilter(PropertyIds.IS_PRIVATE_WORKING_COPY, requestedIds))
{
             properties.put(PropertyIds.IS_PRIVATE_WORKING_COPY,
                     objFactory.createPropertyBooleanData(PropertyIds.IS_PRIVATE_WORKING_COPY,
isPwc()));
         }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java?rev=1455682&r1=1455681&r2=1455682&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
Tue Mar 12 19:42:25 2013
@@ -188,8 +188,6 @@ public class StoredObjectImpl implements
     public void fillProperties(Map<String, PropertyData<?>> properties, BindingsObjectFactory
objFactory,
             List<String> requestedIds) {
         
-        boolean cmis11 = InMemoryServiceContext.getCallContext().getCmisVersion() != CmisVersion.CMIS_1_0;
-
         if (FilterParser.isContainedInFilter(PropertyIds.NAME, requestedIds)) {
             properties.put(PropertyIds.NAME, objFactory.createPropertyStringData(PropertyIds.NAME,
getName()));
         }
@@ -228,10 +226,15 @@ public class StoredObjectImpl implements
                     token));
         }
         
-        if (cmis11 && FilterParser.isContainedInFilter(PropertyIds.DESCRIPTION, requestedIds))
{
+        // CMIS 1.1 properties:
+        if (FilterParser.isContainedInFilter(PropertyIds.DESCRIPTION, requestedIds)) {
             properties.put(PropertyIds.DESCRIPTION, objFactory.createPropertyStringData(PropertyIds.DESCRIPTION,
                     description));
         }
+        if (FilterParser.isContainedInFilter(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, requestedIds))
{
+            properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, objFactory.createPropertyIdData(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
+                    secondaryTypeIds));
+        }            
 
         // add custom properties of type definition to the collection
         if (null != fProperties) {



Mime
View raw message