chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r783850 [1/3] - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/main/java/org/apache/chemist...
Date Thu, 11 Jun 2009 17:09:48 GMT
Author: fguillaume
Date: Thu Jun 11 17:09:45 2009
New Revision: 783850

URL: http://svn.apache.org/viewvc?rev=783850&view=rev
Log:
Move classes around for clarity, get rid of unused code

Added:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java   (contents, props changed)
      - copied, changed from r783061, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPDocument.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPFolder.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObject.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPPropertyDefinition.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java   (contents, props changed)
      - copied, changed from r783061, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryInfo.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPServiceDocumentReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPType.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/APPContentManager.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Connector.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/DefaultIOProvider.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/DefaultIOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientConnector.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/httpclient/HttpClientConnector.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/HttpClientResponse.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/httpclient/HttpClientResponse.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/IOProvider.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/IOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Request.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Request.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Response.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Response.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/httpclient/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/
      - copied from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/
      - copied from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/atom/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/
      - copied from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/common/atom/
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/Atom.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/atom/ATOM.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/ChildrenIterator.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ChildrenIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/ChildrenNavigator.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ChildrenNavigator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/ElementIterator.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ElementIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/FilteredChildrenNavigator.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/FilteredChildrenNavigator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/ParseException.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ParseException.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/SiblingsIterator.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/SiblingsIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/StaxReader.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/StaxReader.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/xml/stax/XMLWriter.java   (contents, props changed)
      - copied, changed from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/XMLWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/xml/
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/xml/stax/
      - copied from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/common/xml/
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/resources/
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/resources/xmlwriter-output.xml   (props changed)
      - copied unchanged from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/xmlwriter-output.xml
Removed:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/Credentials.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/CredentialsProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/NoSuchRepositoryException.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/APPContentManager.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Connector.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/DefaultCredentialsProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/DefaultIOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/IOProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Request.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Response.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/httpclient/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/AdapterFactory.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/DateParser.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/atom/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ChildrenIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ChildrenNavigator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ElementIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/FilteredChildrenNavigator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/ParseException.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/SiblingsIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/StaxReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/common/xml/XMLWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPDocument.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPFolder.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPObject.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPObjectEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPObjectEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPObjectEntryWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPObjectFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPPropertyDefinition.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPRepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPRepositoryInfo.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPServiceDocumentReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/APPType.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/TypeEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/model/TypeFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ATOM.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/DefaultEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ListFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/common/atom/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/common/xml/
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/xmlwriter-output.xml
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ContentManager.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractFeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractObjectReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/AbstractXmlObjectWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/EntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/FeedReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ObjectEntryWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ReadContext.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ValueAdapter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ValueIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/XmlObject.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/XmlObjectWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/XmlProperty.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/pom.xml
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimplePropertyDefinition.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/xml/stax/TestXMLWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-tests/src/test/java/org/apache/chemistry/test/TestAtomPubClientServer.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java?rev=783850&r1=783849&r2=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java Thu Jun 11 17:09:45 2009
@@ -16,6 +16,9 @@
  */
 package org.apache.chemistry;
 
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -48,69 +51,70 @@
      * A string property, represented as a {@link String}.
      */
     public static final PropertyType STRING = register(new PropertyType(
-            "string", STRING_ORD));
+            "string", STRING_ORD, String.class));
 
     /**
-     * A decimal property, represented as a {@link java.math.BigDecimal
-     * BigDecimal}.
+     * A decimal property, represented as a {@link BigDecimal}.
      */
     public static final PropertyType DECIMAL = register(new PropertyType(
-            "decimal", DECIMAL_ORD));
+            "decimal", DECIMAL_ORD, BigDecimal.class));
 
     /**
      * An integer property, represented as a {@link Integer}.
      */
     public static final PropertyType INTEGER = register(new PropertyType(
-            "integer", INTEGER_ORD));
+            "integer", INTEGER_ORD, Integer.class));
 
     /**
      * A boolean property, represented as a {@link Boolean}.
      */
     public static final PropertyType BOOLEAN = register(new PropertyType(
-            "boolean", BOOLEAN_ORD));
+            "boolean", BOOLEAN_ORD, Boolean.class));
 
     /**
-     * A date-time property, represented as a {@link java.util.Calendar
-     * Calendar}.
+     * A date-time property, represented as a {@link Calendar}.
      */
     public static final PropertyType DATETIME = register(new PropertyType(
-            "datetime", DATETIME_ORD));
+            "datetime", DATETIME_ORD, Calendar.class));
 
     /**
-     * A URI property, represented as a {@link java.net.URI URI}.
+     * A URI property, represented as a {@link URI}.
      */
     public static final PropertyType URI = register(new PropertyType("uri",
-            URI_ORD));
+            URI_ORD, URI.class));
 
     /**
      * An ID property, represented as a {@link String}.
      */
     public static final PropertyType ID = register(new PropertyType("id",
-            ID_ORD));
+            ID_ORD, String.class));
 
     /**
      * An XML property, represented as a String.
      */
     public static final PropertyType XML = register(new PropertyType("xml",
-            XML_ORD));
+            XML_ORD, String.class));
 
     /**
      * An HTML property, represented as a String.
      */
     public static final PropertyType HTML = register(new PropertyType("html",
-            HTML_ORD));
+            HTML_ORD, String.class));
 
     private final String name;
 
     private final int ordinal;
 
+    private final Class<?> klass;
+
     /**
      * Protected constructor. The {@link #register} static method should be used
      * by implementors to register new property types or subclasses of it.
      */
-    protected PropertyType(String name, int ordinal) {
+    protected PropertyType(String name, int ordinal, Class<?> klass) {
         this.name = name;
         this.ordinal = ordinal;
+        this.klass = klass;
     }
 
     /**
@@ -140,7 +144,9 @@
      * @param name the name
      * @return the property type, or {@code null} if not found
      */
-    public static synchronized PropertyType get(String name) {
+    // not synchronized, for speed, as we assume this won't be called while
+    // registration is in progress
+    public static PropertyType get(String name) {
         return all.get(name);
     }
 
@@ -159,6 +165,13 @@
         return ordinal;
     }
 
+    /**
+     * The Java class associated to this property type.
+     */
+    public Class<?> klass() {
+        return klass;
+    }
+
     @Override
     public String toString() {
         return this.getClass().getSimpleName() + '(' + name + ')';

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java (from r783061, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPConnection.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPConnection.java&r1=783061&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPConnection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java Thu Jun 11 17:09:45 2009
@@ -15,7 +15,7 @@
  *     Bogdan Stefanescu, Nuxeo
  *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -45,12 +45,11 @@
 import org.apache.chemistry.Unfiling;
 import org.apache.chemistry.VersioningState;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.app.Connector;
-import org.apache.chemistry.atompub.client.app.Request;
-import org.apache.chemistry.atompub.client.app.Response;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.atom.XmlProperty;
+import org.apache.chemistry.atompub.client.connector.Connector;
+import org.apache.chemistry.atompub.client.connector.Request;
+import org.apache.chemistry.atompub.client.connector.Response;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.XmlProperty;
 
 /**
  *

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPDocument.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPDocument.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPDocument.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.IOException;
 import java.io.InputStream;

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPDocument.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPFolder.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPFolder.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPFolder.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -29,10 +29,9 @@
 import org.apache.chemistry.Type;
 import org.apache.chemistry.Unfiling;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.app.Request;
-import org.apache.chemistry.atompub.client.app.Response;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
+import org.apache.chemistry.atompub.client.connector.Request;
+import org.apache.chemistry.atompub.client.connector.Response;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
 
 /**
  *
@@ -66,7 +65,7 @@
     public List<CMISObject> getChildren(BaseType type) {
         // TODO type
         String href = entry.getLink(CMIS.LINK_CHILDREN);
-        Response resp = entry.getConnector().get(new Request(href));
+        Response resp = entry.connection.getConnector().get(new Request(href));
         if (!resp.isOk()) {
             throw new ContentManagerException(
                     "Remote server returned error code: "

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPFolder.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObject.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObject.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObject.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java Thu Jun 11 17:09:45 2009
@@ -15,7 +15,7 @@
  *     Bogdan Stefanescu, Nuxeo
  *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.Serializable;
 import java.net.URI;
@@ -32,11 +32,10 @@
 import org.apache.chemistry.RelationshipDirection;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.app.Connector;
-import org.apache.chemistry.atompub.client.app.Request;
-import org.apache.chemistry.atompub.client.app.Response;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
+import org.apache.chemistry.atompub.client.connector.Connector;
+import org.apache.chemistry.atompub.client.connector.Request;
+import org.apache.chemistry.atompub.client.connector.Response;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
 import org.apache.chemistry.impl.base.BaseObject;
 
 /**
@@ -70,10 +69,6 @@
         }
     }
 
-    public Connector getConnector() {
-        return entry.getConnector();
-    }
-
     /*
      * ----- Object Services -----
      */
@@ -85,7 +80,7 @@
 
     public void delete() {
         Request req = new Request(entry.getEditLink());
-        Response resp = getConnector().delete(req);
+        Response resp = entry.connection.getConnector().delete(req);
         if (!resp.isOk()) {
             throw new ContentManagerException(
                     "Remote server returned error code: "
@@ -106,7 +101,7 @@
         if (href == null) {
             return null;
         }
-        APPObjectEntry e = (APPObjectEntry) getConnector().getObject(
+        APPObjectEntry e = (APPObjectEntry) entry.connection.getConnector().getObject(
                 new ReadContext(entry.getConnection()), href);
         Type t = entry.getConnection().getRepository().getType(e.getTypeId());
         APPFolder f = new APPFolder(e, t);
@@ -185,7 +180,7 @@
         }
         Request req = new Request(href);
         req.setHeader("Content-Type", "application/atom+xml;type=entry");
-        Response resp = getConnector().postObject(req, entry);
+        Response resp = entry.connection.getConnector().postObject(req, entry);
         if (!resp.isOk()) {
             throw new ContentManagerException(
                     "Remote server returned error code: "
@@ -203,7 +198,7 @@
         }
         Request req = new Request(href);
         req.setHeader("Content-Type", "application/atom+xml;type=entry");
-        Response resp = getConnector().putObject(req, entry);
+        Response resp = entry.connection.getConnector().putObject(req, entry);
         if (!resp.isOk()) {
             throw new ContentManagerException(
                     "Remote server returned error code: "

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObject.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntry.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntry.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntry.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java Thu Jun 11 17:09:45 2009
@@ -15,7 +15,7 @@
  *     Bogdan Stefanescu, Nuxeo
  *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.IOException;
 import java.io.Serializable;
@@ -32,10 +32,9 @@
 import org.apache.chemistry.Property;
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.app.Connector;
-import org.apache.chemistry.atompub.client.common.atom.ValueAdapter;
-import org.apache.chemistry.atompub.client.common.atom.XmlProperty;
-import org.apache.chemistry.atompub.client.common.xml.XMLWriter;
+import org.apache.chemistry.atompub.client.stax.ValueAdapter;
+import org.apache.chemistry.atompub.client.stax.XmlProperty;
+import org.apache.chemistry.xml.stax.XMLWriter;
 
 /**
  *
@@ -90,10 +89,6 @@
         return href == null ? getLink("self") : href;
     }
 
-    public Connector getConnector() {
-        return connection.getConnector();
-    }
-
     // -----
 
     public APPConnection getConnection() {

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntry.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryReader.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryReader.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java Thu Jun 11 17:09:45 2009
@@ -15,17 +15,18 @@
  *     Bogdan Stefanescu, Nuxeo
  *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.HashMap;
 
 import javax.xml.stream.XMLStreamException;
 
 import org.apache.chemistry.Type;
-import org.apache.chemistry.atompub.client.common.atom.AbstractObjectReader;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.atom.XmlProperty;
-import org.apache.chemistry.atompub.client.common.xml.StaxReader;
+import org.apache.chemistry.atompub.Atom;
+import org.apache.chemistry.atompub.client.stax.AbstractObjectReader;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.XmlProperty;
+import org.apache.chemistry.xml.stax.StaxReader;
 
 /**
  *
@@ -61,8 +62,8 @@
             APPObjectEntry object) throws XMLStreamException {
         String name = reader.getLocalName();
         if ("link".equals(name)) {
-            String rel = reader.getAttributeValue(ATOM_NS, "rel");
-            String href = reader.getAttributeValue(ATOM_NS, "href");
+            String rel = reader.getAttributeValue(Atom.ATOM_NS, "rel");
+            String href = reader.getAttributeValue(Atom.ATOM_NS, "href");
             object.addLink(rel, href);
             // } else if ("id".equals(name)) {
             // object.id = new URI(id);

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryReader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryWriter.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryWriter.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectEntryWriter.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java Thu Jun 11 17:09:45 2009
@@ -14,13 +14,13 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.IOException;
 
 import org.apache.chemistry.ObjectEntry;
-import org.apache.chemistry.atompub.client.common.atom.ObjectEntryWriter;
-import org.apache.chemistry.atompub.client.common.xml.XMLWriter;
+import org.apache.chemistry.atompub.client.stax.ObjectEntryWriter;
+import org.apache.chemistry.xml.stax.XMLWriter;
 
 /**
  *

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectEntryWriter.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectFeedReader.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectFeedReader.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPObjectFeedReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java Thu Jun 11 17:09:45 2009
@@ -14,15 +14,15 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.chemistry.ObjectEntry;
-import org.apache.chemistry.atompub.client.common.atom.AbstractFeedReader;
-import org.apache.chemistry.atompub.client.common.atom.EntryReader;
-import org.apache.chemistry.atompub.client.common.xml.StaxReader;
+import org.apache.chemistry.atompub.client.stax.AbstractFeedReader;
+import org.apache.chemistry.atompub.client.stax.EntryReader;
+import org.apache.chemistry.xml.stax.StaxReader;
 
 /**
  *

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPObjectFeedReader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPPropertyDefinition.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPPropertyDefinition.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPPropertyDefinition.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java Thu Jun 11 17:09:45 2009
@@ -12,15 +12,14 @@
  * limitations under the License.
  *
  * Authors:
+ *     Florent Guillaume, Nuxeo
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.Serializable;
 import java.lang.reflect.Array;
-import java.math.BigDecimal;
 import java.net.URI;
-import java.util.Calendar;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -31,9 +30,10 @@
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.PropertyType;
 import org.apache.chemistry.Updatability;
-import org.apache.chemistry.atompub.client.common.atom.ValueAdapter;
-import org.apache.chemistry.atompub.client.common.xml.ChildrenNavigator;
-import org.apache.chemistry.atompub.client.common.xml.StaxReader;
+import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.client.stax.ValueAdapter;
+import org.apache.chemistry.xml.stax.ChildrenNavigator;
+import org.apache.chemistry.xml.stax.StaxReader;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -80,9 +80,11 @@
     }
 
     public PropertyType getType() {
-        String t = (String) map.get("propertyType");
-        if (t != null) {
-            type = types.get(t);
+        if (type == null) {
+            String t = (String) map.get("propertyType");
+            if (t != null) {
+                type = PropertyType.get(t);
+            }
             if (type == null) {
                 type = PropertyType.STRING;
             }
@@ -183,35 +185,9 @@
             return multi ? "Property is multi-valued"
                     : "Property is single-valued";
         }
-        Class<?> klass;
-        switch (getType().ordinal()) {
-        case PropertyType.STRING_ORD:
-        case PropertyType.ID_ORD:
-            klass = String.class;
-            break;
-        case PropertyType.DECIMAL_ORD:
-            klass = BigDecimal.class;
-            break;
-        case PropertyType.INTEGER_ORD:
-            klass = Integer.class; // TODO Long
-            break;
-        case PropertyType.BOOLEAN_ORD:
-            klass = Boolean.class;
-            break;
-        case PropertyType.DATETIME_ORD:
-            klass = Calendar.class;
-            break;
-        case PropertyType.URI_ORD:
-            klass = URI.class;
-            break;
-        case PropertyType.XML_ORD:
-            klass = String.class; // TODO
-            break;
-        case PropertyType.HTML_ORD:
-            klass = String.class; // TODO
-            break;
-        default:
-            throw new UnsupportedOperationException(type.toString());
+        Class<?> klass = getType().klass();
+        if (klass == null) {
+            throw new UnsupportedOperationException(getType().toString());
         }
         if (multi) {
             for (int i = 0; i < Array.getLength(value); i++) {
@@ -251,7 +227,7 @@
                 // TODO not yet implemented
             } else {
                 ValueAdapter adapter = adapters.get(tag);
-                Object val = null;
+                Object val;
                 if (adapter == null) {
                     val = reader.getElementText();
                 } else {
@@ -263,36 +239,18 @@
         return pd;
     }
 
-    public static boolean isMultiValued(String text) {
+    protected static boolean isMultiValued(String text) {
         return "multi".equals(text);
     }
 
-    static abstract class Setter {
-        public abstract void set(APPPropertyDefinition pd, StaxReader reader)
-                throws XMLStreamException;
-    }
-
-    static Map<String, ValueAdapter> adapters = new HashMap<String, ValueAdapter>();
-
-    static Map<String, PropertyType> types = new HashMap<String, PropertyType>();
-
+    private static Map<String, ValueAdapter> adapters = new HashMap<String, ValueAdapter>();
     static {
-        adapters.put("inherited", ValueAdapter.BOOLEAN);
-        adapters.put("required", ValueAdapter.BOOLEAN);
-        adapters.put("queryable", ValueAdapter.BOOLEAN);
-        adapters.put("orderable", ValueAdapter.BOOLEAN);
+        adapters.put(CMIS.INHERITED.getLocalPart(), ValueAdapter.BOOLEAN);
+        adapters.put(CMIS.REQUIRED.getLocalPart(), ValueAdapter.BOOLEAN);
+        adapters.put(CMIS.QUERYABLE.getLocalPart(), ValueAdapter.BOOLEAN);
+        adapters.put(CMIS.ORDERABLE.getLocalPart(), ValueAdapter.BOOLEAN);
         adapters.put("openChoice", ValueAdapter.BOOLEAN);
         adapters.put("maxLength", ValueAdapter.INTEGER);
-
-        types.put("string", PropertyType.STRING);
-        types.put("boolean", PropertyType.BOOLEAN);
-        types.put("integer", PropertyType.INTEGER);
-        types.put("decimal", PropertyType.DECIMAL);
-        types.put("id", PropertyType.ID);
-        types.put("datetime", PropertyType.DATETIME);
-        types.put("uri", PropertyType.URI);
-        types.put("xml", PropertyType.XML);
-        types.put("html", PropertyType.HTML);
     }
 
 }

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPPropertyDefinition.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java (from r783061, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepository.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepository.java&r1=783061&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.io.InputStream;
 import java.io.Serializable;
@@ -31,12 +31,10 @@
 import org.apache.chemistry.SPI;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.ContentManager;
-import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.app.APPContentManager;
-import org.apache.chemistry.atompub.client.app.Request;
-import org.apache.chemistry.atompub.client.app.Response;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
+import org.apache.chemistry.atompub.client.connector.APPContentManager;
+import org.apache.chemistry.atompub.client.connector.Request;
+import org.apache.chemistry.atompub.client.connector.Response;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
 
 /**
  * An APP client repository proxy

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryCapabilities.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryCapabilities.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryCapabilities.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.QueryCapability;

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryInfo.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryInfo.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPRepositoryInfo.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.net.URI;
 import java.util.Collection;

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPServiceDocumentReader.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPServiceDocumentReader.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPServiceDocumentReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java Thu Jun 11 17:09:45 2009
@@ -14,12 +14,12 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import org.apache.chemistry.RepositoryInfo;
-import org.apache.chemistry.atompub.client.app.APPContentManager;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.atom.ServiceDocumentReader;
+import org.apache.chemistry.atompub.client.connector.APPContentManager;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.ServiceDocumentReader;
 
 /**
  *
@@ -34,8 +34,7 @@
 
     @Override
     protected APPRepository createRepository(ReadContext ctx) {
-        return new APPRepository(
-                (APPContentManager) ctx.get(APPContentManager.class));
+        return new APPRepository((APPContentManager) ctx.getContentManager());
     }
 
     @Override

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPType.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPType.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/APPType.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java Thu Jun 11 17:09:45 2009
@@ -15,7 +15,7 @@
  *     Bogdan Stefanescu, Nuxeo
  *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -27,8 +27,8 @@
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.atom.XmlProperty;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.XmlProperty;
 
 /**
  *
@@ -149,7 +149,7 @@
 
     protected void loadPropertyDef() {
         if (propertyDefs == null) {
-            APPType typeDef = (APPType) getConnector().getType(
+            APPType typeDef = (APPType) connection.getConnector().getType(
                     new ReadContext(connection), getEditLink());
             propertyDefs = typeDef.propertyDefs;
         }

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ContentManager.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ContentManager.java?rev=783850&r1=783849&r2=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ContentManager.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ContentManager.java Thu Jun 11 17:09:45 2009
@@ -13,10 +13,12 @@
  *
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
+ *     Florent Guillaume, Nuxeo
  */
 package org.apache.chemistry.atompub.client;
 
 import org.apache.chemistry.Repository;
+import org.apache.commons.httpclient.auth.CredentialsProvider;
 
 /**
  * The entry point to CMIS repositories exposed by a server.
@@ -39,48 +41,26 @@
 
     Repository getDefaultRepository() throws ContentManagerException;
 
-    Repository getRepository(String id) throws NoSuchRepositoryException,
-            ContentManagerException;
-
-    void setCredentialsProvider(CredentialsProvider provider);
+    Repository getRepository(String id) throws ContentManagerException;
 
     CredentialsProvider getCredentialsProvider();
 
     /**
-     * Login as the given user. All the subsequent connections made by this
-     * content manager will use this login. If you want to temporary run some
-     * code using another login you should use {@link #loginAs(String, String)}
-     * and then {@link #logout()} to revert back to the previous login.
-     *
-     * @param username
-     * @param pass
+     * Logs-in as the given user. All the subsequent connections made by this
+     * content manager will use this login.
      */
     void login(String username, String pass);
 
     /**
-     * Login as the given user but only on the current thread. The other threads
-     * will not use this login. You can use to change the current login for the
-     * current thread. This is working like a stack stored in a thread local
-     * variable. You can call {@link #loginAs(String, String)} several times and
-     * then logout
-     *
-     * @param username
-     * @param pass
-     */
-    void pushLogin(String username, String pass);
-
-    void popLogin();
-
-    /**
-     * Remove global login
+     * Logs out the current user.
      */
     void logout();
 
     /**
-     * Get the current login or null if none
+     * Gets the login of the currently logged-in user.
      *
-     * @return
+     * @return the current login, or {@code null}
      */
-    Credentials getCurrentLogin();
+    String getCurrentLogin();
 
 }

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeEntryReader.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeEntryReader.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeEntryReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -22,11 +22,12 @@
 import javax.xml.stream.XMLStreamException;
 
 import org.apache.chemistry.PropertyDefinition;
+import org.apache.chemistry.atompub.Atom;
 import org.apache.chemistry.atompub.CMIS;
-import org.apache.chemistry.atompub.client.common.atom.AbstractEntryReader;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.xml.ChildrenNavigator;
-import org.apache.chemistry.atompub.client.common.xml.StaxReader;
+import org.apache.chemistry.atompub.client.stax.AbstractEntryReader;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.xml.stax.ChildrenNavigator;
+import org.apache.chemistry.xml.stax.StaxReader;
 
 /**
  *
@@ -46,8 +47,8 @@
             APPType object) throws XMLStreamException {
         // read only links - optimization to avoid useless operations
         if ("link".equals(reader.getLocalName())) {
-            String rel = reader.getAttributeValue(ATOM_NS, "rel");
-            String href = reader.getAttributeValue(ATOM_NS, "href");
+            String rel = reader.getAttributeValue(Atom.ATOM_NS, "rel");
+            String href = reader.getAttributeValue(Atom.ATOM_NS, "href");
             object.addLink(rel, href);
         }
     }

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeFeedReader.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeFeedReader.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/model/TypeFeedReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java Thu Jun 11 17:09:45 2009
@@ -14,14 +14,14 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app.model;
+package org.apache.chemistry.atompub.client;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.chemistry.Type;
-import org.apache.chemistry.atompub.client.common.atom.AbstractFeedReader;
-import org.apache.chemistry.atompub.client.common.xml.StaxReader;
+import org.apache.chemistry.atompub.client.stax.AbstractFeedReader;
+import org.apache.chemistry.xml.stax.StaxReader;
 
 /**
  *

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeFeedReader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/APPContentManager.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/APPContentManager.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/APPContentManager.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java Thu Jun 11 17:09:45 2009
@@ -13,22 +13,19 @@
  *
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
+ *     Florent Guillaume, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
+package org.apache.chemistry.atompub.client.connector;
 
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.atompub.client.ContentManager;
 import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.Credentials;
-import org.apache.chemistry.atompub.client.CredentialsProvider;
-import org.apache.chemistry.atompub.client.NoSuchRepositoryException;
-import org.apache.chemistry.atompub.client.app.httpclient.HttpClientConnector;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScheme;
+import org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
+import org.apache.commons.httpclient.auth.CredentialsProvider;
 
 /**
  *
@@ -41,13 +38,7 @@
 
     protected Repository[] repos;
 
-    protected CredentialsProvider login;
-
-    protected IOProvider ioProvider;
-
-    protected static ThreadLocal<List<CredentialsProvider>> loginStack = new ThreadLocal<List<CredentialsProvider>>();
-
-    protected static Map<Class<?>, Class<?>> services = new Hashtable<Class<?>, Class<?>>();
+    protected CredentialsProvider credentialsProvider;
 
     public APPContentManager(String url) {
         this(url, null);
@@ -55,18 +46,10 @@
 
     protected APPContentManager(String url, Connector connector) {
         this.baseUrl = url;
-        this.connector = connector;
-        initialize();
-    }
-
-    protected void initialize() {
         if (connector == null) {
-            connector = createConnector();
+            connector = new HttpClientConnector(new DefaultIOProvider(), this);
         }
-    }
-
-    protected Connector createConnector() {
-        return new HttpClientConnector(this);
+        this.connector = connector;
     }
 
     public String getBaseUrl() {
@@ -86,21 +69,21 @@
                         "Remote server returned error code: "
                                 + resp.getStatusCode());
             }
-            ReadContext ctx = new ReadContext();
-            ctx.put(APPContentManager.class, this);
+            ReadContext ctx = new ReadContext(this);
             repos = resp.getServiceDocument(ctx);
         }
         return repos;
     }
 
     public Repository getRepository(String id)
-            throws NoSuchRepositoryException, ContentManagerException {
+            throws ContentManagerException {
         for (Repository repository : getRepositories()) {
             if (repository.getId().equals(id)) {
                 return repository;
             }
         }
-        throw new NoSuchRepositoryException(baseUrl, id);
+        throw new ContentManagerException("No such repository: " + id + " in: "
+                + baseUrl);
     }
 
     public Repository getDefaultRepository() throws ContentManagerException {
@@ -108,72 +91,62 @@
         if (repos != null && repos.length > 0) {
             return repos[0];
         }
-        throw new NoSuchRepositoryException(baseUrl, "default");
+        throw new ContentManagerException("No default repository in: "
+                + baseUrl);
     }
 
     public void refresh() {
         repos = null;
     }
 
-    public void login(String username, String pass) {
-        login = new DefaultCredentialsProvider(username, pass.toCharArray());
-    }
-
-    public void pushLogin(String username, String pass) {
-        List<CredentialsProvider> stack = loginStack.get();
-        if (stack == null) {
-            stack = new ArrayList<CredentialsProvider>();
-            loginStack.set(stack);
-        }
-        stack.add(new DefaultCredentialsProvider(username, pass.toCharArray()));
-    }
-
-    public void popLogin() {
-        List<CredentialsProvider> stack = loginStack.get();
-        if (stack != null && !stack.isEmpty()) {
-            stack.remove(stack.size() - 1);
-        }
+    // TODO have another login method with more generic Credentials
+    public void login(String username, String password) {
+        credentialsProvider = new UsernamePasswordCredentialsProvider(username,
+                password);
     }
 
     public void logout() {
-        login = null;
-    }
-
-    public Credentials getCurrentLogin() {
-        List<CredentialsProvider> stack = loginStack.get();
-        return stack == null || stack.isEmpty() ? login.getCredentials()
-                : stack.get(stack.size() - 1).getCredentials();
+        credentialsProvider = null;
     }
 
     public CredentialsProvider getCredentialsProvider() {
-        return login;
-    }
-
-    public void setCredentialsProvider(CredentialsProvider provider) {
-        login = provider;
+        return credentialsProvider;
     }
 
-    public IOProvider getIO() {
-        if (ioProvider == null) {
-            ioProvider = new DefaultIOProvider();
+    public String getCurrentLogin() {
+        Credentials credentials;
+        try {
+            credentials = credentialsProvider.getCredentials(null, null, 0,
+                    false);
+        } catch (CredentialsNotAvailableException e) {
+            // cannot happen, our SimpleCredentialsProvider doesn't throw it
+            return null;
         }
-        return ioProvider;
+        if (!(credentials instanceof UsernamePasswordCredentials)) {
+            return null;
+        }
+        return ((UsernamePasswordCredentials) credentials).getUserName();
     }
 
-    public void setIO(IOProvider readers) {
-        this.ioProvider = readers;
-    }
+    /**
+     * Simple credentials provider using fixed username/password credentials.
+     * Other implementations could query the user through a GUI.
+     */
+    public static class UsernamePasswordCredentialsProvider implements
+            CredentialsProvider {
 
-    public static void registerService(Class<?> itf, Class<?> impl) {
-        services.put(itf, impl);
-    }
+        protected final Credentials credentials;
 
-    public static void unregisterService(Class<?> itf) {
-        services.remove(itf);
-    }
+        public UsernamePasswordCredentialsProvider(String username,
+                String password) {
+            this.credentials = new UsernamePasswordCredentials(username,
+                    password);
+        }
 
-    public static Class<?> getServiceClass(Class<?> itf) {
-        return services.get(itf);
+        public Credentials getCredentials(AuthScheme scheme, String host,
+                int port, boolean proxy) {
+            return credentials;
+        }
     }
 
 }

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/APPContentManager.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java (from r783040, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Connector.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Connector.java&r1=783040&r2=783850&rev=783850&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/app/Connector.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java Thu Jun 11 17:09:45 2009
@@ -14,7 +14,7 @@
  * Authors:
  *     Bogdan Stefanescu, Nuxeo
  */
-package org.apache.chemistry.atompub.client.app;
+package org.apache.chemistry.atompub.client.connector;
 
 import java.util.List;
 
@@ -22,16 +22,14 @@
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.atompub.client.ContentManagerException;
-import org.apache.chemistry.atompub.client.common.atom.ReadContext;
-import org.apache.chemistry.atompub.client.common.atom.XmlObjectWriter;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.XmlObjectWriter;
 
 /**
- * Invokes a remote content manager over HTTP protocols, such as AtomPub.
+ * A Connector abstracts the HTTP or AtomPub operations.
  */
 public interface Connector {
 
-    APPContentManager getAPPContentManager();
-
     <T> Response post(Request operation, XmlObjectWriter<T> writer, T object)
             throws ContentManagerException;
 

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/connector/Connector.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message