chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r934426 [2/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-api/src/main/java/or...
Date Thu, 15 Apr 2010 14:35:57 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java Thu Apr 15 14:35:55 2010
@@ -52,7 +52,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlEntry;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.FailedToDeleteData;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -352,7 +352,7 @@ public class FileShareRepository {
    * Create* dispatch for AtomPub.
    */
   public ObjectData create(CallContext context, PropertiesData properties, String folderId,
-      ContentStreamData contentStream, VersioningState versioningState, ObjectInfoHolder objectInfos) {
+      ContentStream contentStream, VersioningState versioningState, ObjectInfoHolder objectInfos) {
     debug("create");
     boolean userReadOnly = checkUser(context, true);
 
@@ -380,7 +380,7 @@ public class FileShareRepository {
    * CMIS createDocument.
    */
   public String createDocument(CallContext context, PropertiesData properties, String folderId,
-      ContentStreamData contentStream, VersioningState versioningState) {
+      ContentStream contentStream, VersioningState versioningState) {
     debug("createDocument");
     checkUser(context, true);
 
@@ -688,7 +688,7 @@ public class FileShareRepository {
    * CMIS setContentStream and deleteContentStream.
    */
   public void setContentStream(CallContext context, Holder<String> objectId, Boolean overwriteFlag,
-      ContentStreamData contentStream) {
+      ContentStream contentStream) {
     debug("setContentStream or deleteContentStream");
     checkUser(context, true);
 
@@ -930,7 +930,7 @@ public class FileShareRepository {
   /**
    * CMIS getContentStream.
    */
-  public ContentStreamData getContentStream(CallContext context, String objectId,
+  public ContentStream getContentStream(CallContext context, String objectId,
       BigInteger offset, BigInteger length) {
     debug("getContentStream");
     checkUser(context, false);
@@ -955,7 +955,7 @@ public class FileShareRepository {
 
     // compile data
     ContentStreamDataImpl result = new ContentStreamDataImpl();
-    result.setFilename(file.getName());
+    result.setFileName(file.getName());
     result.setLength(BigInteger.valueOf(file.length()));
     result.setMimeType(MIMETypes.getMIMEType(file));
     result.setStream(stream);

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/ObjectService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/ObjectService.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/ObjectService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/ObjectService.java Thu Apr 15 14:35:55 2010
@@ -25,7 +25,7 @@ import java.util.List;
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.FailedToDeleteData;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -68,7 +68,7 @@ public class ObjectService implements Cm
    * org.apache.opencmis.server.spi.ObjectInfoHolder)
    */
   public ObjectData create(CallContext context, String repositoryId, PropertiesData properties,
-      String folderId, ContentStreamData contentStream, VersioningState versioningState,
+      String folderId, ContentStream contentStream, VersioningState versioningState,
       List<String> policies, ExtensionsData extension, ObjectInfoHolder objectInfos) {
     return fRepositoryMap.getAuthenticatedRepository(context, repositoryId).create(context,
         properties, folderId, contentStream, versioningState, objectInfos);
@@ -87,7 +87,7 @@ public class ObjectService implements Cm
    * org.apache.opencmis.commons.api.ExtensionsData)
    */
   public String createDocument(CallContext context, String repositoryId, PropertiesData properties,
-      String folderId, ContentStreamData contentStream, VersioningState versioningState,
+      String folderId, ContentStream contentStream, VersioningState versioningState,
       List<String> policies, AccessControlList addAces, AccessControlList removeAces,
       ExtensionsData extension) {
     return fRepositoryMap.getAuthenticatedRepository(context, repositoryId).createDocument(context,
@@ -231,7 +231,7 @@ public class ObjectService implements Cm
    * .spi.CallContext, java.lang.String, java.lang.String, java.lang.String, java.math.BigInteger,
    * java.math.BigInteger, org.apache.opencmis.commons.api.ExtensionsData)
    */
-  public ContentStreamData getContentStream(CallContext context, String repositoryId,
+  public ContentStream getContentStream(CallContext context, String repositoryId,
       String objectId, String streamId, BigInteger offset, BigInteger length,
       ExtensionsData extension) {
     return fRepositoryMap.getAuthenticatedRepository(context, repositoryId).getContentStream(
@@ -331,7 +331,7 @@ public class ObjectService implements Cm
    * org.apache.opencmis.commons.api.ExtensionsData)
    */
   public void setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
-      Boolean overwriteFlag, Holder<String> changeToken, ContentStreamData contentStream,
+      Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream,
       ExtensionsData extension) {
     fRepositoryMap.getAuthenticatedRepository(context, repositoryId).setContentStream(context,
         objectId, overwriteFlag, contentStream);

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/VersioningService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/VersioningService.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/VersioningService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/VersioningService.java Thu Apr 15 14:35:55 2010
@@ -23,7 +23,7 @@ import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
 import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
@@ -77,7 +77,7 @@ public class VersioningService implement
    * org.apache.opencmis.server.spi.ObjectInfoHolder)
    */
   public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId,
-      Boolean major, PropertiesData properties, ContentStreamData contentStream,
+      Boolean major, PropertiesData properties, ContentStream contentStream,
       String checkinComment, List<String> policies, AccessControlList addAces,
       AccessControlList removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos) {
     throw new CmisNotSupportedException("checkIn not supported!");

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -25,7 +25,7 @@ import java.util.List;
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.FailedToDeleteData;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -46,7 +46,7 @@ public class ObjectServiceImpl extends A
   }
 
   public String createDocument(String repositoryId, PropertiesData properties, String folderId,
-      ContentStreamData contentStream, VersioningState versioningState, List<String> policies,
+      ContentStream contentStream, VersioningState versioningState, List<String> policies,
       AccessControlList addAces, AccessControlList removeAces, ExtensionsData extension) {
     
     return fObjSvc.createDocument(fDummyCallContext, repositoryId, properties, folderId, contentStream, versioningState, policies, addAces, removeAces, extension);
@@ -105,7 +105,7 @@ public class ObjectServiceImpl extends A
     return fObjSvc.getAllowableActions(fDummyCallContext, repositoryId, objectId, extension);
   }
 
-  public ContentStreamData getContentStream(String repositoryId, String objectId, String streamId,
+  public ContentStream getContentStream(String repositoryId, String objectId, String streamId,
       BigInteger offset, BigInteger length, ExtensionsData extension) {
     
     return fObjSvc.getContentStream(fDummyCallContext, repositoryId, objectId, streamId, offset, length, extension);
@@ -144,7 +144,7 @@ public class ObjectServiceImpl extends A
   }
 
   public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
-      Holder<String> changeToken, ContentStreamData contentStream, ExtensionsData extension) {
+      Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
     
     fObjSvc.setContentStream(fDummyCallContext, repositoryId, objectId, overwriteFlag, changeToken, contentStream, extension);
   }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -22,7 +22,7 @@ import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
 import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
@@ -44,7 +44,7 @@ public class VersioningServiceImpl exten
   }
 
   public void checkIn(String repositoryId, Holder<String> objectId, Boolean major,
-      PropertiesData properties, ContentStreamData contentStream, String checkinComment,
+      PropertiesData properties, ContentStream contentStream, String checkinComment,
       List<String> policies, AccessControlList addAces, AccessControlList removeAces,
       ExtensionsData extension) {
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java Thu Apr 15 14:35:55 2010
@@ -42,23 +42,23 @@ import org.apache.chemistry.opencmis.ser
  * For the Atom binding more information might be required than the result of a service call
  * provides (mainly to fill all the links). This class fills the objectInfoHolder that was introduced
  * for this purpose
- *  
+ *
  * @author Jens
  *
  */
 public class AtomLinkInfoProvider {
-  
+
   private StoreManager fStoreManager;
-  
+
   public AtomLinkInfoProvider(StoreManager storeManager) {
     fStoreManager = storeManager;
   }
-    
+
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding for a single object
-   * 
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -68,7 +68,7 @@ public class AtomLinkInfoProvider {
     if (null == objectInfos || null == so)
       return;
     TypeDefinition typeDef = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
-    
+
     ObjectInfoImpl objInfo = new ObjectInfoImpl();
    // Fill all setters:
     objInfo.setId(so.getId());
@@ -78,73 +78,73 @@ public class AtomLinkInfoProvider {
     objInfo.setLastModificationDate(so.getModifiedAt());
     objInfo.setTypeId(so.getTypeId());
     objInfo.setBaseType(typeDef.getBaseId());
-    
-    // versioning information: 
+
+    // versioning information:
     if (so instanceof DocumentVersion) {
       DocumentVersion ver = (DocumentVersion) so;
       DocumentVersion pwc = ver.getParentDocument().getPwc();
-      objInfo.setIsCurrentVersion (ver == ver.getParentDocument().getLatestVersion(false)); 
-      objInfo.setVersionSeriesId(ver.getParentDocument().getId()); 
+      objInfo.setIsCurrentVersion (ver == ver.getParentDocument().getLatestVersion(false));
+      objInfo.setVersionSeriesId(ver.getParentDocument().getId());
       objInfo.setWorkingCopyId(pwc==null ? null : pwc.getId());
       objInfo.setWorkingCopyOriginalId(pwc==ver ? ver.getParentDocument().getLatestVersion(false).getId() : null);
     } else if (so instanceof VersionedDocument) {
       VersionedDocument doc = (VersionedDocument) so;
       DocumentVersion pwc = doc.getPwc();
-      objInfo.setIsCurrentVersion (false); 
+      objInfo.setIsCurrentVersion (false);
       objInfo.setVersionSeriesId(doc.getId());
       objInfo.setWorkingCopyId(pwc==null ? null : pwc.getId());
-      objInfo.setWorkingCopyOriginalId(null);      
+      objInfo.setWorkingCopyOriginalId(null);
     } else { // unversioned document
-      objInfo.setIsCurrentVersion (true); 
+      objInfo.setIsCurrentVersion (true);
       objInfo.setVersionSeriesId(null);
       objInfo.setWorkingCopyId(null);
       objInfo.setWorkingCopyOriginalId(null);
     }
-    
+
     if (so instanceof Content) {
       Content cont = ((Content)so);
       objInfo.setHasContent(cont.getContent(0, -1) != null);
       objInfo.setContentType(cont.getContent(0, -1) != null ? cont.getContent(0, -1).getMimeType() : null);
-      objInfo.setFileName(cont.getContent(0, -1) != null ? cont.getContent(0, -1).getFilename() : null);
+      objInfo.setFileName(cont.getContent(0, -1) != null ? cont.getContent(0, -1).getFileName() : null);
     } else {
       objInfo.setHasContent(false);
       objInfo.setContentType(null);
       objInfo.setFileName(null);
     }
-    
+
     // Filing
     if (so instanceof Filing) {
       Filing sop = ((Filing)so);
       objInfo.setHasParent(!sop.getParents().isEmpty());
     } else {
-      objInfo.setHasParent(false);      
+      objInfo.setHasParent(false);
     }
-    
+
     // Renditions, currently not supported by in-memory provider
     objInfo.setRenditionInfos(null);
-    
+
     // Relationships, currently not supported by in-memory provider
     objInfo.setSupportsRelationships(false);
     objInfo.setRelationshipSourceIds(null);
     objInfo.setRelationshipTargetIds(null);
-    
+
     // Policies, currently not supported by in-memory provider
     objInfo.setSupportsPolicies(false);
-    
+
     // ACLs, currently not supported by in-memory provider
     objInfo.setHasAcl(false);
-    
+
     objInfo.setSupportsDescendants(true);
     objInfo.setSupportsFolderTree(true);
-    
+
     objectInfos.addObjectInfo(objInfo);
   }
-  
+
  /**
    * FillObjectInfoHolder object with required information needed for Atom binding for a single object
-   * 
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -153,18 +153,18 @@ public class AtomLinkInfoProvider {
   public void fillInformationForAtomLinks(String repositoryId, String objectId, ObjectInfoHolder objectInfos) {
     if (null == objectInfos || null == objectId)
       return;
-    
+
     ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
-    StoredObject so = objectStore.getObjectById(objectId);   
-    fillInformationForAtomLinks(repositoryId, so, objectInfos);    
+    StoredObject so = objectStore.getObjectById(objectId);
+    fillInformationForAtomLinks(repositoryId, so, objectInfos);
   }
 
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding
-   * after a getChildren() call in navigation service 
-   * 
+   * after a getChildren() call in navigation service
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -174,25 +174,25 @@ public class AtomLinkInfoProvider {
    */
   public void fillInformationForAtomLinks(String repositoryId, String objectId,
       ObjectInfoHolder objectInfos, ObjectInFolderList objList) {
-    
+
     if (null == objectInfos || null == objList || null == objectId)
       return;
 
     // Fill object information for requested object
     fillInformationForAtomLinks(repositoryId, objectId, objectInfos);
-    
+
     // Fill object information for all children in result list
     for (ObjectInFolderData object : objList.getObjects()) {
       fillInformationForAtomLinks(repositoryId, object.getObject().getId(), objectInfos);
     }
   }
-  
+
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding
-   * for an object list 
-   * 
+   * for an object list
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -202,29 +202,29 @@ public class AtomLinkInfoProvider {
    */
   public void fillInformationForAtomLinks(String repositoryId, String objectId,
       ObjectInfoHolder objectInfos, ObjectList objList) {
-   
+
     if (null != objectId) {
       // Fill object information for requested object
       fillInformationForAtomLinks(repositoryId, objectId, objectInfos);
     }
-    
+
     if (null != objList && null != objList.getObjects()) {
       // Fill object information for all children in result list
       List<ObjectData> listObjects = objList.getObjects();
       if (null != listObjects)
         for (ObjectData object : listObjects) {
           fillInformationForAtomLinks(repositoryId, object.getId(), objectInfos);
-        }    
+        }
     }
-    
+
   }
 
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding
-   * for an ObjectInFolderContainer 
-   * 
+   * for an ObjectInFolderContainer
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -232,28 +232,28 @@ public class AtomLinkInfoProvider {
    * @param objList
    *          result of getChildren call
    */
-  private void fillInformationForAtomLinks(String repositoryId, 
+  private void fillInformationForAtomLinks(String repositoryId,
       ObjectInfoHolder objectInfos, ObjectInFolderContainer oifc) {
-   
+
     if (null == objectInfos || null == oifc)
       return;
 
     // Fill object information for all elements in result list
     fillInformationForAtomLinks(repositoryId, objectInfos, oifc.getObject());
-    
+
     if (null!=oifc.getChildren())
       for (ObjectInFolderContainer object : oifc.getChildren()) {
         // call recursively
           fillInformationForAtomLinks(repositoryId, objectInfos, object);
-      }    
+      }
   }
 
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding
-   * for a list with ObjectInFolderContainers 
-   * 
+   * for a list with ObjectInFolderContainers
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -263,30 +263,30 @@ public class AtomLinkInfoProvider {
    */
   public void fillInformationForAtomLinks(String repositoryId, String objectId,
       ObjectInfoHolder objectInfos, List<ObjectInFolderContainer> oifcList) {
-   
+
     if (null == objectInfos || null == oifcList || null == objectId)
       return;
 
     // Fill object information for requested object
     fillInformationForAtomLinks(repositoryId, objectId, objectInfos);
-    
+
     for (ObjectInFolderContainer object : oifcList) {
       fillInformationForAtomLinks(repositoryId, objectInfos, object);
-    }    
+    }
   }
-  
+
   private void fillInformationForAtomLinks(String repositoryId,
       ObjectInfoHolder objectInfos, ObjectInFolderData object) {
-    
-    fillInformationForAtomLinks(repositoryId, object.getObject().getId(), objectInfos);    
+
+    fillInformationForAtomLinks(repositoryId, object.getObject().getId(), objectInfos);
   }
 
   /**
    * FillObjectInfoHolder object with required information needed for Atom binding
-   * for a list with ObjectParentData objects 
-   * 
+   * for a list with ObjectParentData objects
+   *
    * @param repositoryId
-   *          id of repository 
+   *          id of repository
    * @param objectId
    *          object to retrieve information for
    * @param objectInfos
@@ -296,17 +296,17 @@ public class AtomLinkInfoProvider {
    */
   public void fillInformationForAtomLinksGetParents(String repositoryId, String objectId,
       ObjectInfoHolder objectInfos, List<ObjectParentData> objParents) {
-    
+
     if (null == objectInfos || null == objParents || null == objectId)
       return;
 
     // Fill object information for requested object
     fillInformationForAtomLinks(repositoryId, objectId, objectInfos);
-    
+
     for (ObjectParentData object : objParents) {
       fillInformationForAtomLinks(repositoryId, object.getObject().getId(), objectInfos);
-    }        
+    }
   }
-  
-  
+
+
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -31,7 +31,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionContainer;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.FailedToDeleteData;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -85,7 +85,7 @@ public class InMemoryObjectServiceImpl e
   }
 
   public String createDocument(CallContext context, String repositoryId, PropertiesData properties,
-      String folderId, ContentStreamData contentStream, VersioningState versioningState,
+      String folderId, ContentStream contentStream, VersioningState versioningState,
       List<String> policies, AccessControlList addAces, AccessControlList removeAces,
       ExtensionsData extension) {
 
@@ -117,7 +117,7 @@ public class InMemoryObjectServiceImpl e
 
       StoredObject so = checkStandardParameters(repositoryId, sourceId);
 
-      ContentStreamData content = getContentStream(context, repositoryId, sourceId, null,
+      ContentStream content = getContentStream(context, repositoryId, sourceId, null,
           BigInteger.valueOf(-1), BigInteger.valueOf(-1), null);
 
       if (so == null)
@@ -222,7 +222,7 @@ public class InMemoryObjectServiceImpl e
    */
   @SuppressWarnings("unchecked")
   public ObjectData create(CallContext context, String repositoryId, PropertiesData properties,
-      String folderId, ContentStreamData contentStream, VersioningState versioningState,
+      String folderId, ContentStream contentStream, VersioningState versioningState,
       List<String> policies, ExtensionsData extension, ObjectInfoHolder objectInfos) {
 
     try {
@@ -395,7 +395,7 @@ public class InMemoryObjectServiceImpl e
     }
   }
 
-  public ContentStreamData getContentStream(CallContext context, String repositoryId,
+  public ContentStream getContentStream(CallContext context, String repositoryId,
       String objectId, String streamId, BigInteger offset, BigInteger length,
       ExtensionsData extension) {
 
@@ -413,7 +413,7 @@ public class InMemoryObjectServiceImpl e
         throw new CmisObjectNotFoundException("Id" + objectId
             + " does not refer to a document or version, but only those can have content");
 
-      ContentStreamData csd = getContentStream(so, streamId, offset, length);
+      ContentStream csd = getContentStream(so, streamId, offset, length);
       LOG.debug("stop getContentStream()");
       return csd;
     }
@@ -605,7 +605,7 @@ public class InMemoryObjectServiceImpl e
   }
 
   public void setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
-      Boolean overwriteFlag, Holder<String> changeToken, ContentStreamData contentStream,
+      Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream,
       ExtensionsData extension) {
 
     try {
@@ -777,7 +777,7 @@ public class InMemoryObjectServiceImpl e
   // private helper methods
 
   private StoredObject createDocumentIntern(String repositoryId, PropertiesData properties,
-      String folderId, ContentStreamData contentStream, VersioningState versioningState,
+      String folderId, ContentStream contentStream, VersioningState versioningState,
       List<String> policies, AccessControlList addACEs, AccessControlList removeACEs,
       ExtensionsData extension) {
     checkRepositoryId(repositoryId);
@@ -994,12 +994,12 @@ public class InMemoryObjectServiceImpl e
     return true;
   }
 
-  private ContentStreamData getContentStream(StoredObject so, String streamId, BigInteger offset,
+  private ContentStream getContentStream(StoredObject so, String streamId, BigInteger offset,
       BigInteger length) {
 
     long lOffset = offset == null ? 0 : offset.longValue();
     long lLength = length == null ? -1 : length.longValue();
-    ContentStreamData csd = ((Content) so).getContent(lOffset, lLength);
+    ContentStream csd = ((Content) so).getContent(lOffset, lLength);
     return csd;
   }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -25,7 +25,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
 import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
@@ -80,7 +80,7 @@ public class InMemoryVersioningServiceIm
   }
 
   public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId,
-      Boolean major, PropertiesData properties, ContentStreamData contentStream,
+      Boolean major, PropertiesData properties, ContentStream contentStream,
       String checkinComment, List<String> policies, AccessControlList addAces,
       AccessControlList removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos) {
 
@@ -133,7 +133,7 @@ public class InMemoryVersioningServiceIm
 
       VersionedDocument verDoc = getVersionedDocumentOfObjectId(so);
 
-      ContentStreamData content = null;
+      ContentStream content = null;
 
       if (so instanceof DocumentVersion) {
         // get document the version is contained in to c

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java Thu Apr 15 14:35:55 2010
@@ -18,7 +18,7 @@
  */
 package org.apache.chemistry.opencmis.inmemory.storedobj.api;
 
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 
 public interface Content {
   
@@ -33,7 +33,7 @@ public interface Content {
    * @return
    *    object containing mime-type, length and a stream with content
    */
-  ContentStreamData getContent(long offset, long length);
+  ContentStream getContent(long offset, long length);
 
   /**
    * Assign content do a document. Existing content gets overwritten.
@@ -43,6 +43,6 @@ public interface Content {
    * @param mustPersist
    *    persist document (set to false if content is set during creation of a document)
    */
-  void setContent(ContentStreamData content, boolean mustPersist);
+  void setContent(ContentStream content, boolean mustPersist);
   
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java Thu Apr 15 14:35:55 2010
@@ -20,7 +20,7 @@ package org.apache.chemistry.opencmis.in
 
 import java.util.List;
 
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
 
 /**
@@ -34,7 +34,7 @@ import org.apache.chemistry.opencmis.com
  */
 public interface VersionedDocument extends MultiFiling, StoredObject {
   
-  DocumentVersion addVersion(ContentStreamData content, VersioningState verState, String user);
+  DocumentVersion addVersion(ContentStream content, VersioningState verState, String user);
   
   /**
    * delete a version from this object, throw exception if document is checked out
@@ -51,7 +51,7 @@ public interface VersionedDocument exten
   
   void cancelCheckOut(String user);
   
-  DocumentVersion checkOut(ContentStreamData content, String user);
+  DocumentVersion checkOut(ContentStream content, String user);
   
   void checkIn(boolean isMajor, String checkinComment, String user);
   

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java Thu Apr 15 14:35:55 2010
@@ -7,9 +7,9 @@ import java.io.InputStream;
 import java.math.BigInteger;
 import java.util.List;
 
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 
-public class ContentStreamDataImpl implements ContentStreamData {
+public class ContentStreamDataImpl implements ContentStream {
 
   private int fLength;
 
@@ -18,9 +18,9 @@ public class ContentStreamDataImpl imple
   private String fFileName;
 
   private byte[] fContent;
-  
+
   private long fStreamLimitOffset;
-  
+
   private long fStreamLimitLength;
 
   public void setContent (InputStream in) throws IOException {
@@ -29,20 +29,24 @@ public class ContentStreamDataImpl imple
       fContent = null; // delete content
       fLength = 0;
     } else {
-      byte[] buffer = new byte[ 0xFFFF ]; 
+      byte[] buffer = new byte[ 0xFFFF ];
       ByteArrayOutputStream contentStream = new ByteArrayOutputStream();
       for ( int len=0; (len = in.read(buffer)) != -1; )  {
-        contentStream.write( buffer, 0, len ); 
+        contentStream.write( buffer, 0, len );
         fLength += len;
       }
       fContent = contentStream.toByteArray();
       fLength = contentStream.size();
       contentStream.close();
-      in.close();    
+      in.close();
     }
   }
 
-  public BigInteger getLength() {
+  public long getLength() {
+    return fLength;
+  }
+
+  public BigInteger getBigLength() {
     return BigInteger.valueOf(fLength);
   }
 
@@ -71,12 +75,12 @@ public class ContentStreamDataImpl imple
       return null;
     else if (fStreamLimitOffset <= 0 && fStreamLimitLength < 0)
       return new ByteArrayInputStream(fContent);
-    else 
+    else
       return new ByteArrayInputStream(fContent, (int)(fStreamLimitOffset<0 ? 0 : fStreamLimitOffset),
-          (int)(fStreamLimitLength<0 ? fLength : fStreamLimitLength));      
+          (int)(fStreamLimitLength<0 ? fLength : fStreamLimitLength));
   }
 
-  public ContentStreamData getCloneWithLimits(long offset, long length) {
+  public ContentStream getCloneWithLimits(long offset, long length) {
     ContentStreamDataImpl clone = new ContentStreamDataImpl();
     clone.fFileName = fFileName;
     clone.fLength = fLength;
@@ -86,8 +90,8 @@ public class ContentStreamDataImpl imple
     clone.fStreamLimitLength = length;
     return clone;
   }
-  
-  
+
+
   public List<Object> getExtensions() {
     return null;
   }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java Thu Apr 15 14:35:55 2010
@@ -24,7 +24,7 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.bindings.BindingsObjectFactory;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
 import org.apache.chemistry.opencmis.inmemory.FilterParser;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Document;
@@ -33,9 +33,9 @@ import org.apache.commons.logging.LogFac
 
 /**
  * InMemory Stored Document A document is a stored object that has a path and (optional) content
- * 
+ *
  * @author Jens
- * 
+ *
  */
 
 public class DocumentImpl extends AbstractMultiFilingImpl implements Document {
@@ -49,10 +49,10 @@ public class DocumentImpl extends Abstra
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.opencmis.client.provider.spi.inmemory.IDocument#getContent()
    */
-  public ContentStreamData getContent(long offset, long length) {
+  public ContentStream getContent(long offset, long length) {
     if (null == fContent)
       return null;
     else if (offset<=0 && length<0)
@@ -63,18 +63,18 @@ public class DocumentImpl extends Abstra
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see
    * org.opencmis.client.provider.spi.inmemory.IDocument#setContent(org.opencmis.client.provider
    * .ContentStreamData)
    */
-  public void setContent(ContentStreamData content, boolean mustPersist) {
-    
+  public void setContent(ContentStream content, boolean mustPersist) {
+
     if (null == content) {
       fContent = null;
-    } else {     
+    } else {
       fContent = new ContentStreamDataImpl();
-      fContent.setFileName(content.getFilename());
+      fContent.setFileName(content.getFileName());
       fContent.setMimeType(content.getMimeType());
       try {
         fContent.setContent(content.getStream());
@@ -93,11 +93,11 @@ public class DocumentImpl extends Abstra
 
     // fill the version related properties (versions should override this but the spec requires some
     // properties always to be set
-    
+
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_IS_IMMUTABLE, requestedIds)) {
       properties.put(PropertyIds.CMIS_IS_IMMUTABLE, objFactory.createPropertyBooleanData(PropertyIds.CMIS_IS_IMMUTABLE, false));
     }
-        
+
     // Set the content related properties
     if (null != fContent) {
       if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CONTENT_STREAM_FILE_NAME, requestedIds)) {
@@ -108,12 +108,12 @@ public class DocumentImpl extends Abstra
       // omit: PropertyIds.CMIS_CONTENT_STREAM_ID
       if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, requestedIds)) {
         properties.put(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, objFactory
-            .createPropertyIntegerData(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, fContent.getLength()));
+            .createPropertyIntegerData(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, fContent.getBigLength()));
       }
       if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, requestedIds)) {
         properties.put(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, objFactory
             .createPropertyStringData(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, fContent.getMimeType()));
-      }      
+      }
     }
   }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java Thu Apr 15 14:35:55 2010
@@ -25,7 +25,7 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.bindings.BindingsObjectFactory;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
 import org.apache.chemistry.opencmis.inmemory.FilterParser;
@@ -35,19 +35,19 @@ import org.apache.chemistry.opencmis.inm
 
 /**
  * A class representing a single version of a document
- * 
+ *
  * @author Jens
  *
  */
 public class DocumentVersionImpl extends StoredObjectImpl implements DocumentVersion {
-  
-  private ContentStreamDataImpl fContent;  
+
+  private ContentStreamDataImpl fContent;
   private VersionedDocument fContainer; // the document this version belongs to
   private String fComment; // checkin comment
   boolean fIsMajor;
   boolean fIsPwc; // true if this is the PWC
-  
-  public DocumentVersionImpl(String repositoryId, VersionedDocument container, ContentStreamData content,
+
+  public DocumentVersionImpl(String repositoryId, VersionedDocument container, ContentStream content,
       VersioningState verState, ObjectStoreImpl objStore) {
     super(objStore);
     setRepositoryId(repositoryId);
@@ -57,13 +57,13 @@ public class DocumentVersionImpl extends
     fIsPwc = verState == VersioningState.CHECKEDOUT;
     fProperties = new HashMap<String, PropertyData<?>>(); // ensure that we have a map
   }
-  
-  public void setContent(ContentStreamData content, boolean mustPersist) {
+
+  public void setContent(ContentStream content, boolean mustPersist) {
     if (null == content) {
       fContent = null;
-    } else {     
+    } else {
       fContent = new ContentStreamDataImpl();
-      fContent.setFileName(content.getFilename());
+      fContent.setFileName(content.getFileName());
       fContent.setMimeType(content.getMimeType());
       try {
         fContent.setContent(content.getStream());
@@ -72,9 +72,9 @@ public class DocumentVersionImpl extends
         e.printStackTrace();
         throw new RuntimeException("Failed to get content from InputStream" , e);
       }
-    }  
+    }
   }
-  
+
   public void setCheckinComment(String comment) {
     fComment = comment;
   }
@@ -110,14 +110,14 @@ public class DocumentVersionImpl extends
     fIsPwc = false; // unset working copy flag
     fIsMajor = isMajor;
   }
-  
-  public ContentStreamData getContent(long offset, long length) {
+
+  public ContentStream getContent(long offset, long length) {
     if (offset<=0 && length<0)
       return fContent;
     else
       return fContent.getCloneWithLimits(offset, length);
   }
-  
+
   public VersionedDocument getParentDocument() {
     return fContainer;
   }
@@ -135,36 +135,36 @@ public class DocumentVersionImpl extends
   private boolean isLatestMajorVersion() {
     if (!fIsMajor)
       return false;
-    
+
     List<DocumentVersion> allVersions = fContainer.getAllVersions();
     DocumentVersion latestMajor=null;
-    
+
     for (DocumentVersion ver : allVersions)
-      if (ver.isMajor() && !ver.isPwc()) 
+      if (ver.isMajor() && !ver.isPwc())
         latestMajor = ver;
 
     boolean isLatestMajorVersion = latestMajor == this;
     return isLatestMajorVersion;
   }
-  
+
 //  public void persist() {
 //    if (null==fId)
 //      fId = UUID.randomUUID().toString();
 //  }
-  
+
   public void fillProperties(Map<String, PropertyData<?>> properties, BindingsObjectFactory objFactory,
       List<String> requestedIds) {
-    
+
     DocumentVersion pwc = fContainer.getPwc();
 
     // First get the properties of the container (like custom type properties, etc)
     fContainer.fillProperties(properties, objFactory, requestedIds);
-    
+
     // overwrite the version specific properties (like modification date, user, etc.)
     // and set some properties specific to the version
     super.fillProperties(properties, objFactory, requestedIds);
-    
-    // fill the version related properties 
+
+    // fill the version related properties
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_IS_LATEST_VERSION, requestedIds)) {
       properties.put(PropertyIds.CMIS_IS_LATEST_VERSION, objFactory.createPropertyBooleanData(PropertyIds.CMIS_IS_LATEST_VERSION, isLatestVersion()));
     }
@@ -174,7 +174,7 @@ public class DocumentVersionImpl extends
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_IS_LATEST_MAJOR_VERSION, requestedIds)) {
       properties.put(PropertyIds.CMIS_IS_LATEST_MAJOR_VERSION, objFactory.createPropertyBooleanData(PropertyIds.CMIS_IS_LATEST_MAJOR_VERSION, isLatestMajorVersion()));
     }
-    if (FilterParser.isContainedInFilter(PropertyIds.CMIS_VERSION_SERIES_ID, requestedIds)) { 
+    if (FilterParser.isContainedInFilter(PropertyIds.CMIS_VERSION_SERIES_ID, requestedIds)) {
       properties.put(PropertyIds.CMIS_VERSION_SERIES_ID, objFactory.createPropertyIdData(PropertyIds.CMIS_VERSION_SERIES_ID, fContainer.getId()));
     }
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_IS_VERSION_SERIES_CHECKED_OUT, requestedIds)) {
@@ -188,7 +188,7 @@ public class DocumentVersionImpl extends
     }
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CHECKIN_COMMENT, requestedIds)) {
       properties.put(PropertyIds.CMIS_CHECKIN_COMMENT, objFactory.createPropertyStringData(PropertyIds.CMIS_CHECKIN_COMMENT, fComment));
-    }    
+    }
     if (FilterParser.isContainedInFilter(PropertyIds.CMIS_VERSION_LABEL, requestedIds)) {
       properties.put(PropertyIds.CMIS_VERSION_LABEL, objFactory.createPropertyStringData(PropertyIds.CMIS_VERSION_LABEL, getVersionLabel()));
     }
@@ -200,17 +200,17 @@ public class DocumentVersionImpl extends
             .createPropertyStringData(PropertyIds.CMIS_CONTENT_STREAM_FILE_NAME, fContent
                 .getFileName()));
       }
-      
+
       // omit: PropertyIds.CMIS_CONTENT_STREAM_ID
 
       if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, requestedIds)) {
         properties.put(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, objFactory
-            .createPropertyIntegerData(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, fContent.getLength()));
+            .createPropertyIntegerData(PropertyIds.CMIS_CONTENT_STREAM_LENGTH, fContent.getBigLength()));
       }
       if (FilterParser.isContainedInFilter(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, requestedIds)) {
         properties.put(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, objFactory
             .createPropertyStringData(PropertyIds.CMIS_CONTENT_STREAM_MIME_TYPE, fContent.getMimeType()));
-      }      
+      }
     }
   }
 
@@ -227,7 +227,7 @@ public class DocumentVersionImpl extends
   }
 
   public void addParent(Folder parent) {
-    fContainer.addParent(parent);    
+    fContainer.addParent(parent);
   }
 
   public void removeParent(Folder parent) {

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java Thu Apr 15 14:35:55 2010
@@ -24,7 +24,7 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.bindings.BindingsObjectFactory;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
@@ -45,7 +45,7 @@ public class VersionedDocumentImpl exten
     fIsCheckedOut = false;
   }
   
-  public DocumentVersion addVersion(ContentStreamData content,
+  public DocumentVersion addVersion(ContentStream content,
       VersioningState verState, String user) {
     
     if (isCheckedOut())
@@ -100,7 +100,7 @@ public class VersionedDocumentImpl exten
     pwc.commit(isMajor);
   }
 
-  public DocumentVersion checkOut(ContentStreamData content, String user) {
+  public DocumentVersion checkOut(ContentStream content, String user) {
     if (fIsCheckedOut) {
       throw new CmisConstraintException("Error: Can't checkout, Document " + getId() + " is already checked out.");
     }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java Thu Apr 15 14:35:55 2010
@@ -21,7 +21,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.BindingsObjectFactory;
 import org.apache.chemistry.opencmis.commons.bindings.CmisBinding;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.MultiFilingService;
 import org.apache.chemistry.opencmis.commons.bindings.NavigationService;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -57,7 +57,7 @@ public class AbstractServiceTst /* exten
   protected DummyCallContext fTestCallContext;
   private String fTypeCreatorClassName;
   private boolean fUseClientProviderInterface;
-  
+
   public AbstractServiceTst() {
     // The in-memory server unit tests can either be run directly against the
     // service implementation or against a client provider interface. The client
@@ -68,12 +68,12 @@ public class AbstractServiceTst /* exten
       // Init with default types, can be overridden by subclasses:
     fTypeCreatorClassName = UnitTestTypeSystemCreator.class.getName();
   }
-  
+
   // Subclasses may want to use their own types
   protected void setTypeCreatorClass(String typeCreatorClassName) {
     fTypeCreatorClassName = typeCreatorClassName;
   }
-  
+
   protected void setUp() throws Exception {
     //super.setUp();
     LOG.debug("Initializing InMemory Test with type creator class: " + fTypeCreatorClassName);
@@ -88,10 +88,10 @@ public class AbstractServiceTst /* exten
     // attach repository info to the session:
     parameters
         .put(ConfigConstants.REPOSITORY_INFO_CREATOR_CLASS, UnitTestRepositoryInfo.class.getName());
-    
+
     // give subclasses a chance to provide additional parameters for special tests
     addParameters(parameters);
-    
+
     fTestCallContext = new DummyCallContext();
     // Attach a standatrd CallContext to a thread before the services are initialized.
     RuntimeContext.attachCfg(fTestCallContext);
@@ -100,28 +100,28 @@ public class AbstractServiceTst /* exten
       initializeUsingClientProvider(parameters);
     else
       initializeDirect(parameters);
-    
+
     assertNotNull(fRepSvc);
     assertNotNull(fObjSvc);
     assertNotNull(fNavSvc);
-    
+
     RepositoryInfo rep = fRepSvc.getRepositoryInfo(REPOSITORY_ID, null);
     fRootFolderId = rep.getRootFolderId();
     fRepositoryId = rep.getId();
-    
+
     assertNotNull(fRepositoryId);
-    assertNotNull(fRootFolderId);    
+    assertNotNull(fRootFolderId);
   }
-  
+
   // Override this method in subclasses if you want to provide additional configuration
   // parameters. Default implementation is empty
-  protected void addParameters(Map<String, String> parameters) {    
+  protected void addParameters(Map<String, String> parameters) {
   }
 
   protected void tearDown() throws Exception {
     // super.tearDown();
   }
-  
+
   public void testDummy() {
     // dummy test to make tools happy that complain if there are no tests available in a test class
   }
@@ -138,9 +138,9 @@ public class AbstractServiceTst /* exten
     }
     return id;
   }
- 
+
   protected String createDocument(String name, String folderId, String typeId, VersioningState versioningState, boolean withContent) {
-    ContentStreamData contentStream = null;
+    ContentStream contentStream = null;
     List<String> policies = null;
     AccessControlList addACEs = null;
     AccessControlList removeACEs = null;
@@ -161,13 +161,13 @@ public class AbstractServiceTst /* exten
       fail("createDocument() failed with exception: " + e);
     }
     return id;
-    
+
   }
   protected String createDocument(String name, String folderId, String typeId, boolean withContent) {
     VersioningState versioningState = VersioningState.NONE;
     return createDocument(name, folderId, typeId, versioningState, withContent);
   }
-  
+
   protected PropertiesData createDocumentProperties(String name, String typeId) {
     List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
     properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_NAME, name));
@@ -175,7 +175,7 @@ public class AbstractServiceTst /* exten
     PropertiesData props = fFactory.createPropertiesData(properties);
     return props;
   }
-  
+
   protected PropertiesData createFolderProperties(String folderName, String typeId) {
     List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
     properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_NAME, folderName));
@@ -184,13 +184,13 @@ public class AbstractServiceTst /* exten
     return props;
   }
 
-  protected ContentStreamData createContent() {
+  protected ContentStream createContent() {
     ContentStreamDataImpl content = new ContentStreamDataImpl();
     content.setFileName("data.txt");
     content.setMimeType("text/plain");
     int len = 32 * 1024;
     byte[] b = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a,     
+                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a,
                 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
                 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a
                 }; // 32 Bytes
@@ -204,8 +204,8 @@ public class AbstractServiceTst /* exten
     }
     return content;
   }
-  
-  protected ContentStreamData createContent(char ch) {
+
+  protected ContentStream createContent(char ch) {
     ContentStreamDataImpl content = new ContentStreamDataImpl();
     content.setFileName("data.txt");
     content.setMimeType("text/plain");
@@ -223,16 +223,16 @@ public class AbstractServiceTst /* exten
     }
     return content;
   }
-  protected void verifyContentResult(ContentStreamData sd) {
+  protected void verifyContentResult(ContentStream sd) {
     assertEquals("text/plain", sd.getMimeType());
-    assertEquals("data.txt", sd.getFilename());
-    assertEquals(32 * 1024, sd.getLength().longValue());
+    assertEquals("data.txt", sd.getFileName());
+    assertEquals(32 * 1024, sd.getBigLength().longValue());
     byte[] ba = new byte[32];
     InputStream is = sd.getStream();
     int counter = 0;
     try {
       while (is.read(ba) == ba.length) {
-        ++counter;      
+        ++counter;
         assertEquals(0x61, ba[0]);
         assertEquals(0x6e, ba[29]);
         assertEquals(0x0c, ba[30]);
@@ -254,12 +254,12 @@ public class AbstractServiceTst /* exten
       assertEquals(id, res.getId());
     } catch (Exception e) {
       fail("getObject() failed with exception: " + e);
-    }    
+    }
     return res.getId();
   }
-  
+
   @SuppressWarnings("unchecked")
-  protected String getPathOfFolder(String id) {    
+  protected String getPathOfFolder(String id) {
     String path=null;
     try {
       String filter = PropertyIds.CMIS_PATH;
@@ -271,14 +271,14 @@ public class AbstractServiceTst /* exten
       assertNotNull(path);
     } catch (Exception e) {
       fail("getProperties() failed with exception: " + e);
-    }    
+    }
     return path;
   }
 
   @SuppressWarnings("unchecked")
-  protected String getPathOfDocument(String id) {    
+  protected String getPathOfDocument(String id) {
     String path=null;
-    String filter = "*"; 
+    String filter = "*";
     List<ObjectParentData> parentData = fNavSvc.getObjectParents(fRepositoryId, id, filter, false, IncludeRelationships.NONE, null, true, null);
     String name = parentData.get(0).getRelativePathSegment();
     PropertyData<String> pd = (PropertyData<String>) parentData.get(0).getObject().getProperties().getProperties().get(PropertyIds.CMIS_PATH);
@@ -296,10 +296,10 @@ public class AbstractServiceTst /* exten
       assertNotNull(res);
       returnedId = res.getId();
       testReturnedProperties(returnedId, res.getProperties().getProperties());
-      assertEquals(id, returnedId);    
+      assertEquals(id, returnedId);
     } catch (Exception e) {
       fail("getObject() failed with exception: " + e);
-    }    
+    }
     return res;
   }
 
@@ -313,7 +313,7 @@ public class AbstractServiceTst /* exten
     for (PropertyData<?> pd : props.values()) {
       LOG.debug("return property id: " + pd.getId() + ", value: " + pd.getValues());
     }
-    
+
     PropertyData<?> pd = props.get(PropertyIds.CMIS_OBJECT_ID);
     assertNotNull(pd);
     assertEquals(objectId, pd.getFirstValue());
@@ -321,7 +321,7 @@ public class AbstractServiceTst /* exten
 
 
   /**
-   * Instantiates the services by using directly the service implementations. 
+   * Instantiates the services by using directly the service implementations.
    * @param parameters
    *    configuration parameters for client provider interface and in-memory provider
    */
@@ -329,18 +329,18 @@ public class AbstractServiceTst /* exten
     CmisInMemoryProvider inMemSpi = new CmisInMemoryProvider(parameters);
     fRepSvc = inMemSpi.getRepositoryService();
     fObjSvc = inMemSpi.getObjectService();
-    fNavSvc = inMemSpi.getNavigationService();    
+    fNavSvc = inMemSpi.getNavigationService();
     fVerSvc = inMemSpi.getVersioningService();
     fMultiSvc = inMemSpi.getMultiFilingService();
   }
-  
+
   /**
    * Instantiates the services by using the client provider interface.
    * @param parameters
    *    configuration parameters for client provider interface and in-memory provider
    */
   private void initializeUsingClientProvider(Map<String, String> parameters) {
-	  CmisBinding provider;
+      CmisBinding provider;
 
     // get factory and create provider
     CmisBindingFactory factory = CmisBindingFactory.newInstance();

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectCreator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectCreator.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectCreator.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectCreator.java Thu Apr 15 14:35:55 2010
@@ -32,7 +32,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.BindingsObjectFactory;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectService;
 import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
@@ -42,7 +42,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamDataImpl;
 
 public class ObjectCreator {
-  
+
   private BindingsObjectFactory fFactory;
   private ObjectService fObjSvc;
   private String fRepositoryId;
@@ -52,9 +52,9 @@ public class ObjectCreator {
     fFactory = factory;
     fRepositoryId = repositoryId;
   }
-  
+
   public String createDocument(String name, String typeId, String folderId, VersioningState versioningState, Map<String, String> propsToSet) {
-    ContentStreamData contentStream = null;
+    ContentStream contentStream = null;
     List<String> policies = null;
     AccessControlList addACEs = null;
     AccessControlList removeACEs = null;
@@ -72,26 +72,26 @@ public class ObjectCreator {
 
     return id;
   }
-  
+
   public PropertiesData createStringDocumentProperties(String name, String typeId, Map<String, String> propsToSet) {
     List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
     properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_NAME, name));
     properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_OBJECT_TYPE_ID, typeId));
     if (null != propsToSet)
       for (Entry<String, String> propToSet : propsToSet.entrySet()) {
-        properties.add(fFactory.createPropertyStringData(propToSet.getKey(), propToSet.getValue()));      
+        properties.add(fFactory.createPropertyStringData(propToSet.getKey(), propToSet.getValue()));
       }
     PropertiesData props = fFactory.createPropertiesData(properties);
     return props;
   }
 
-  public ContentStreamData createContent() {
+  public ContentStream createContent() {
     ContentStreamDataImpl content = new ContentStreamDataImpl();
-    content.setFilename("data.txt");
+    content.setFileName("data.txt");
     content.setMimeType("text/plain");
     int len = 32 * 1024;
     byte[] b = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a,     
+                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a,
                 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
                 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a
                 }; // 32 Bytes
@@ -106,14 +106,14 @@ public class ObjectCreator {
     content.setLength(BigInteger.valueOf(len));
     return content;
   }
-  
-  public ContentStreamData createAlternateContent() {
+
+  public ContentStream createAlternateContent() {
     ContentStreamDataImpl content = new ContentStreamDataImpl();
-    content.setFilename("data.txt");
+    content.setFileName("data.txt");
     content.setMimeType("text/plain");
     int len = 32 * 1024;
     byte[] b = {0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
-        0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,     
+        0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
         0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
         0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61
     }; // 32 Bytes
@@ -135,14 +135,14 @@ public class ObjectCreator {
    * @param csd2
    * @return
    */
-  public boolean verifyContent(ContentStreamData csd1, ContentStreamData csd2) {
-    if (!csd1.getFilename().equals(csd2.getFilename()))
+  public boolean verifyContent(ContentStream csd1, ContentStream csd2) {
+    if (!csd1.getFileName().equals(csd2.getFileName()))
         return false;
-    if (!csd1.getLength().equals(csd2.getLength()))
+    if (!csd1.getBigLength().equals(csd2.getBigLength()))
         return false;
     if (!csd1.getMimeType().equals(csd2.getMimeType()))
         return false;
-    long len = csd1.getLength().longValue();
+    long len = csd1.getBigLength().longValue();
     InputStream s1 = csd1.getStream();
     InputStream s2 = csd2.getStream();
     try {
@@ -156,21 +156,21 @@ public class ObjectCreator {
     catch (IOException e) {
       e.printStackTrace();
       return false;
-    }    
+    }
     return true;
   }
-  
+
   public void updateProperty(String id, String propertyId, String propertyValue) {
     PropertiesData properties = getUpdatePropertyList(propertyId, propertyValue);
 
     Holder<String> idHolder = new Holder<String>(id);
     Holder<String> changeTokenHolder = new Holder<String>();
-    fObjSvc.updateProperties(fRepositoryId, idHolder, changeTokenHolder, properties, null);    
+    fObjSvc.updateProperties(fRepositoryId, idHolder, changeTokenHolder, properties, null);
   }
 
   public PropertiesData getUpdatePropertyList(String propertyId, String propertyValue) {
     List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
-    properties.add(fFactory.createPropertyStringData(propertyId, propertyValue));      
+    properties.add(fFactory.createPropertyStringData(propertyId, propertyValue));
     PropertiesData newProps = fFactory.createPropertiesData(properties);
     return newProps;
   }
@@ -179,7 +179,7 @@ public class ObjectCreator {
       PropertiesData props = fObjSvc.getProperties(fRepositoryId, id, "*", null);
       Map<String, PropertyData<?>> propsMap = props.getProperties();
       PropertyStringData pd = (PropertyStringData) propsMap.get(propertyId);
-      return propertyValue.equals(pd.getFirstValue());      
+      return propertyValue.equals(pd.getFirstValue());
   }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java Thu Apr 15 14:35:55 2010
@@ -31,7 +31,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
 import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectInFolderList;
@@ -199,7 +199,7 @@ public class ObjectServiceTest extends A
     if (id != null)
       log.info("createDocument succeeded with created id: " + id);
     
-    ContentStreamData sd = fObjSvc.getContentStream(fRepositoryId, id, null, BigInteger.valueOf(-1) /* offset */,
+    ContentStream sd = fObjSvc.getContentStream(fRepositoryId, id, null, BigInteger.valueOf(-1) /* offset */,
         BigInteger.valueOf(-1) /* length */, null);
     verifyContentResult(sd);
     
@@ -211,7 +211,7 @@ public class ObjectServiceTest extends A
     assertNull(sd);
     
     //create content again in a second call
-    ContentStreamData contentStream = createContent();
+    ContentStream contentStream = createContent();
     fObjSvc.setContentStream(fRepositoryId, idHolder, true, null, contentStream, null);
     sd = fObjSvc.getContentStream(fRepositoryId, id, null, BigInteger.valueOf(-1) /* offset */,
         BigInteger.valueOf(-1) /* length */, null);
@@ -250,7 +250,7 @@ public class ObjectServiceTest extends A
     }
 
     // get content from second document and compare it with original one
-    ContentStreamData sd = fObjSvc.getContentStream(fRepositoryId, id2, null, BigInteger.valueOf(-1) /* offset */,
+    ContentStream sd = fObjSvc.getContentStream(fRepositoryId, id2, null, BigInteger.valueOf(-1) /* offset */,
         BigInteger.valueOf(-1) /* length */, null);
     verifyContentResult(sd);
     
@@ -811,7 +811,7 @@ public class ObjectServiceTest extends A
   }
  
   private String createDocumentWithCustomType(String folderId, boolean withContent) {
-    ContentStreamData contentStream = null;
+    ContentStream contentStream = null;
     VersioningState versioningState = VersioningState.NONE;
     List<String> policies = null;
     AccessControlList addACEs = null;
@@ -841,7 +841,7 @@ public class ObjectServiceTest extends A
   }
   
   private String createDocumentInheritedProperties(String folderId, boolean withContent) {
-    ContentStreamData contentStream = null;
+    ContentStream contentStream = null;
     VersioningState versioningState = VersioningState.NONE;
     List<String> policies = null;
     AccessControlList addACEs = null;

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java Thu Apr 15 14:35:55 2010
@@ -36,7 +36,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.DocumentTypeDefinition;
 import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
 import org.apache.chemistry.opencmis.commons.bindings.Holder;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
 import org.apache.chemistry.opencmis.commons.bindings.ObjectList;
@@ -149,7 +149,7 @@ public class VersioningTest extends Abst
     assertTrue(isCheckedOut(pwcId));
 
     // Set a new content and modify property
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     idHolder = new Holder<String>(pwcId);
     Holder<String> tokenHolder = new Holder<String>(changeToken);
     fObjSvc.setContentStream(fRepositoryId, idHolder, true, tokenHolder, altContent, null);
@@ -162,7 +162,7 @@ public class VersioningTest extends Abst
     // Neither the version nor the version series should be checked out any longer:
     assertFalse(isCheckedOut(idHolder.getValue()));
     assertFalse(isCheckedOut(docId));
-    ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, idHolder
+    ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, idHolder
         .getValue(), null, BigInteger.valueOf(-1) /* offset */,
         BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(fCreator.createAlternateContent(), retrievedContent));
@@ -187,7 +187,7 @@ public class VersioningTest extends Abst
     fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
     String pwcId = idHolder.getValue();
     
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     PropertiesData newProps = fCreator.getUpdatePropertyList(VersionTestTypeSystemCreator.PROPERTY_ID, PROP_VALUE_NEW);
     idHolder = new Holder<String>(pwcId);
     assertTrue(isCheckedOut(docId));
@@ -200,7 +200,7 @@ public class VersioningTest extends Abst
     // Neither the version nor the version series should be checked out any longer:
     assertFalse(isCheckedOut(idHolder.getValue()));
     assertFalse(isCheckedOut(docId));
-    ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, idHolder
+    ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, idHolder
         .getValue(), null, BigInteger.valueOf(-1) /* offset */,
         BigInteger.valueOf(-1) /* length */, null);
 
@@ -246,7 +246,7 @@ public class VersioningTest extends Abst
       assertTrue(e instanceof CmisUpdateConflictException);
     }
 
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     Holder<String> pwcHolder = new Holder<String>(pwcId);
     try {      
       fObjSvc.setContentStream(fRepositoryId, pwcHolder, true, null, altContent, null);
@@ -260,7 +260,7 @@ public class VersioningTest extends Abst
     fVerSvc.checkIn(fRepositoryId, pwcHolder, true, null, null, "testCheckOutAndOtherUser", null, null, null,null);
     
     // Because nothing was changed we should have a new version with identical content
-    ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, pwcHolder.getValue(),
+    ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, pwcHolder.getValue(),
         null, BigInteger.valueOf(-1) /* offset */, BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createContent()));    
     assertTrue(fCreator.verifyProperty(idHolder.getValue(), VersionTestTypeSystemCreator.PROPERTY_ID, PROP_VALUE));  
@@ -282,7 +282,7 @@ public class VersioningTest extends Abst
     // Set a new content and modify property
     PropertiesData props = fObjSvc.getProperties(fRepositoryId, pwcId, "*", null);
     String changeToken = (String) props.getProperties().get(PropertyIds.CMIS_CHANGE_TOKEN).getFirstValue();
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     idHolder = new Holder<String>(pwcId);
     Holder<String> tokenHolder = new Holder<String>(changeToken);
     fObjSvc.setContentStream(fRepositoryId, idHolder, true, tokenHolder, altContent, null);
@@ -302,7 +302,7 @@ public class VersioningTest extends Abst
     
     // verify that the old content and properties are still valid
     assertTrue(fCreator.verifyProperty(docId, VersionTestTypeSystemCreator.PROPERTY_ID, PROP_VALUE));      
-    ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, idOfLastVersion,
+    ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, idOfLastVersion,
         null, BigInteger.valueOf(-1) /* offset */, BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createContent()));    
   }
@@ -322,7 +322,7 @@ public class VersioningTest extends Abst
     fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
     String pwcId = idHolder.getValue();
     
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     PropertiesData newProps = fCreator.getUpdatePropertyList(VersionTestTypeSystemCreator.PROPERTY_ID, PROP_VALUE_NEW);
     idHolder = new Holder<String>(pwcId);
     assertTrue(isCheckedOut(docId));
@@ -354,7 +354,7 @@ public class VersioningTest extends Abst
     fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
     String pwcId = idHolder.getValue();
     
-    ContentStreamData altContent = fCreator.createAlternateContent();
+    ContentStream altContent = fCreator.createAlternateContent();
     PropertiesData newProps = fCreator.getUpdatePropertyList(VersionTestTypeSystemCreator.PROPERTY_ID, PROP_VALUE_NEW);
     idHolder = new Holder<String>(pwcId);
     assertTrue(isCheckedOut(docId));
@@ -370,7 +370,7 @@ public class VersioningTest extends Abst
     boolean isMajor = true;
     ObjectData objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, isMajor, "*", false, IncludeRelationships.NONE, null, false, false, null);
     checkVersionProperties(verId, versioningState, objData.getProperties().getProperties(), checkinComment);        
-    ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(),
+    ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(),
         null, BigInteger.valueOf(-1) /* offset */, BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createAlternateContent()));    
 
