Return-Path: Delivered-To: apmail-incubator-chemistry-commits-archive@minotaur.apache.org Received: (qmail 4119 invoked from network); 16 Feb 2010 16:05:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2010 16:05:44 -0000 Received: (qmail 32584 invoked by uid 500); 16 Feb 2010 16:05:44 -0000 Delivered-To: apmail-incubator-chemistry-commits-archive@incubator.apache.org Received: (qmail 32536 invoked by uid 500); 16 Feb 2010 16:05:44 -0000 Mailing-List: contact chemistry-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-commits@incubator.apache.org Received: (qmail 32526 invoked by uid 99); 16 Feb 2010 16:05:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2010 16:05:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Tue, 16 Feb 2010 16:05:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AFD352388C14; Tue, 16 Feb 2010 16:04:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r910572 [20/36] - in /incubator/chemistry/trunk/opencmis: ./ _dev/ opencmis-client/ opencmis-client/opencmis-client-api/ opencmis-client/opencmis-client-api/src/ opencmis-client/opencmis-client-api/src/main/ opencmis-client/opencmis-client-... Date: Tue, 16 Feb 2010 16:04:07 -0000 To: chemistry-commits@incubator.apache.org From: dcaruana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100216160417.AFD352388C14@eris.apache.org> Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl (added) +++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl Tue Feb 16 16:03:38 2010 @@ -0,0 +1,1165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/xml.xsd URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/xml.xsd?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/xml.xsd (added) +++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/xml.xsd Tue Feb 16 16:03:38 2010 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + See http://www.w3.org/TR/xml-id/ for + information about this attribute. + + + + + + + + + + + \ No newline at end of file Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/xml.xsd ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/log4j.properties URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/log4j.properties?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/log4j.properties (added) +++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/log4j.properties Tue Feb 16 16:03:38 2010 @@ -0,0 +1,22 @@ +#sample log4j.properties + +log4j.rootCategory=DEBUG, R, O + +# Stdout +log4j.appender.O=org.apache.log4j.ConsoleAppender + +# File +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=log4j.log + +# Control the maximum log file size +log4j.appender.R.MaxFileSize=100KB + +# Archive log files (one backup file here) +log4j.appender.R.MaxBackupIndex=1 +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.O.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n +log4j.appender.O.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n + +log4j.logger.org.apache.opencmis.client.provider.spi=O \ No newline at end of file Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/log4j.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/ConverterTest.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/ConverterTest.java?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/ConverterTest.java (added) +++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/ConverterTest.java Tue Feb 16 16:03:38 2010 @@ -0,0 +1,242 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.opencmis.commons.impl.misc; + +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import junit.framework.TestCase; + +import org.apache.opencmis.commons.api.TypeDefinition; +import org.apache.opencmis.commons.enums.AclPropagation; +import org.apache.opencmis.commons.enums.BaseObjectTypeIds; +import org.apache.opencmis.commons.enums.CapabilityAcl; +import org.apache.opencmis.commons.enums.CapabilityChanges; +import org.apache.opencmis.commons.enums.CapabilityContentStreamUpdates; +import org.apache.opencmis.commons.enums.CapabilityJoin; +import org.apache.opencmis.commons.enums.CapabilityQuery; +import org.apache.opencmis.commons.enums.CapabilityRendition; +import org.apache.opencmis.commons.enums.ContentStreamAllowed; +import org.apache.opencmis.commons.impl.Converter; +import org.apache.opencmis.commons.impl.dataobjects.AclCapabilitiesDataImpl; +import org.apache.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl; +import org.apache.opencmis.commons.impl.dataobjects.ObjectDataImpl; +import org.apache.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl; +import org.apache.opencmis.commons.impl.dataobjects.PermissionMappingDataImpl; +import org.apache.opencmis.commons.impl.dataobjects.RepositoryCapabilitiesDataImpl; +import org.apache.opencmis.commons.impl.dataobjects.RepositoryInfoDataImpl; +import org.apache.opencmis.commons.provider.ObjectData; +import org.apache.opencmis.commons.provider.PermissionDefinitionData; +import org.apache.opencmis.commons.provider.PermissionMappingData; +import org.apache.opencmis.commons.provider.RepositoryInfoData; + +/** + * Tests converter methods. + * + * @author Florian Müller + * + */ +public class ConverterTest extends TestCase { + + public void testRepositoryInfo() throws Exception { + // dry run + RepositoryInfoDataImpl obj1 = new RepositoryInfoDataImpl(); + RepositoryInfoData obj2 = Converter.convert(Converter.convert(obj1)); + + assertDataObjectsEquals("RepositoryInfo", obj1, obj2); + + // values + obj1 = new RepositoryInfoDataImpl(); + obj1.setChangesIncomplete(Boolean.TRUE); + obj1.setChangesOnType(Collections.singletonList(BaseObjectTypeIds.CMIS_DOCUMENT)); + obj1.setCmisVersionSupported("1.0"); + obj1.setLatestChangeLogToken("changeLogToken"); + obj1.setPrincipalAnonymous("principalAnonymous"); + obj1.setPrincipalAnyone("principalAnyone"); + obj1.setProductName("productName"); + obj1.setProductVersion("productVersion"); + obj1.setRepositoryDescription("description"); + obj1.setRepositoryId("id"); + obj1.setRepositoryName("name"); + obj1.setRootFolder("rootFolderId"); + obj1.setThinClientUri("thinClientUri"); + obj1.setVendorName("vendorName"); + + RepositoryCapabilitiesDataImpl cap1 = new RepositoryCapabilitiesDataImpl(); + cap1.setAllVersionsSearchable(Boolean.TRUE); + cap1.setCapabilityAcl(CapabilityAcl.DISCOVER); + cap1.setCapabilityChanges(CapabilityChanges.ALL); + cap1.setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates.ANYTIME); + cap1.setCapabilityJoin(CapabilityJoin.INNERANDOUTER); + cap1.setCapabilityQuery(CapabilityQuery.BOTHCOMBINED); + cap1.setCapabilityRendition(CapabilityRendition.READ); + cap1.setIsPwcSearchable(Boolean.TRUE); + cap1.setIsPwcUpdatable(Boolean.TRUE); + cap1.setSupportsGetDescendants(Boolean.TRUE); + cap1.setSupportsGetFolderTree(Boolean.TRUE); + cap1.setSupportsMultifiling(Boolean.TRUE); + cap1.setSupportsUnfiling(Boolean.TRUE); + cap1.setSupportsVersionSpecificFiling(Boolean.TRUE); + obj1.setRepositoryCapabilities(cap1); + + AclCapabilitiesDataImpl acl1 = new AclCapabilitiesDataImpl(); + acl1.setAclPropagation(AclPropagation.PROPAGATE); + List pddList = new ArrayList(); + PermissionDefinitionDataImpl pdd1 = new PermissionDefinitionDataImpl(); + pdd1.setPermission("test:perm1"); + pdd1.setDescription("Permission1"); + pddList.add(pdd1); + PermissionDefinitionDataImpl pdd2 = new PermissionDefinitionDataImpl(); + pdd2.setPermission("test:perm2"); + pdd2.setDescription("Permission2"); + pddList.add(pdd2); + acl1.setPermissionDefinitionData(pddList); + List pmdList = new ArrayList(); + PermissionMappingDataImpl pmd1 = new PermissionMappingDataImpl(); + pmd1.setKey(PermissionMappingData.KEY_CAN_CREATE_DOCUMENT_FOLDER); + pmd1.setPermissions(Arrays.asList(new String[] { "p1", "p2" })); + pmdList.add(pmd1); + PermissionMappingDataImpl pmd2 = new PermissionMappingDataImpl(); + pmd2.setKey(PermissionMappingData.KEY_CAN_DELETE_OBJECT); + pmd2.setPermissions(Arrays.asList(new String[] { "p3", "p4" })); + pmdList.add(pmd2); + acl1.setPermissionMappingData(pmdList); + obj1.setAclCapabilities(acl1); + + obj2 = Converter.convert(Converter.convert(obj1)); + + assertDataObjectsEquals("RepositoryInfo", obj1, obj2); + } + + public void testTypeDefinition() throws Exception { + // dry run + DocumentTypeDefinitionImpl obj1 = new DocumentTypeDefinitionImpl(); + TypeDefinition obj2 = Converter.convert(Converter.convert(obj1)); + + assertDataObjectsEquals("TypeDefinition", obj1, obj2); + + // simple values + obj1 = new DocumentTypeDefinitionImpl(); + obj1.setBaseId(BaseObjectTypeIds.CMIS_DOCUMENT); + obj1.setContentStreamAllowed(ContentStreamAllowed.ALLOWED); + obj1.setDescription("description"); + obj1.setDisplayName("displayName"); + obj1.setId("id"); + obj1.setIsControllableAcl(Boolean.TRUE); + obj1.setIsControllablePolicy(Boolean.TRUE); + obj1.setIsCreatable(Boolean.TRUE); + obj1.setIsFileable(Boolean.TRUE); + obj1.setIsIncludedInSupertypeQuery(Boolean.TRUE); + obj1.setIsQueryable(Boolean.TRUE); + obj1.setIsVersionable(Boolean.TRUE); + obj1.setLocalName("localName"); + obj1.setLocalNamespace("localNamespace"); + obj1.setParentId("parentId"); + obj1.setQueryName("queryName"); + + obj2 = Converter.convert(Converter.convert(obj1)); + + assertDataObjectsEquals("TypeDefinition", obj1, obj2); + } + + public void testObject() throws Exception { + // dry run + ObjectDataImpl obj1 = new ObjectDataImpl(); + ObjectData obj2 = Converter.convert(Converter.convert(obj1)); + + assertDataObjectsEquals("Object", obj1, obj2); + } + + /** + * Asserts OpenCMIS data objects. + */ + protected void assertDataObjectsEquals(String name, Object expected, Object actual) + throws Exception { + System.out.println(name); + + if ((expected == null) && (actual == null)) { + return; + } + + if ((expected == null) || (actual == null)) { + fail("Data object is null! name: " + name + " / expected: " + expected + " / actual: " + + actual); + } + + // handle simple types + if ((expected instanceof String) || (expected instanceof Boolean) + || (expected instanceof BigInteger) || (expected instanceof BigDecimal) + || (expected instanceof Enum)) { + assertEquals(expected, actual); + + return; + } + else if (expected instanceof List) { + List expectedList = (List) expected; + List actualList = (List) actual; + + assertEquals(expectedList.size(), actualList.size()); + + for (int i = 0; i < expectedList.size(); i++) { + assertDataObjectsEquals(name + "[" + i + "]", expectedList.get(i), actualList.get(i)); + } + + return; + } + else if (expected instanceof Map) { + Map expectedMap = (Map) expected; + Map actualMap = (Map) actual; + + assertEquals(expectedMap.size(), actualMap.size()); + + for (Map.Entry entry : expectedMap.entrySet()) { + assertTrue(actualMap.containsKey(entry.getKey())); + assertDataObjectsEquals(name + "[" + entry.getKey() + "]", entry.getValue(), actualMap + .get(entry.getKey())); + } + + return; + } + + for (Method m : expected.getClass().getMethods()) { + if (!m.getName().startsWith("get") && !m.getName().startsWith("supports")) { + continue; + } + + if (m.getName().equals("getClass")) { + continue; + } + + if (m.getParameterTypes().length != 0) { + continue; + } + + Object expectedValue = m.invoke(expected, new Object[0]); + Object actualValue = m.invoke(actual, new Object[0]); + + assertDataObjectsEquals(name + "." + m.getName(), expectedValue, actualValue); + } + } +} Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/ConverterTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/MiscTest.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/MiscTest.java?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/MiscTest.java (added) +++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/MiscTest.java Tue Feb 16 16:03:38 2010 @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.opencmis.commons.impl.misc; + +import org.apache.opencmis.commons.impl.UrlBuilder; + +import junit.framework.TestCase; + +/** + * Tests miscellaneous details. + * + * @author Florian Müller + * + */ +public class MiscTest extends TestCase { + + public void testUrlBuilder() { + assertEquals("http://host/test", (new UrlBuilder("http://host/test")).toString()); + assertEquals("http://host/test?query=value", (new UrlBuilder("http://host/test?query=value")) + .toString()); + assertEquals("http://host/test", (new UrlBuilder("http://host/test?")).toString()); + + UrlBuilder urlBuilder; + + urlBuilder = new UrlBuilder("http://host/test"); + urlBuilder.addParameter("query", "value"); + assertEquals("http://host/test?query=value", urlBuilder.toString()); + + urlBuilder = new UrlBuilder("http://host/test"); + urlBuilder.addPath("path"); + assertEquals("http://host/test/path", urlBuilder.toString()); + + urlBuilder = new UrlBuilder("http://host/test/"); + urlBuilder.addPath("path"); + assertEquals("http://host/test/path", urlBuilder.toString()); + + urlBuilder = new UrlBuilder("http://host/test"); + urlBuilder.addPath("/path"); + assertEquals("http://host/test/path", urlBuilder.toString()); + + urlBuilder = new UrlBuilder("http://host/test/"); + urlBuilder.addPath("/path"); + assertEquals("http://host/test/path", urlBuilder.toString()); + } +} Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/test/java/org/apache/opencmis/commons/impl/misc/MiscTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Feb 16 16:03:38 2010 @@ -0,0 +1,6 @@ +bin +target +*.iws +*.ipr +*.iml +.* Added: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/pom.xml URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/pom.xml?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/pom.xml (added) +++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/pom.xml Tue Feb 16 16:03:38 2010 @@ -0,0 +1,69 @@ + + + + + 4.0.0 + + + org.opencmis + opencmis + 0.1-SNAPSHOT + ../../pom.xml + + + opencmis-server-fileshare + OpenCMIS FileShare Server Implementation + war + + + + + org.apache.maven.plugins + maven-war-plugin + + + + + + org.opencmis + opencmis-server-impl + + + + + + + + + + org.opencmis + opencmis-commons-api + ${version} + + + org.opencmis + opencmis-commons-impl + ${version} + + + org.opencmis + opencmis-provider-impl + ${version} + + + org.opencmis + opencmis-server-spi + ${version} + + + org.opencmis + opencmis-server-impl + ${version} + war + + + + Propchange: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/AclService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/AclService.java?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/AclService.java (added) +++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/AclService.java Tue Feb 16 16:03:38 2010 @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.opencmis.fileshare; + +import org.apache.opencmis.commons.api.ExtensionsData; +import org.apache.opencmis.commons.enums.AclPropagation; +import org.apache.opencmis.commons.exceptions.CmisNotSupportedException; +import org.apache.opencmis.commons.provider.AccessControlList; +import org.apache.opencmis.server.spi.CallContext; +import org.apache.opencmis.server.spi.CmisAclService; + +/** + * ACL Service. + * + * @author Florian Müller + * + */ +public class AclService implements CmisAclService { + + private RepositoryMap fRepositoryMap; + + /** + * Constructor. + */ + public AclService(RepositoryMap repositoryMap) { + fRepositoryMap = repositoryMap; + } + + /* + * (non-Javadoc) + * + * @see org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis.server.spi.CallContext, + * java.lang.String, java.lang.String, org.apache.opencmis.commons.provider.AccessControlList, + * org.apache.opencmis.commons.enums.AclPropagation) + */ + public AccessControlList applyAcl(CallContext context, String repositoryId, String objectId, + AccessControlList aces, AclPropagation aclPropagation) { + fRepositoryMap.getAuthenticatedRepository(context, repositoryId); + throw new CmisNotSupportedException("applyAcl not supported!"); + } + + /* + * (non-Javadoc) + * + * @see org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis.server.spi.CallContext, + * java.lang.String, java.lang.String, org.apache.opencmis.commons.provider.AccessControlList, + * org.apache.opencmis.commons.provider.AccessControlList, org.apache.opencmis.commons.enums.AclPropagation, + * org.apache.opencmis.commons.api.ExtensionsData) + */ + public AccessControlList applyAcl(CallContext context, String repositoryId, String objectId, + AccessControlList addAces, AccessControlList removeAces, AclPropagation aclPropagation, + ExtensionsData extension) { + fRepositoryMap.getAuthenticatedRepository(context, repositoryId); + throw new CmisNotSupportedException("applyAcl not supported!"); + } + + /* + * (non-Javadoc) + * + * @see org.apache.opencmis.server.spi.CmisAclService#getAcl(org.apache.opencmis.server.spi.CallContext, + * java.lang.String, java.lang.String, java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData) + */ + public AccessControlList getAcl(CallContext context, String repositoryId, String objectId, + Boolean onlyBasicPermissions, ExtensionsData extension) { + return fRepositoryMap.getAuthenticatedRepository(context, repositoryId).getAcl(context, + objectId, objectId); + } +} Propchange: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/AclService.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/DocumentInfo.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/DocumentInfo.java?rev=910572&view=auto ============================================================================== --- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/DocumentInfo.java (added) +++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/DocumentInfo.java Tue Feb 16 16:03:38 2010 @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.opencmis.fileshare; + +import org.apache.opencmis.commons.enums.BaseObjectTypeIds; +import org.apache.opencmis.server.spi.ObjectInfoImpl; + +public class DocumentInfo extends ObjectInfoImpl { + + public DocumentInfo() { + setBaseType(BaseObjectTypeIds.CMIS_DOCUMENT); + setHasAcl(true); + setHasContent(true); + setHasParent(true); + setHasVersionHistory(false); + setIsCurrentVersion(true); + setRelationshipSourceIds(null); + setRelationshipTargetIds(null); + setRenditionInfos(null); + setSupportsDescendants(false); + setSupportsFolderTree(false); + setSupportsPolicies(false); + setSupportsRelationships(false); + setWorkingCopyId(null); + setWorkingCopyOriginalId(null); + } + +} Propchange: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/DocumentInfo.java ------------------------------------------------------------------------------ svn:eol-style = native