Return-Path: Delivered-To: apmail-incubator-chemistry-commits-archive@minotaur.apache.org Received: (qmail 23498 invoked from network); 9 May 2009 00:36:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 May 2009 00:36:25 -0000 Received: (qmail 57660 invoked by uid 500); 9 May 2009 00:36:25 -0000 Delivered-To: apmail-incubator-chemistry-commits-archive@incubator.apache.org Received: (qmail 57632 invoked by uid 500); 9 May 2009 00:36:25 -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 Delivered-To: moderator for chemistry-commits@incubator.apache.org Received: (qmail 79348 invoked by uid 99); 8 May 2009 19:53:26 -0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r773069 [4/6] - in /incubator/chemistry/trunk/chemistry: ./ chemistry-api/src/main/java/org/apache/chemistry/ chemistry-api/src/main/java/org/apache/chemistry/property/ chemistry-api/src/main/java/org/apache/chemistry/repository/ chemistry-... Date: Fri, 08 May 2009 19:52:44 -0000 To: chemistry-commits@incubator.apache.org From: fguillaume@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090508195248.8AF202388D4C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/MainServlet.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/MainServlet.java?rev=773069&r1=773068&r2=773069&view=diff ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/MainServlet.java (original) +++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/MainServlet.java Fri May 8 19:52:42 2009 @@ -20,11 +20,13 @@ import javax.servlet.Servlet; +import org.apache.chemistry.Repository; import org.apache.chemistry.atompub.server.CMISServlet; -import org.apache.chemistry.repository.Repository; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.mortbay.jetty.Connector; import org.mortbay.jetty.Server; +import org.mortbay.jetty.bio.SocketConnector; import org.mortbay.jetty.servlet.Context; import org.mortbay.jetty.servlet.ServletHolder; @@ -38,24 +40,33 @@ private static final Log log = LogFactory.getLog(MainServlet.class); + // use a fixed root id, this helps with caching in some clients + public static final String ROOT_ID = "b7666828-f1aa-41e1-9d0a-94a7898ae569"; + private static final int MINUTES = 60 * 1000; // in ms + public static final String HOST = "0.0.0.0"; + public static final int PORT = 8080; public static final String SERVLET_PATH = "/cmis"; public static final String CMIS_SERVICE = "/repository"; - public static void main(String[] args) throws Exception { - Repository repository = RepositoryTestFactory.makeRepository(); - Server server = new Server(PORT); + Repository repository = RepositoryCreationHelper.makeRepository(ROOT_ID); + Server server = new Server(); + Connector connector = new SocketConnector(); + connector.setHost(HOST); + connector.setPort(PORT); + server.setConnectors(new Connector[] { connector }); Servlet servlet = new CMISServlet(repository); ServletHolder servletHolder = new ServletHolder(servlet); Context context = new Context(server, SERVLET_PATH, Context.SESSIONS); context.addServlet(servletHolder, "/*"); server.start(); - String url = "http://localhost:" + PORT + SERVLET_PATH + CMIS_SERVICE; + String url = "http://" + HOST + ':' + PORT + SERVLET_PATH + + CMIS_SERVICE; log.info("CMIS server started, AtomPub service url: " + url); Thread.sleep(60 * MINUTES); server.stop(); Copied: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java (from r773055, incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryTestFactory.java) URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java?p2=incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java&p1=incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryTestFactory.java&r1=773055&r2=773069&rev=773069&view=diff ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryTestFactory.java (original) +++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java Fri May 8 19:52:42 2009 @@ -1,5 +1,5 @@ /* - * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors. + * (C) Copyright 2009 Nuxeo SA (http://nuxeo.com/) and contributors. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License @@ -12,7 +12,7 @@ * Lesser General Public License for more details. * * Contributors: - * matic + * Florent Guillaume */ package org.apache.chemistry.test; @@ -20,38 +20,44 @@ import java.io.InputStream; import java.util.Arrays; +import org.apache.chemistry.BaseType; import org.apache.chemistry.Connection; import org.apache.chemistry.ContentStream; +import org.apache.chemistry.ContentStreamPresence; import org.apache.chemistry.Document; import org.apache.chemistry.Folder; +import org.apache.chemistry.PropertyDefinition; +import org.apache.chemistry.PropertyType; +import org.apache.chemistry.Repository; +import org.apache.chemistry.Updatability; import org.apache.chemistry.impl.simple.SimpleContentStream; import org.apache.chemistry.impl.simple.SimplePropertyDefinition; import org.apache.chemistry.impl.simple.SimpleRepository; import org.apache.chemistry.impl.simple.SimpleType; -import org.apache.chemistry.property.PropertyType; -import org.apache.chemistry.property.Updatability; -import org.apache.chemistry.type.BaseType; -import org.apache.chemistry.type.ContentStreamPresence; /** - * @author matic + * Helpers to create a basic repository. * + * @author Florent Guillaume */ -public class RepositoryTestFactory { +public class RepositoryCreationHelper { + + private RepositoryCreationHelper() { + } public static final String TEST_FILE_CONTENT = "This is a test file.\nTesting, testing...\n"; - public static SimpleRepository makeRepository() throws IOException { - SimplePropertyDefinition p1 = new SimplePropertyDefinition("title", + public static Repository makeRepository(String rootId) throws IOException { + PropertyDefinition p1 = new SimplePropertyDefinition("title", "def:title", "Title", "", false, PropertyType.STRING, false, null, false, false, "", Updatability.READ_WRITE, true, true, 0, null, null, -1, null, null); - SimplePropertyDefinition p2 = new SimplePropertyDefinition( - "description", "def:description", "Description", "", false, + PropertyDefinition p2 = new SimplePropertyDefinition("description", + "def:description", "Description", "", false, PropertyType.STRING, false, null, false, false, "", Updatability.READ_WRITE, true, true, 0, null, null, -1, null, null); - SimplePropertyDefinition p3 = new SimplePropertyDefinition("date", + PropertyDefinition p3 = new SimplePropertyDefinition("date", "def:date", "Date", "", false, PropertyType.DATETIME, false, null, false, false, null, Updatability.READ_WRITE, true, true, 0, null, null, -1, null, null); @@ -64,7 +70,7 @@ false, false, ContentStreamPresence.NOT_ALLOWED, null, null, Arrays.asList(p1, p2)); SimpleRepository repo = new SimpleRepository("test", Arrays.asList(dt, - ft)); + ft), rootId); Connection conn = repo.getConnection(null); Folder root = conn.getRootFolder(); Added: incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml?rev=773069&view=auto ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml (added) +++ incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml Fri May 8 19:52:42 2009 @@ -0,0 +1,98 @@ + + + + + + + 4.0.0 + + + org.apache.chemistry + chemistry-parent + 0.1-SNAPSHOT + + + chemistry-ws + Chemistry WebServices + + + 2.2.1 + + + + + org.apache.chemistry + chemistry-api + + + + javax.xml.bind + jaxb-api + 2.1 + runtime + + + + + + + + + org.apache.cxf + cxf-codegen-plugin + ${cxf.version} + + + generate-sources + + ${basedir}/target/generated + + + ${basedir}/src/main/resources/wsdl/CMISWS-Service.wsdl + + -p + org.apache.chemistry.ws + -wsdlLocation + wsdl/CMISWS-Service.wsdl + + + + + + wsdl2java + + + + + + + + Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/pom.xml ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd?rev=773069&view=auto ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd (added) +++ incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd Fri May 8 19:52:42 2009 @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd?rev=773069&view=auto ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd (added) +++ incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd Fri May 8 19:52:42 2009 @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The "atom:link" element defines a reference from an + entry or feed to a Web resource. This specification + assigns no meaning to the content (if any) of this + element. + + + + + + + + + + + + + + + + + + + + + + + + + + + atom:source is used to preserve metadata of a feed when + an entry is copied from a feed to another feed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The "atom:title" element is a Text construct that + conveys a human- readable title for an entry or feed. + atomTitle = element atom:title { atomTextConstruct }. + + + + + + + + The "atom:updated" element is a Date construct + indicating the most recent instant in time when an entry + or feed was modified in a way the publisher considers + significant. Therefore, not all modifications + necessarily result in a changed atom:updated value. + atomUpdated = element atom:updated { atomDateConstruct + }. Publishers MAY change the value of this element over + time. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd?rev=773069&view=auto ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd (added) +++ incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd Fri May 8 19:52:42 2009 @@ -0,0 +1,1217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd ------------------------------------------------------------------------------ svn:keywords = Id