@@ -598,7 +598,7 @@ public class VersioningTest extends Abst
     Holder<Boolean>contentCopied = new Holder<Boolean>(false);    
     fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
 
-    ContentStreamData content2 = createContent('a');
+    ContentStream content2 = createContent('a');
     PropertiesData newProps = fCreator.getUpdatePropertyList(VersionTestTypeSystemCreator.PROPERTY_ID, "PropertyFromVersion2");    
     idHolder = new Holder<String>(verIdV1);    
     // Test check-in and pass content and properties
@@ -610,7 +610,7 @@ public class VersioningTest extends Abst
     // create third version with different content
     contentCopied = new Holder<Boolean>(false);    
     fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
-    ContentStreamData content3 = super.createContent('a');
+    ContentStream content3 = super.createContent('a');
     newProps = fCreator.getUpdatePropertyList(VersionTestTypeSystemCreator.PROPERTY_ID, "PropertyFromVersion3");    
      // Test check-in and pass content and properties
     checkinComment = "Checkin from Unit Test-3.";
@@ -627,7 +627,7 @@ public class VersioningTest extends Abst
       assertTrue(e instanceof CmisUpdateConflictException);
     }
     // try to set content on an older version
-    ContentStreamData content4 = super.createContent('x');
+    ContentStream content4 = super.createContent('x');
     idHolder = new Holder<String>(verIdV2);
     try {      
       fObjSvc.setContentStream(fRepositoryId, idHolder, true, null, content4, null);



Mime
View raw message