chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1548186 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory: server/ storedobj/impl/
Date Thu, 05 Dec 2013 16:12:01 GMT
Author: jens
Date: Thu Dec  5 16:12:00 2013
New Revision: 1548186

URL: http://svn.apache.org/r1548186
Log:
InMemory: fix tests for type validation

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRepositoryServiceImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/InMemoryServiceValidatorImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRepositoryServiceImpl.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/server/InMemoryRepositoryServiceImpl.java?rev=1548186&r1=1548185&r2=1548186&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRepositoryServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRepositoryServiceImpl.java
Thu Dec  5 16:12:00 2013
@@ -144,7 +144,7 @@ public class InMemoryRepositoryServiceIm
 
     public TypeDefinition createType(CallContext context, String repositoryId, TypeDefinition
type, ExtensionsData extension) {
 
-//        validator.createType(context, repositoryId, type, extension);        
+        validator.createType(context, repositoryId, type, extension);        
         TypeManager typeManager = fStoreManager.getTypeManager(repositoryId);
         AbstractTypeDefinition newType = TypeValidator.completeType(type);
         TypeValidator.adjustTypeNamesAndId(newType);
@@ -154,7 +154,7 @@ public class InMemoryRepositoryServiceIm
     }
 
     public TypeDefinition updateType(CallContext context, String repositoryId, TypeDefinition
type, ExtensionsData extension) {
-//        validator.updateType(context, repositoryId, type, extension);        
+        validator.updateType(context, repositoryId, type, extension);        
         String typeId = type.getId();
         TypeManager typeManager = fStoreManager.getTypeManager(repositoryId);
         if (null == typeManager) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/InMemoryServiceValidatorImpl.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/InMemoryServiceValidatorImpl.java?rev=1548186&r1=1548185&r2=1548186&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/InMemoryServiceValidatorImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/InMemoryServiceValidatorImpl.java
Thu Dec  5 16:12:00 2013
@@ -23,11 +23,13 @@ import java.util.List;
 import org.apache.chemistry.opencmis.commons.data.Acl;
 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.data.Properties;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
 import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.inmemory.server.BaseServiceValidatorImpl;
@@ -998,6 +1000,23 @@ public class InMemoryServiceValidatorImp
         return so;
     }
 
+    @Override
+    public void createType(CallContext callContext, String repositoryId, TypeDefinition type,
ExtensionsData extension) {
+        super.createType(callContext, repositoryId, type, extension);
+    }
+
+    @Override
+    public TypeDefinition updateType(CallContext callContext, String repositoryId, TypeDefinition
type,
+            ExtensionsData extension) {
+        throw new CmisNotSupportedException("Updating a type definition is not supported.");
+    }
+
+    @Override
+    public TypeDefinition deleteType(CallContext callContext, String repositoryId, String
typeId,
+            ExtensionsData extension) {
+        return super.deleteType(callContext, repositoryId, typeId, extension);
+    }
+
     private ObjectStoreImpl getObjectStore(String repositoryId) {
         return (ObjectStoreImpl) fStoreManager.getObjectStore(repositoryId);
     }



Mime
View raw message