chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1548153 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server: BaseServiceValidatorImpl.java InMemoryRepositoryServiceImpl.java
Date Thu, 05 Dec 2013 14:37:18 GMT
Author: jens
Date: Thu Dec  5 14:37:18 2013
New Revision: 1548153

URL: http://svn.apache.org/r1548153
Log:
InMemory: fix build failure

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

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.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/BaseServiceValidatorImpl.java?rev=1548153&r1=1548152&r2=1548153&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java
Thu Dec  5 14:37:18 2013
@@ -457,7 +457,7 @@ public class BaseServiceValidatorImpl im
     protected void checkBasicType(TypeDefinition type)
     {
         if (type.getId() == type.getBaseTypeId().value())       
-            throw new CmisConstraintException("type " + type.getId() + " is a basic type,
basic types are read-only");  
+            throw new CmisInvalidArgumentException("type " + type.getId() + " is a basic
type, basic types are read-only");  
     }
     
     @Override
@@ -838,7 +838,7 @@ public class BaseServiceValidatorImpl im
             throw new CmisInvalidArgumentException(UNKNOWN_TYPE_ID + parentTypeId);
         }
         TypeDefinition parentType = parentTypeContainer.getTypeDefinition();
-        // check type mutability
+        // check if type can be created
         if (!(parentType.getTypeMutability().canCreate())) {
             throw new CmisConstraintException("parent type: " + parentTypeId + " does not
allow mutability create");
         }
@@ -853,7 +853,7 @@ public class BaseServiceValidatorImpl im
         TypeDefinition updateType = checkExistingTypeId(repositoryId, type.getId());
         checkUpdateType(updateType, type);
         checkBasicType(type);
-        // check type mutability
+        // check if type can be updated
         if (!(updateType.getTypeMutability().canUpdate())) {
             throw new CmisConstraintException("type: " + type.getId() + " does not allow
mutability update");
         }
@@ -869,7 +869,8 @@ public class BaseServiceValidatorImpl im
         checkRepositoryId(repositoryId);
         
         TypeDefinition deleteType =  checkExistingTypeId(repositoryId, typeId);
-        // check type mutability
+        checkBasicType(deleteType);
+        // check if type can be deleted
         if (!(deleteType.getTypeMutability().canDelete())) {
             throw new CmisConstraintException("type: " + typeId + " does not allow mutability
delete");
         }

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=1548153&r1=1548152&r2=1548153&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 14:37:18 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) {



Mime
View raw message