Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 215FA102E4 for ; Thu, 5 Dec 2013 14:37:48 +0000 (UTC) Received: (qmail 69571 invoked by uid 500); 5 Dec 2013 14:37:47 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 69501 invoked by uid 500); 5 Dec 2013 14:37:44 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 69376 invoked by uid 99); 5 Dec 2013 14:37:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 14:37:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 14:37:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F16652388994; Thu, 5 Dec 2013 14:37:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@chemistry.apache.org From: jens@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131205143718.F16652388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {