chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1035966 [1/3] - in /incubator/chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/j...
Date Wed, 17 Nov 2010 09:59:07 GMT
Author: fmui
Date: Wed Nov 17 09:59:05 2010
New Revision: 1035966

URL: http://svn.apache.org/viewvc?rev=1035966&view=rev
Log:
- merged Client API refactoring branch

Added:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectAdapter.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectAdapter.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFileableCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFileableCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractTransientCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractTransientCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractTransientFileableCmisObject.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractTransientFileableCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PolicyImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PolicyImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PropertyImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PropertyImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientDocumentImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientDocumentImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientFolderImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientFolderImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientPolicyImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientPolicyImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientRelationshipImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/TransientRelationshipImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
      - copied unchanged from r1035958, incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
Removed:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentDocumentImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPolicyImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentRelationshipImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/SessionType.java
Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectId.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ChangeEventImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RenditionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CmisExtensionElement.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ExtensionsData.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractExtensionData.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AccessControlListImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AllowableActionsImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ChoiceImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CmisExtensionElementImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectInFolderDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectInFolderListImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectListImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectParentDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyIdListImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertiesImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RenditionDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionContainerImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionListImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServiceFactory.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectRelationIT.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/AbstractReadOnlyCreateSessionIT.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java Wed Nov 17 09:59:05 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.chemistry.opencmis.client.api;
 
+import java.io.Serializable;
 import java.util.GregorianCalendar;
 import java.util.List;
 import java.util.Map;
@@ -29,14 +30,13 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.ExtensionLevel;
-import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 
 /**
  * Base CMIS object.
- *
+ * 
  * See CMIS Domain Model - section 2.1.2.
  */
-public interface CmisObject extends ObjectId {
+public interface CmisObject extends ObjectId, Serializable {
 
     // common properties
 
@@ -46,11 +46,6 @@ public interface CmisObject extends Obje
     String getName();
 
     /**
-     * Set the name of this object. {@code Property<String> 'cmis:name'}
-     */
-    void setName(String name);
-
-    /**
      * Get the id of the user who created the object (maintained by the
      * repository). {@code Property<String> 'cmis:createdBy'}
      */
@@ -88,7 +83,7 @@ public interface CmisObject extends Obje
 
     /**
      * Get the type's base type id.
-     *
+     * 
      * @return
      */
     BaseTypeId getBaseTypeId();
@@ -110,10 +105,10 @@ public interface CmisObject extends Obje
 
     /**
      * Returns a property by id.
-     *
+     * 
      * @param id
      *            the property id
-     *
+     * 
      * @return the property or <code>null</code> if the property does not exist
      *         or is not available
      */
@@ -121,10 +116,10 @@ public interface CmisObject extends Obje
 
     /**
      * Returns a property value by id.
-     *
+     * 
      * @param id
      *            the property id
-     *
+     * 
      * @return the property value or <code>null</code> if the property does not
      *         exist or is not available
      */
@@ -149,7 +144,7 @@ public interface CmisObject extends Obje
 
     /**
      * Deletes this object.
-     *
+     * 
      * @param allVersions
      *            if this object is a document this parameter defines if just
      *            this version or all versions should be deleted
@@ -157,32 +152,28 @@ public interface CmisObject extends Obje
     void delete(boolean allVersions);
 
     /**
-     * Updates the properties that have been set with
-     * {@link #setProperty(String, Object)}.
-     *
-     * @return the object id of the updated object (a repository might have
-     *         created a new object)
+     * Updates the properties that are provided.
+     * 
+     * @param properties
+     *            the properties to update
+     * 
+     * @return the updated object (a repository might have created a new object)
      */
-    ObjectId updateProperties();
+    CmisObject updateProperties(Map<String, ?> properties);
 
     /**
      * Updates the properties that are provided.
-     *
+     * 
      * @param properties
      *            the properties to update
-     *
+     * @param refresh
+     *            indicates if the object should be refresh after the update
+     * 
      * @return the object id of the updated object (a repository might have
      *         created a new object)
+     * 
      */
-    ObjectId updateProperties(Map<String, ?> properties);
-
-    // relationship service
-
-    /**
-     * Fetches the relationships from or to this object from the repository.
-     */
-    ItemIterable<Relationship> getRelationships(boolean includeSubRelationshipTypes,
-            RelationshipDirection relationshipDirection, ObjectType type, OperationContext context);
+    ObjectId updateProperties(Map<String, ?> properties, boolean refresh);
 
     // renditions
 
@@ -194,14 +185,14 @@ public interface CmisObject extends Obje
     // policy service
 
     /**
-     * Applies a policy to this object.
+     * Applies policies to this object.
      */
-    void applyPolicy(ObjectId policyId);
+    void applyPolicy(ObjectId... policyIds);
 
     /**
-     * Remove a policy from this object.
+     * Remove policies from this object.
      */
-    void removePolicy(ObjectId policyId);
+    void removePolicy(ObjectId... policyIds);
 
     /**
      * Returns the applied policies if they have been fetched for this object.
@@ -211,13 +202,8 @@ public interface CmisObject extends Obje
     // ACL service
 
     /**
-     * Fetches the ACL of this object from the repository.
-     */
-    Acl getAcl(boolean onlyBasicPermissions);
-
-    /**
      * Adds and removes ACEs to the object.
-     *
+     * 
      * @return the new ACL of this object
      */
     Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation);
@@ -225,35 +211,35 @@ public interface CmisObject extends Obje
     /**
      * Adds ACEs to the object.
      */
-    void addAcl(List<Ace> addAces, AclPropagation aclPropagation);
+    Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation);
 
     /**
      * Removes ACEs to the object.
      */
-    void removeAcl(List<Ace> removeAces, AclPropagation aclPropagation);
+    Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation);
 
-    // buffered stuff
+    // extensions
 
     /**
-     * Sets a new property value.
-     * <p>
-     * The value may be a single value or a list.
-     *
-     * Use {@link #updateProperties()} to store the new value in the repository.
+     * Returns the extensions for the given level.
      */
-    <T> void setProperty(String id, Object value);
-
-    // extensions
-
     List<CmisExtensionElement> getExtensions(ExtensionLevel level);
 
-    // session handling
+    // adapters
+
+    /**
+     * Returns an adapter based on the given interface.
+     */
+    CmisObjectAdapter getAdapter(Class<? extends CmisObjectAdapter> adapterInterface);
 
     /**
-     * Returns true, if this object has pending changes which are not synced
-     * with the backend.
+     * Returns a transient object adapter.
+     * 
+     * @see TransientCmisObject
      */
-    boolean isChanged();
+    TransientCmisObject getTransientObject();
+
+    // session handling
 
     /**
      * Returns the timestamp (in milliseconds) of the last refresh.

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java Wed Nov 17 09:59:05 2010
@@ -27,11 +27,13 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * CMIS Document.
- *
+ * 
  * Domain Model 2.4
  */
 public interface Document extends FileableCmisObject {
 
+    TransientDocument getTransientDocument();
+
     // object service
 
     /**
@@ -41,7 +43,7 @@ public interface Document extends Fileab
 
     /**
      * Retrieves the content stream of this document.
-     *
+     * 
      * @return the content stream, or {@code null}
      */
     ContentStream getContentStream();
@@ -49,7 +51,7 @@ public interface Document extends Fileab
     /**
      * Retrieves the content stream that is associated with the given stream id.
      * This is usually a rendition of the document.
-     *
+     * 
      * @return the content stream, or {@code null}
      */
     ContentStream getContentStream(String streamId);
@@ -57,19 +59,29 @@ public interface Document extends Fileab
     /**
      * Sets a new content stream for the document.
      */
-    ObjectId setContentStream(ContentStream contentStream, boolean overwrite);
+    Document setContentStream(ContentStream contentStream, boolean overwrite);
+
+    /**
+     * Sets a new content stream for the document.
+     */
+    ObjectId setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh);
+
+    /**
+     * Removes the current content stream from the document.
+     */
+    Document deleteContentStream();
 
     /**
      * Removes the current content stream from the document.
      */
-    ObjectId deleteContentStream();
+    ObjectId deleteContentStream(boolean refresh);
 
     // versioning service
 
     /**
      * Checks out the document and returns the object id of the PWC (private
      * working copy).
-     *
+     * 
      * @return PWC id
      */
     ObjectId checkOut(); // returns the PWC id
@@ -83,7 +95,7 @@ public interface Document extends Fileab
     /**
      * If this is a PWC (private working copy) it performs a check in. If this
      * is not a PWC it an exception will be thrown.
-     *
+     * 
      * @return new document id
      */
     ObjectId checkIn(boolean major, Map<String, ?> properties, ContentStream contentStream, String checkinComment,
@@ -92,18 +104,18 @@ public interface Document extends Fileab
     /**
      * If this is a PWC (private working copy) it performs a check in. If this
      * is not a PWC it an exception will be thrown.
-     *
+     * 
      * @return new document id
      */
     ObjectId checkIn(boolean major, Map<String, ?> properties, ContentStream contentStream, String checkinComment);
 
     /**
      * Fetches the latest major or minor version of this document.
-     *
+     * 
      * @param major
      *            if <code>true</code> the latest major version will be
      *            returned, otherwise the very last version will be returned
-     *
+     * 
      * @return the latest document object
      */
     Document getObjectOfLatestVersion(boolean major);
@@ -111,11 +123,11 @@ public interface Document extends Fileab
     /**
      * Fetches the latest major or minor version of this document using the
      * given {@link OperationContext}.
-     *
+     * 
      * @param major
      *            if <code>true</code> the latest major version will be
      *            returned, otherwise the very last version will be returned
-     *
+     * 
      * @return the latest document object
      */
     Document getObjectOfLatestVersion(boolean major, OperationContext context);
@@ -133,20 +145,19 @@ public interface Document extends Fileab
 
     /**
      * Creates a copy of this document, including content.
-     *
+     * 
      * @return the new document object
      */
     Document copy(ObjectId targetFolderId);
 
     /**
      * Creates a copy of this document, including content.
-     *
+     * 
      * @return the new document object or {@code null} if the parameter
      *         {@code context} was set to {@code null}
      */
-    Document copy(ObjectId targetFolderId, Map<String, ?> properties,
-            VersioningState versioningState, List<Policy> policies,
-            List<Ace> addACEs, List<Ace> removeACEs, OperationContext context);
+    Document copy(ObjectId targetFolderId, Map<String, ?> properties, VersioningState versioningState,
+            List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context);
 
     // document specific properties
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java Wed Nov 17 09:59:05 2010
@@ -28,16 +28,18 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * CMIS Folder.
- *
+ * 
  * Domain Model 2.5
  */
 public interface Folder extends FileableCmisObject {
 
+    TransientFolder getTransientFolder();
+
     // object service
 
     /**
      * Creates a new document in this folder.
-     *
+     * 
      * @return the new document object or <code>null</code> if the parameter
      *         <code>context</code> was set to <code>null</code>
      */
@@ -46,14 +48,14 @@ public interface Folder extends Fileable
 
     /**
      * Creates a new document in this folder.
-     *
+     * 
      * @return the new document object
      */
     Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState);
 
     /**
      * Creates a new document from a source document in this folder.
-     *
+     * 
      * @return the new document object or <code>null</code> if the parameter
      *         <code>context</code> was set to <code>null</code>
      */
@@ -62,14 +64,14 @@ public interface Folder extends Fileable
 
     /**
      * Creates a new document from a source document in this folder.
-     *
+     * 
      * @return the new document object
      */
     Document createDocumentFromSource(ObjectId source, Map<String, ?> properties, VersioningState versioningState);
 
     /**
      * Creates a new subfolder in this folder.
-     *
+     * 
      * @return the new folder object or <code>null</code> if the parameter
      *         <code>context</code> was set to <code>null</code>
      */
@@ -78,14 +80,14 @@ public interface Folder extends Fileable
 
     /**
      * Creates a new subfolder in this folder.
-     *
+     * 
      * @return the new folder object
      */
     Folder createFolder(Map<String, ?> properties);
 
     /**
      * Creates a new policy in this folder.
-     *
+     * 
      * @return the new policy object or <code>null</code> if the parameter
      *         <code>context</code> was set to <code>null</code>
      */
@@ -94,14 +96,14 @@ public interface Folder extends Fileable
 
     /**
      * Creates a new policy in this folder.
-     *
+     * 
      * @return the new policy object
      */
     Policy createPolicy(Map<String, ?> properties);
 
     /**
      * Deletes this folder and all subfolders.
-     *
+     * 
      * @return a list of object ids which failed to be deleted
      */
     List<String> deleteTree(boolean allversions, UnfileObject unfile, boolean continueOnFailure);
@@ -148,7 +150,7 @@ public interface Folder extends Fileable
 
     /**
      * Gets the parent folder object
-     *
+     * 
      * @return the parent folder object or <code>null</code> if the folder is
      *         the root folder.
      */

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java Wed Nov 17 09:59:05 2010
@@ -19,6 +19,7 @@
 package org.apache.chemistry.opencmis.client.api;
 
 import java.io.InputStream;
+import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -37,10 +38,12 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * A factory to create CMIS objects.
- *
+ * 
  * @see org.apache.chemistry.opencmis.client.api.Session#getObjectFactory()
  */
-public interface ObjectFactory {
+public interface ObjectFactory extends Serializable {
+
+    void initialize(Session session, Map<String, String> parameters);
 
     // ACL and ACE
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectId.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectId.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectId.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectId.java Wed Nov 17 09:59:05 2010
@@ -18,10 +18,12 @@
  */
 package org.apache.chemistry.opencmis.client.api;
 
+import java.io.Serializable;
+
 /**
  * Holds an object id.
  */
-public interface ObjectId {
+public interface ObjectId extends Serializable {
 
     /**
      * Returns the id.

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java Wed Nov 17 09:59:05 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.chemistry.opencmis.client.api;
 
+import java.io.Serializable;
 import java.util.Set;
 
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
@@ -26,7 +27,7 @@ import org.apache.chemistry.opencmis.com
  * An <code>OperationContext</code> object defines the filtering, paging and
  * caching of an operation.
  */
-public interface OperationContext {
+public interface OperationContext extends Serializable {
 
     /**
      * Returns the current filter.

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java Wed Nov 17 09:59:05 2010
@@ -25,6 +25,8 @@ package org.apache.chemistry.opencmis.cl
  */
 public interface Policy extends FileableCmisObject {
 
+    TransientPolicy getTransientPolicy();
+
     /**
      * Returns the policy text.
      */

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java Wed Nov 17 09:59:05 2010
@@ -25,6 +25,8 @@ package org.apache.chemistry.opencmis.cl
  */
 public interface Relationship extends CmisObject {
 
+    TransientRelationship getTransientRelationship();
+
     // relationship specific properties
 
     /**

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java Wed Nov 17 09:59:05 2010
@@ -18,15 +18,19 @@
  */
 package org.apache.chemistry.opencmis.client.api;
 
+import java.io.Serializable;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.chemistry.opencmis.commons.data.Ace;
+import org.apache.chemistry.opencmis.commons.data.Acl;
 import org.apache.chemistry.opencmis.commons.data.ContentStream;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
+import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
@@ -54,7 +58,7 @@ import org.apache.chemistry.opencmis.com
  * ids and query names, query language, etc.)
  * </p>
  */
-public interface Session {
+public interface Session extends Serializable {
 
     /**
      * Clears all cached data. This implies that all data will be reloaded from
@@ -63,26 +67,6 @@ public interface Session {
      */
     void clear();
 
-    /**
-     * Saves all pending actions for this session. Corresponds to a
-     * <code>commit</code> if the CMIS provider supports transactions. If
-     * transactions are not supported by the CMIS provider, changes might be
-     * applied only partially.
-     * 
-     * <em>Not all session implementations require this method!</em>
-     */
-    void save();
-
-    /**
-     * Cancels all pending actions for this session. Corresponds to a
-     * <code>rollback</code> if the CMIS provider supports transactions. If
-     * transactions are not supported by the CMIS provider, some changes might
-     * already be applied and therefore not rolled back.
-     * 
-     * <em>Not all session implementations require this method!</em>
-     */
-    void cancel();
-
     // session context
 
     /**
@@ -388,4 +372,30 @@ public interface Session {
      * @return the object id of the new relationship
      */
     ObjectId createRelationship(Map<String, ?> properties);
+
+    /**
+     * Fetches the relationships from or to an object from the repository.
+     */
+    ItemIterable<Relationship> getRelationships(ObjectId objectId, boolean includeSubRelationshipTypes,
+            RelationshipDirection relationshipDirection, ObjectType type, OperationContext context);
+
+    /**
+     * Fetches the ACL of an object from the repository.
+     */
+    Acl getAcl(ObjectId objectId, boolean onlyBasicPermissions);
+
+    /**
+     * Applies an ACL to an object.
+     */
+    Acl applyAcl(ObjectId objectId, List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation);
+
+    /**
+     * Applies a set of policies to an object.
+     */
+    void applyPolicy(ObjectId objectId, ObjectId... policyIds);
+
+    /**
+     * Removes a set of policies from an object.
+     */
+    void removePolicy(ObjectId objectId, ObjectId... policyIds);
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Wed Nov 17 09:59:05 2010
@@ -199,7 +199,7 @@ public final class CmisBindingFactory {
 
         result.put(SessionParameter.CACHE_SIZE_REPOSITORIES, "10");
         result.put(SessionParameter.CACHE_SIZE_TYPES, "100");
-        result.put(SessionParameter.CACHE_SIZE_OBJECTS, "400");
+        result.put(SessionParameter.CACHE_SIZE_LINKS, "400");
 
         return result;
     }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java Wed Nov 17 09:59:05 2010
@@ -66,7 +66,7 @@ public class LinkCache implements Serial
             typeCount = CACHE_SIZE_TYPES;
         }
 
-        int objCount = session.get(SessionParameter.CACHE_SIZE_OBJECTS, CACHE_SIZE_OBJECTS);
+        int objCount = session.get(SessionParameter.CACHE_SIZE_LINKS, CACHE_SIZE_OBJECTS);
         if (objCount < 1) {
             objCount = CACHE_SIZE_OBJECTS;
         }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ChangeEventImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ChangeEventImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ChangeEventImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ChangeEventImpl.java Wed Nov 17 09:59:05 2010
@@ -32,6 +32,8 @@ import org.apache.chemistry.opencmis.com
  */
 public class ChangeEventImpl extends ChangeEventInfoDataImpl implements ChangeEvent {
 
+    private static final long serialVersionUID = 1L;
+
     private String objectId;
     private Map<String, List<?>> properties;
     private List<String> policyIds;

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java Wed Nov 17 09:59:05 2010
@@ -25,6 +25,8 @@ import org.apache.chemistry.opencmis.cli
  */
 public class ObjectIdImpl implements ObjectId {
 
+    private static final long serialVersionUID = 1L;
+
     private String id;
 
     /**
@@ -34,11 +36,6 @@ public class ObjectIdImpl implements Obj
         setId(id);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.opencmis.client.api.ObjectId#getId()
-     */
     public String getId() {
         return id;
     }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RenditionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RenditionImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RenditionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RenditionImpl.java Wed Nov 17 09:59:05 2010
@@ -33,6 +33,8 @@ import org.apache.chemistry.opencmis.com
  */
 public class RenditionImpl extends RenditionDataImpl implements Rendition {
 
+    private static final long serialVersionUID = 1L;
+
     private Session session;
     private String objectId;
 
@@ -48,15 +50,15 @@ public class RenditionImpl extends Rendi
     }
 
     public long getLength() {
-        return fLength == null ? -1 : fLength.longValue();
+        return length == null ? -1 : length.longValue();
     }
 
     public long getHeight() {
-        return fHeight == null ? -1 : fHeight.longValue();
+        return height == null ? -1 : height.longValue();
     }
 
     public long getWidth() {
-        return fWidth == null ? -1 : fWidth.longValue();
+        return width == null ? -1 : width.longValue();
     }
 
     public Document getRenditionDocument() {
@@ -64,10 +66,10 @@ public class RenditionImpl extends Rendi
     }
 
     public Document getRenditionDocument(OperationContext context) {
-        if (fRenditionDocumentId == null) {
+        if (renditionDocumentId == null) {
             return null;
         }
-        CmisObject rendDoc = session.getObject(session.createObjectId(fRenditionDocumentId), context);
+        CmisObject rendDoc = session.getObject(session.createObjectId(renditionDocumentId), context);
         if (!(rendDoc instanceof Document)) {
             return null;
         }
@@ -76,12 +78,12 @@ public class RenditionImpl extends Rendi
     }
 
     public ContentStream getContentStream() {
-        if ((objectId == null) || (fStreamId == null)) {
+        if ((objectId == null) || (streamId == null)) {
             return null;
         }
 
-        ContentStream contentStream = session.getBinding().getObjectService().getContentStream(
-                session.getRepositoryInfo().getId(), objectId, fStreamId, null, null, null);
+        ContentStream contentStream = session.getBinding().getObjectService()
+                .getContentStream(session.getRepositoryInfo().getId(), objectId, streamId, null, null, null);
         if (contentStream == null) {
             return null;
         }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java Wed Nov 17 09:59:05 2010
@@ -26,11 +26,7 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.SessionFactory;
 import org.apache.chemistry.opencmis.client.runtime.repository.RepositoryImpl;
-import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
-import org.apache.chemistry.opencmis.commons.enums.SessionType;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
 
 /**
@@ -53,55 +49,20 @@ import org.apache.chemistry.opencmis.com
 public class SessionFactoryImpl implements SessionFactory {
 
     protected SessionFactoryImpl() {
-
     }
 
     public static SessionFactory newInstance() {
         return new SessionFactoryImpl();
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.api.SessionFactory#createSession(java.util
-     * .Map)
-     */
     @SuppressWarnings("unchecked")
     public <T extends Session> T createSession(Map<String, String> parameters) {
-        Session s = null;
-        SessionType t = null;
-
-        // determine session type
-        if (parameters.containsKey(SessionParameter.SESSION_TYPE)) {
-            t = SessionType.fromValue(parameters.get(SessionParameter.SESSION_TYPE));
-        } else {
-            // default session type if type is not set
-            t = SessionType.PERSISTENT;
-        }
+        SessionImpl session = new SessionImpl(parameters);
+        session.connect();
 
-        switch (t) {
-        case PERSISTENT:
-            PersistentSessionImpl ps = new PersistentSessionImpl(parameters);
-            ps.connect(); // connect session with provider
-            s = ps;
-            break;
-        case TRANSIENT:
-            throw new CmisNotSupportedException("SessionType " + t + "not implemented!");
-        default:
-            throw new CmisRuntimeException("SessionType " + t + "not known!");
-        }
-
-        return (T) s;
+        return (T) session;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.api.SessionFactory#getRepositories(java.util
-     * .Map)
-     */
     public List<Repository> getRepositories(Map<String, String> parameters) {
         CmisBinding binding = CmisBindingHelper.createProvider(parameters);
 
@@ -114,5 +75,4 @@ public class SessionFactoryImpl implemen
 
         return result;
     }
-
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java Wed Nov 17 09:59:05 2010
@@ -18,7 +18,11 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.cache;
 
+import java.io.Serializable;
+import java.util.Map;
+
 import org.apache.chemistry.opencmis.client.api.CmisObject;
+import org.apache.chemistry.opencmis.client.api.Session;
 
 /**
  * Implements a session cache providing following capabilities:
@@ -28,7 +32,9 @@ import org.apache.chemistry.opencmis.cli
  * <li>access CmisObject by object path</li>
  * </ul>
  */
-public interface Cache {
+public interface Cache extends Serializable {
+
+    void initialize(Session session, Map<String, String> parameters);
 
     boolean containsId(String objectId, String cacheKey);
 
@@ -44,7 +50,5 @@ public interface Cache {
 
     void clear();
 
-    void resetPathCache();
-
     int getCacheSize();
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java Wed Nov 17 09:59:05 2010
@@ -18,212 +18,207 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.cache;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.lang.ref.SoftReference;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.chemistry.opencmis.client.api.CmisObject;
+import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.commons.PropertyIds;
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 
 /**
- * Non synchronized cache implementation. The cache is limited to a specific
- * size of entries and works in a LRU mode.
+ * Synchronized cache implementation. The cache is limited to a specific size of
+ * entries and works in a LRU mode.
  */
-public class CacheImpl implements Cache, Serializable {
+public class CacheImpl implements Cache {
 
     private static final long serialVersionUID = 1L;
 
     private static final float HASHTABLE_LOAD_FACTOR = 0.75f;
 
     private int cacheSize;
+    private int cacheTtl;
+    private int pathToIdSize;
+    private int pathToIdTtl;
 
-    private LinkedHashMap<String, Map<String, CmisObject>> objectMap;
-    private Map<String, String> pathToIdMap;
+    private LinkedHashMap<String, CacheItem<Map<String, CmisObject>>> objectMap;
+    private LinkedHashMap<String, CacheItem<String>> pathToIdMap;
 
-    private final ReentrantReadWriteLock fLock = new ReentrantReadWriteLock();
+    private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 
     /**
-     * Creates a new cache instance with a default size.
+     * Default constructor.
      */
-    public static Cache newInstance() {
-        return new CacheImpl();
+    public CacheImpl() {
     }
 
-    /**
-     * Creates a new cache instance with the given size.
-     */
-    public static Cache newInstance(int cacheSize) {
-        return new CacheImpl(cacheSize);
-    }
+    public void initialize(Session session, Map<String, String> parameters) {
+        lock.writeLock().lock();
+        try {
+            // cache size
+            try {
+                cacheSize = Integer.valueOf(parameters.get(SessionParameter.CACHE_SIZE_OBJECTS));
+                if (cacheSize < 0) {
+                    cacheSize = 0;
+                }
+            } catch (Exception e) {
+                cacheSize = 1000;
+            }
 
-    /**
-     * Default constructor.
-     */
-    protected CacheImpl() {
-        this(1000); // default cache size
-    }
+            // cache time-to-live
+            try {
+                cacheTtl = Integer.valueOf(parameters.get(SessionParameter.CACHE_TTL_OBJECTS));
+                if (cacheTtl < 0) {
+                    cacheTtl = 2 * 60 * 60 * 1000;
+                }
+            } catch (Exception e) {
+                cacheTtl = 2 * 60 * 60 * 1000;
+            }
 
-    /**
-     * Constructor taking a cache size.
-     */
-    protected CacheImpl(int cacheSize) {
-        this.cacheSize = cacheSize;
-        initialize();
+            // path-to-id size
+            try {
+                pathToIdSize = Integer.valueOf(parameters.get(SessionParameter.CACHE_SIZE_PATHTOID));
+                if (pathToIdSize < 0) {
+                    pathToIdSize = 0;
+                }
+            } catch (Exception e) {
+                pathToIdSize = 1000;
+            }
+
+            // path-to-id time-to-live
+            try {
+                pathToIdTtl = Integer.valueOf(parameters.get(SessionParameter.CACHE_TTL_PATHTOID));
+                if (pathToIdTtl < 0) {
+                    pathToIdTtl = 30 * 60 * 1000;
+                }
+            } catch (Exception e) {
+                pathToIdTtl = 30 * 60 * 1000;
+            }
+
+            initializeInternals();
+        } finally {
+            lock.writeLock().unlock();
+        }
     }
 
     /**
      * Sets up the internal objects.
      */
-    protected void initialize() {
-        fLock.writeLock().lock();
+    private void initializeInternals() {
+        lock.writeLock().lock();
         try {
-            int hashTableCapacity = (int) Math.ceil(cacheSize / HASHTABLE_LOAD_FACTOR) + 1;
+            // object cache
+            int cacheHashTableCapacity = (int) Math.ceil(cacheSize / HASHTABLE_LOAD_FACTOR) + 1;
 
             final int cs = cacheSize;
 
-            objectMap = new LinkedHashMap<String, Map<String, CmisObject>>(hashTableCapacity, HASHTABLE_LOAD_FACTOR) {
+            objectMap = new LinkedHashMap<String, CacheItem<Map<String, CmisObject>>>(cacheHashTableCapacity,
+                    HASHTABLE_LOAD_FACTOR) {
 
                 private static final long serialVersionUID = 1L;
 
                 @Override
-                protected boolean removeEldestEntry(Map.Entry<String, Map<String, CmisObject>> eldest) {
+                protected boolean removeEldestEntry(Map.Entry<String, CacheItem<Map<String, CmisObject>>> eldest) {
                     return size() > cs;
                 }
             };
 
-            resetPathCache();
+            // path-to-id mapping
+            int pathtoidHashTableCapacity = (int) Math.ceil(pathToIdSize / HASHTABLE_LOAD_FACTOR) + 1;
+
+            final int ptis = pathToIdSize;
+
+            pathToIdMap = new LinkedHashMap<String, CacheItem<String>>(pathtoidHashTableCapacity, HASHTABLE_LOAD_FACTOR) {
+
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                protected boolean removeEldestEntry(Map.Entry<String, CacheItem<String>> eldest) {
+                    return size() > ptis;
+                }
+            };
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.opencmis.client.runtime.cache.Cache#clear()
-     */
     public void clear() {
-        initialize();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.opencmis.client.runtime.cache.Cache#resetPathCache()
-     */
-    public void resetPathCache() {
-        fLock.writeLock().lock();
-        try {
-            pathToIdMap = new HashMap<String, String>();
-        } finally {
-            fLock.writeLock().unlock();
-        }
+        initializeInternals();
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#containsId(java.lang.String
-     * , java.lang.String)
-     */
     public boolean containsId(String objectId, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
             if (!objectMap.containsKey(objectId)) {
                 return false;
             }
 
-            return objectMap.get(objectId).containsKey(cacheKey);
+            CacheItem<Map<String, CmisObject>> item = objectMap.get(objectId);
+            if (item.isExpired()) {
+                objectMap.remove(objectId);
+                return false;
+            }
+
+            return true;
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#containsPath(java.lang
-     * .String, java.lang.String)
-     */
     public boolean containsPath(String path, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
             if (!pathToIdMap.containsKey(path)) {
                 return false;
             }
 
-            return containsId(pathToIdMap.get(path), cacheKey);
+            CacheItem<String> item = pathToIdMap.get(path);
+            if (item.isExpired() || !containsId(item.getItem(), cacheKey)) {
+                pathToIdMap.remove(path);
+                return false;
+            }
+
+            return true;
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#getById(java.lang.String,
-     * java.lang.String)
-     */
     public CmisObject getById(String objectId, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
-            Map<String, CmisObject> cacheKeyMap = objectMap.get(objectId);
-            if (cacheKeyMap == null) {
-                return null; // not found
+            if (!containsId(objectId, cacheKey)) {
+                return null;
             }
 
-            return cacheKeyMap.get(cacheKey);
+            Map<String, CmisObject> item = objectMap.get(objectId).getItem();
+            return (item == null ? null : item.get(cacheKey));
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#getByPath(java.lang.String
-     * , java.lang.String)
-     */
     public CmisObject getByPath(String path, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
-            String id = pathToIdMap.get(path);
-            if (id == null) {
-                return null; // not found
-            }
-
-            CmisObject object = getById(id, cacheKey);
-            if ((object == null) && (!objectMap.containsKey(id))) {
-                // clean up
-                fLock.readLock().unlock();
-                fLock.writeLock().lock();
-                try {
-                    pathToIdMap.remove(path);
-                } finally {
-                    fLock.writeLock().unlock();
-                    fLock.readLock().lock();
-                }
+            if (!containsPath(path, cacheKey)) {
+                return null;
             }
 
-            return object;
+            CacheItem<String> item = pathToIdMap.get(path);
+            return getById(item.getItem(), cacheKey);
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#put(org.apache.opencmis
-     * .client.api.CmisObject, java.lang.String)
-     */
     public void put(CmisObject object, String cacheKey) {
         // no object, no cache key - no cache
         if ((object == null) || (cacheKey == null)) {
@@ -235,54 +230,100 @@ public class CacheImpl implements Cache,
             return;
         }
 
-        fLock.writeLock().lock();
+        lock.writeLock().lock();
         try {
             // get cache key map
-            Map<String, CmisObject> cacheKeyMap = objectMap.get(object.getId());
+            CacheItem<Map<String, CmisObject>> cacheKeyMap = objectMap.get(object.getId());
             if (cacheKeyMap == null) {
-                cacheKeyMap = new HashMap<String, CmisObject>();
+                cacheKeyMap = new CacheItem<Map<String, CmisObject>>(new HashMap<String, CmisObject>(), cacheTtl);
                 objectMap.put(object.getId(), cacheKeyMap);
             }
 
             // put into id cache
-            cacheKeyMap.put(cacheKey, object);
+            Map<String, CmisObject> m = cacheKeyMap.getItem();
+            if (m != null) {
+                m.put(cacheKey, object);
+            }
 
             // folders may have a path, use it!
             String path = object.getPropertyValue(PropertyIds.PATH);
             if (path != null) {
-                pathToIdMap.put(path, object.getId());
+                pathToIdMap.put(path, new CacheItem<String>(object.getId(), pathToIdTtl));
             }
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.opencmis.client.runtime.cache.Cache#putPath(java.lang.String,
-     * org.apache.opencmis.client.api.CmisObject, java.lang.String)
-     */
     public void putPath(String path, CmisObject object, String cacheKey) {
-        fLock.writeLock().lock();
+        if (path == null) {
+            return;
+        }
+
+        lock.writeLock().lock();
         try {
             put(object, cacheKey);
 
             if ((object != null) && (object.getId() != null) && (cacheKey != null)) {
-                pathToIdMap.put(path, object.getId());
+                pathToIdMap.put(path, new CacheItem<String>(object.getId(), pathToIdTtl));
             }
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.opencmis.client.runtime.cache.Cache#getCacheSize()
-     */
     public int getCacheSize() {
         return this.cacheSize;
     }
+
+    // --- cache item ---
+
+    private class CacheItem<T> implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        private SoftReference<T> item;
+        private long timestamp;
+        private int ttl;
+
+        public CacheItem(T item, int ttl) {
+            this.item = new SoftReference<T>(item);
+            timestamp = System.currentTimeMillis();
+            this.ttl = ttl;
+        }
+
+        public synchronized boolean isExpired() {
+            if ((item == null) || (item.get() == null)) {
+                return true;
+            }
+
+            return (timestamp + ttl < System.currentTimeMillis());
+        }
+
+        public synchronized T getItem() {
+            if (isExpired()) {
+                item = null;
+                return null;
+            }
+
+            return item.get();
+        }
+
+        private void writeObject(ObjectOutputStream out) throws IOException {
+            out.writeObject(isExpired() ? null : item.get());
+            out.writeLong(timestamp);
+            out.writeInt(ttl);
+        }
+
+        private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+            @SuppressWarnings("unchecked")
+            T object = (T) in.readObject();
+            timestamp = in.readLong();
+            ttl = in.readInt();
+
+            if ((object != null) && (timestamp + ttl >= System.currentTimeMillis())) {
+                this.item = new SoftReference<T>(object);
+            }
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java Wed Nov 17 09:59:05 2010
@@ -47,11 +47,6 @@ public class RepositoryImpl extends Repo
         this.sessionFactory = sessionFactory;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.opencmis.client.api.repository.Repository#createSession()
-     */
     @SuppressWarnings("unchecked")
     public <T extends Session> T createSession() {
         return (T) sessionFactory.createSession(parameters);

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java Wed Nov 17 09:59:05 2010
@@ -23,12 +23,15 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.util.HashMap;
+import java.util.Map;
 
 import junit.framework.Assert;
 
 import org.apache.chemistry.opencmis.client.api.CmisObject;
 import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
 import org.apache.chemistry.opencmis.client.runtime.cache.CacheImpl;
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -40,7 +43,7 @@ public class CacheTest {
 
     @Test
     public void cacheSingleObjectTest() {
-        Cache cache = CacheImpl.newInstance();
+        Cache cache = createCache(100, 3600 * 1000);
 
         String id = "1";
         // String path = "/1";
@@ -71,14 +74,14 @@ public class CacheTest {
     @Test
     public void cacheSizeTest() {
         int cacheSize = 50000;
-        Cache cache = CacheImpl.newInstance(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
         Assert.assertEquals(cacheSize, cache.getCacheSize());
     }
 
     @Test
     public void lruTest() {
         int cacheSize = 3;
-        Cache cache = CacheImpl.newInstance(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
 
         String cacheKey = "key";
 
@@ -93,10 +96,28 @@ public class CacheTest {
         Assert.assertNotNull(cache.getById("id3", cacheKey));
     }
 
+    @SuppressWarnings("static-access")
+    @Test
+    public void ttlTest() throws InterruptedException {
+        Cache cache = createCache(10, 500);
+
+        String cacheKey = "key";
+        String id = "id";
+
+        CmisObject obj = this.createCmisObject(id);
+        cache.put(obj, cacheKey);
+
+        Assert.assertNotNull(cache.getById(id, cacheKey));
+
+        Thread.currentThread().sleep(501);
+
+        Assert.assertNull(cache.getById(id, cacheKey));
+    }
+
     @Test
     public void serializationTest() throws IOException, ClassNotFoundException {
         int cacheSize = 10;
-        Cache cache = CacheImpl.newInstance(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
 
         String cacheKey = "key";
 
@@ -119,7 +140,6 @@ public class CacheTest {
             CmisObject o2 = cache2.getById("id" + k, cacheKey);
             Assert.assertEquals(o1.getId(), o2.getId());
         }
-
     }
 
     /**
@@ -132,4 +152,16 @@ public class CacheTest {
     private CmisObject createCmisObject(final String id) {
         return new CmisObjectMock(id);
     }
+
+    private Cache createCache(int cacheSize, int ttl) {
+        Cache cache = new CacheImpl();
+
+        Map<String, String> parameters = new HashMap<String, String>();
+        parameters.put(SessionParameter.CACHE_SIZE_OBJECTS, "" + cacheSize);
+        parameters.put(SessionParameter.CACHE_TTL_OBJECTS, "" + ttl);
+
+        cache.initialize(null, parameters);
+
+        return cache;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java Wed Nov 17 09:59:05 2010
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.api.CmisObject;
+import org.apache.chemistry.opencmis.client.api.CmisObjectAdapter;
 import org.apache.chemistry.opencmis.client.api.ItemIterable;
 import org.apache.chemistry.opencmis.client.api.ObjectId;
 import org.apache.chemistry.opencmis.client.api.ObjectType;
@@ -32,6 +33,7 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.Property;
 import org.apache.chemistry.opencmis.client.api.Relationship;
 import org.apache.chemistry.opencmis.client.api.Rendition;
+import org.apache.chemistry.opencmis.client.api.TransientCmisObject;
 import org.apache.chemistry.opencmis.commons.data.Ace;
 import org.apache.chemistry.opencmis.commons.data.Acl;
 import org.apache.chemistry.opencmis.commons.data.AllowableActions;
@@ -54,7 +56,8 @@ public class CmisObjectMock implements C
         this.id = id;
     }
 
-    public void addAcl(List<Ace> addAces, AclPropagation aclPropagation) {
+    public Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation) {
+        return null;
     }
 
     public Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation) {
@@ -151,11 +154,7 @@ public class CmisObjectMock implements C
     public List<CmisExtensionElement> getExtensions(ExtensionLevel level) {
         return null;
     }
-
-    public boolean isChanged() {
-        return false;
-    }
-
+    
     public void refresh() {
 
     }
@@ -164,31 +163,38 @@ public class CmisObjectMock implements C
 
     }
 
-    public void removeAcl(List<Ace> removeAces, AclPropagation aclPropagation) {
-
+    public Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation) {
+        return null;
     }
 
-    public void removePolicy(ObjectId policyId) {
-
+    public ObjectId updateProperties() {
+        return null;
     }
 
-    public void setName(String name) {
-
+    public CmisObject updateProperties(Map<String, ?> properties) {
+        return null;
     }
-
-    public <T> void setProperty(String id, Object value) {
+    
+    public ObjectId updateProperties(Map<String, ?> properties, boolean refresh) {
+        return null;
     }
 
-    public ObjectId updateProperties() {
-        return null;
+    public void applyPolicy(ObjectId... policyIds) {
+        
     }
 
-    public ObjectId updateProperties(Map<String, ?> properties) {
-        return null;
+    public void removePolicy(ObjectId... policyIds) {
     }
 
     public String getId() {
         return this.id;
     }
 
+    public CmisObjectAdapter getAdapter(Class<? extends CmisObjectAdapter> adapterInterface) {
+        return null;
+    }
+
+    public TransientCmisObject getTransientObject() {
+        return null;
+    }
 };

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java?rev=1035966&r1=1035965&r2=1035966&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java Wed Nov 17 09:59:05 2010
@@ -70,9 +70,15 @@ public final class SessionParameter {
      */
     public static final String AUTH_SOAP_USERNAMETOKEN = "org.apache.chemistry.opencmis.binding.auth.soap.usernametoken";
 
+    public static final String CACHE_SIZE_OBJECTS = "org.apache.chemistry.opencmis.cache.objects.size";
+    public static final String CACHE_TTL_OBJECTS = "org.apache.chemistry.opencmis.cache.objects.ttl";
+    public static final String CACHE_SIZE_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.size";
+    public static final String CACHE_TTL_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.ttl";
+    public static final String CACHE_PATH_OMIT = "org.apache.chemistry.opencmis.cache.path.omit";
+    
     public static final String CACHE_SIZE_REPOSITORIES = "org.apache.chemistry.opencmis.binding.cache.repositories.size";
     public static final String CACHE_SIZE_TYPES = "org.apache.chemistry.opencmis.binding.cache.types.size";
-    public static final String CACHE_SIZE_OBJECTS = "org.apache.chemistry.opencmis.binding.cache.objects.size";
+    public static final String CACHE_SIZE_LINKS = "org.apache.chemistry.opencmis.binding.cache.links.size";
 
     // --- session control ---
 
@@ -80,6 +86,8 @@ public final class SessionParameter {
     public static final String LOCALE_ISO3166_COUNTRY = "org.apache.chemistry.opencmis.locale.iso3166";
     public static final String LOCALE_VARIANT = "org.apache.chemistry.opencmis.locale.variant";
 
-    public static final String SESSION_TYPE = "org.apache.chemistry.opencmis.session.type";
+    public static final String OBJECT_FACTORY_CLASS = "org.apache.chemistry.opencmis.objectfactory.classname";
+    public static final String CACHE_CLASS = "org.apache.chemistry.opencmis.cache.classname";
+
     public static final String REPOSITORY_ID = "org.apache.chemistry.opencmis.session.repository.id";
 }



Mime
View raw message