You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fg...@apache.org on 2010/04/15 16:35:57 UTC
svn commit: r934426 [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-api/src/main/java/or...
Author: fguillaume
Date: Thu Apr 15 14:35:55 2010
New Revision: 934426
URL: http://svn.apache.org/viewvc?rev=934426&view=rev
Log:
Refactor to get rid of duplicate DTOs (and their interfaces): ContentStream
Added:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStream.java (contents, props changed)
- copied, changed from r934418, incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStreamData.java
Removed:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ContentStream.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStreamData.java
Modified:
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/Rendition.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-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/VersioningServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ContentStreamImpl.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/PersistentSessionImpl.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/repository/PersistentObjectFactoryImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/BindingsObjectFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ObjectService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/VersioningService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/BindingsObjectFactoryImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/ObjectService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/VersioningService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectCreator.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisObjectService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisVersioningService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AbstractServiceWrapper.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectServiceWrapper.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/VersioningServiceWrapper.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/bindings/AbstractSimpleBindingIT.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/ReadOnlyContentStreamIT.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/WriteObjectIT.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/ObjectGenerator.java
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=934426&r1=934425&r2=934426&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 Thu Apr 15 14:35:55 2010
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.cl
import java.util.List;
import java.util.Map;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
/**
@@ -87,7 +88,7 @@ public interface Document extends Fileab
/**
* Shortcut for ObjectFactory.createDocumentFromSource(this, ...).
- *
+ *
* @param properties
* @param versioningState
* @param policies
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=934426&r1=934425&r2=934426&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 Thu Apr 15 14:35:55 2010
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
import org.apache.chemistry.opencmis.client.api.util.Container;
import org.apache.chemistry.opencmis.client.api.util.PagingList;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.enums.UnfileObjects;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Rendition.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/Rendition.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Rendition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Rendition.java Thu Apr 15 14:35:55 2010
@@ -18,6 +18,8 @@
*/
package org.apache.chemistry.opencmis.client.api;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
+
/**
* {@see Document#getRenditions()}. Domain Model 2.4.2
*/
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=934426&r1=934425&r2=934426&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 Thu Apr 15 14:35:55 2010
@@ -28,6 +28,7 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.util.Container;
import org.apache.chemistry.opencmis.client.api.util.PagingList;
import org.apache.chemistry.opencmis.commons.bindings.CmisBinding;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.bindings.RepositoryInfo;
import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/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/repository/ObjectFactory.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.java Thu Apr 15 14:35:55 2010
@@ -27,7 +27,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.Acl;
import org.apache.chemistry.opencmis.client.api.AllowableActions;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Policy;
import org.apache.chemistry.opencmis.client.api.Property;
@@ -39,7 +38,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.ObjectData;
import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
import org.apache.chemistry.opencmis.commons.bindings.RenditionData;
@@ -47,7 +46,7 @@ import org.apache.chemistry.opencmis.com
/**
* A factory to create CMIS objects.
- *
+ *
* @see org.apache.chemistry.opencmis.client.api.Session#getObjectFactory()
*/
public interface ObjectFactory {
@@ -81,7 +80,7 @@ public interface ObjectFactory {
ContentStream createContentStream(String filename, long length, String mimetype,
InputStream stream);
- ContentStreamData convertContentStream(ContentStream contentStream);
+ ContentStream convertContentStream(ContentStream contentStream);
// types
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.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/ObjectServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.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.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;
@@ -87,7 +87,7 @@ public class ObjectServiceImpl extends A
* org.apache.opencmis.client.provider.ExtensionsData)
*/
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) {
checkCreateProperties(properties);
@@ -489,7 +489,7 @@ public class ObjectServiceImpl extends A
* java.lang.String, java.lang.String, java.math.BigInteger, java.math.BigInteger,
* org.apache.opencmis.client.provider.ExtensionsData)
*/
- public ContentStreamData getContentStream(String repositoryId, String objectId, String streamId,
+ public ContentStream getContentStream(String repositoryId, String objectId, String streamId,
BigInteger offset, BigInteger length, ExtensionsData extension) {
ContentStreamDataImpl result = new ContentStreamDataImpl();
@@ -512,7 +512,7 @@ public class ObjectServiceImpl extends A
.getErrorContent(), null);
}
- result.setFilename(null);
+ result.setFileName(null);
result.setLength(resp.getContentLength());
result.setMimeType(resp.getContentTypeHeader());
result.setStream(resp.getStream());
@@ -646,7 +646,7 @@ public class ObjectServiceImpl extends A
* org.apache.opencmis.client.provider.ExtensionsData)
*/
public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
- Holder<String> changeToken, ContentStreamData contentStream, ExtensionsData extension) {
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
// we need an object id
if ((objectId == null) || (objectId.getValue() == null)) {
throw new CmisInvalidArgumentException("Object ID must be set!");
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.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/VersioningServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -33,7 +33,7 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomLink;
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;
@@ -152,7 +152,7 @@ public class VersioningServiceImpl exten
* org.apache.opencmis.client.provider.ExtensionsData)
*/
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) {
// we need an object id
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.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/webservices/ObjectServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -32,7 +32,7 @@ import org.apache.chemistry.opencmis.cli
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;
@@ -79,7 +79,7 @@ public class ObjectServiceImpl extends A
* org.apache.opencmis.client.provider.AccessControlList, org.apache.opencmis.client.provider.ExtensionsData)
*/
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) {
ObjectServicePort port = fPortProvider.getObjectServicePort();
@@ -341,7 +341,7 @@ public class ObjectServiceImpl extends A
* java.lang.String, java.lang.String, java.math.BigInteger, java.math.BigInteger,
* org.apache.opencmis.client.provider.ExtensionsData)
*/
- public ContentStreamData getContentStream(String repositoryId, String objectId, String streamId,
+ public ContentStream getContentStream(String repositoryId, String objectId, String streamId,
BigInteger offset, BigInteger length, ExtensionsData extension) {
ObjectServicePort port = fPortProvider.getObjectServicePort();
@@ -502,7 +502,7 @@ public class ObjectServiceImpl extends A
* org.apache.opencmis.client.provider.ContentStreamData, org.apache.opencmis.client.provider.ExtensionsData)
*/
public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
- Holder<String> changeToken, ContentStreamData contentStream, ExtensionsData extension) {
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
ObjectServicePort port = fPortProvider.getObjectServicePort();
try {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/VersioningServiceImpl.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/webservices/VersioningServiceImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/VersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/VersioningServiceImpl.java Thu Apr 15 14:35:55 2010
@@ -30,7 +30,7 @@ import java.util.List;
import org.apache.chemistry.opencmis.client.bindings.spi.Session;
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;
@@ -127,7 +127,7 @@ public class VersioningServiceImpl exten
* org.apache.opencmis.client.provider.ExtensionsData)
*/
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) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java Thu Apr 15 14:35:55 2010
@@ -41,7 +41,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
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.ObjectData;
import org.apache.chemistry.opencmis.commons.bindings.ObjectInFolderData;
import org.apache.chemistry.opencmis.commons.bindings.ObjectInFolderList;
@@ -446,7 +446,7 @@ public abstract class AbstractCmisTestCa
/**
* Creates a ContentStreamData object from a byte array.
*/
- protected ContentStreamData createContentStreamData(String mimeType, byte[] content) {
+ protected ContentStream createContentStreamData(String mimeType, byte[] content) {
assertNotNull(content);
return getObjectFactory().createContentStream(BigInteger.valueOf(content.length), mimeType,
@@ -660,7 +660,7 @@ public abstract class AbstractCmisTestCa
* Creates a document.
*/
protected String createDocument(PropertiesData properties, String folderId,
- ContentStreamData contentStream, VersioningState versioningState, List<String> policies,
+ ContentStream contentStream, VersioningState versioningState, List<String> policies,
AccessControlList addACEs, AccessControlList removeACEs) {
String objectId = getBinding().getObjectService().createDocument(getTestRepositoryId(),
properties, folderId, contentStream, versioningState, policies, addACEs, removeACEs, null);
@@ -749,7 +749,7 @@ public abstract class AbstractCmisTestCa
PropertiesData properties = getObjectFactory().createPropertiesData(propList);
- ContentStreamData contentStream = createContentStreamData(contentType, content);
+ ContentStream contentStream = createContentStreamData(contentType, content);
return createDocument(properties, folderId, contentStream, vs, null, null, null);
}
@@ -818,8 +818,8 @@ public abstract class AbstractCmisTestCa
/**
* Gets a content stream.
*/
- protected ContentStreamData getContent(String objectId, String streamId) {
- ContentStreamData contentStream = getBinding().getObjectService().getContentStream(
+ protected ContentStream getContent(String objectId, String streamId) {
+ ContentStream contentStream = getBinding().getObjectService().getContentStream(
getTestRepositoryId(), objectId, streamId, null, null, null);
assertNotNull(contentStream);
assertNotNull(contentStream.getMimeType());
@@ -831,7 +831,7 @@ public abstract class AbstractCmisTestCa
/**
* Reads the content from a content stream into a byte array.
*/
- protected byte[] readContent(ContentStreamData contentStream) throws Exception {
+ protected byte[] readContent(ContentStream contentStream) throws Exception {
assertNotNull(contentStream);
assertNotNull(contentStream.getStream());
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.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.TypeDefinitionList;
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.ObjectData;
import org.apache.chemistry.opencmis.commons.bindings.ObjectInFolderContainer;
import org.apache.chemistry.opencmis.commons.bindings.ObjectInFolderData;
@@ -306,7 +306,7 @@ public abstract class AbstractSimpleRead
assertNotNull(object.getObject().getBaseTypeId());
if (object.getObject().getBaseTypeId() == BaseObjectTypeIds.CMIS_DOCUMENT) {
- ContentStreamData contentStream = getContent(object.getObject().getId(), null);
+ ContentStream contentStream = getContent(object.getObject().getId(), null);
readContent(contentStream);
return;
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java Thu Apr 15 14:35:55 2010
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.chemistry.opencmis.commons.PropertyIds;
import org.apache.chemistry.opencmis.commons.bindings.AccessControlEntry;
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;
@@ -37,9 +37,9 @@ import org.apache.chemistry.opencmis.com
/**
* Simple read-write test.
- *
+ *
* @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ *
*/
public abstract class AbstractSimpleReadWriteTests extends AbstractCmisTestCase {
@@ -97,16 +97,16 @@ public abstract class AbstractSimpleRead
PropertiesData properties = getObjectFactory().createPropertiesData(propList);
- ContentStreamData contentStream = createContentStreamData(CONTENT_TYPE, CONTENT);
+ ContentStream contentStream = createContentStreamData(CONTENT_TYPE, CONTENT);
String docId = createDocument(properties, getTestRootFolder(), contentStream, vs, null, null,
null);
// read and assert content
- ContentStreamData contentStream2 = getContent(docId, null);
+ ContentStream contentStream2 = getContent(docId, null);
assertMimeType(CONTENT_TYPE, contentStream2.getMimeType());
- if (contentStream2.getLength() != null) {
- assertEquals(CONTENT.length, contentStream2.getLength().intValue());
+ if (contentStream2.getBigLength() != null) {
+ assertEquals(CONTENT.length, contentStream2.getBigLength().intValue());
}
byte[] content = readContent(contentStream2);
@@ -166,11 +166,11 @@ public abstract class AbstractSimpleRead
getObject(docId2);
// read and assert content
- ContentStreamData contentStream2 = getContent(docId, null);
- ContentStreamData contentStream3 = getContent(docId2, null);
+ ContentStream contentStream2 = getContent(docId, null);
+ ContentStream contentStream3 = getContent(docId2, null);
assertEquals(contentStream2.getMimeType(), contentStream3.getMimeType());
- assertEquals(contentStream2.getLength(), contentStream3.getLength());
+ assertEquals(contentStream2.getBigLength(), contentStream3.getBigLength());
byte[] content2 = readContent(contentStream2);
byte[] content3 = readContent(contentStream3);
@@ -221,7 +221,7 @@ public abstract class AbstractSimpleRead
}
// set content
- ContentStreamData contentStream2 = createContentStreamData(CONTENT_TYPE, CONTENT2);
+ ContentStream contentStream2 = createContentStreamData(CONTENT_TYPE, CONTENT2);
docIdHolder = new Holder<String>(docId);
getBinding().getObjectService().setContentStream(getTestRepositoryId(), docIdHolder, true,
@@ -231,10 +231,10 @@ public abstract class AbstractSimpleRead
if (docIdHolder.getValue() != null) {
docId = docIdHolder.getValue();
}
- ContentStreamData contentStream3 = getContent(docId, null);
+ ContentStream contentStream3 = getContent(docId, null);
assertMimeType(CONTENT_TYPE, contentStream3.getMimeType());
- if (contentStream3.getLength() != null) {
- assertEquals(CONTENT2.length, contentStream3.getLength().intValue());
+ if (contentStream3.getBigLength() != null) {
+ assertEquals(CONTENT2.length, contentStream3.getBigLength().intValue());
}
byte[] content = readContent(contentStream3);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ContentStreamImpl.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/ContentStreamImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ContentStreamImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ContentStreamImpl.java Thu Apr 15 14:35:55 2010
@@ -19,13 +19,16 @@
package org.apache.chemistry.opencmis.client.runtime;
import java.io.InputStream;
+import java.math.BigInteger;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionData;
/**
* Content stream implementation.
*/
-public class ContentStreamImpl implements ContentStream {
+public class ContentStreamImpl extends AbstractExtensionData implements
+ ContentStream {
private String filename;
private long length;
@@ -47,6 +50,10 @@ public class ContentStreamImpl implement
return length;
}
+ public BigInteger getBigLength() {
+ return BigInteger.valueOf(length);
+ }
+
public String getMimeType() {
return mimetype;
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentDocumentImpl.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/PersistentDocumentImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentDocumentImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentDocumentImpl.java Thu Apr 15 14:35:55 2010
@@ -27,7 +27,6 @@ import java.util.Set;
import org.apache.chemistry.opencmis.client.api.Ace;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.ObjectId;
import org.apache.chemistry.opencmis.client.api.OperationContext;
@@ -36,7 +35,7 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
import org.apache.chemistry.opencmis.client.api.repository.ObjectFactory;
import org.apache.chemistry.opencmis.commons.PropertyIds;
-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.enums.Updatability;
@@ -121,7 +120,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#deleteAllVersions()
*/
public void deleteAllVersions() {
@@ -132,7 +131,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#checkOut()
*/
public ObjectId checkOut() {
@@ -150,7 +149,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#cancelCheckOut()
*/
public void cancelCheckOut() {
@@ -161,7 +160,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#checkIn(boolean, java.util.Map,
* org.apache.opencmis.client.api.ContentStream, java.lang.String, java.util.List, java.util.List,
* java.util.List)
@@ -202,7 +201,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#getAllVersions()
*/
public List<Document> getAllVersions() {
@@ -211,7 +210,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @seeorg.apache.opencmis.client.api.Document#getAllVersions(org.apache.opencmis.client.api.
* OperationContext)
*/
@@ -253,7 +252,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#getObjectOfLatestVersion(boolean)
*/
public Document getObjectOfLatestVersion(boolean major) {
@@ -262,7 +261,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#getObjectOfLatestVersion(boolean,
* org.apache.opencmis.client.api.OperationContext)
*/
@@ -292,27 +291,27 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#getContentStream()
*/
public ContentStream getContentStream() {
String objectId = getObjectId();
// get the stream
- ContentStreamData contentStream = getBinding().getObjectService().getContentStream(
+ ContentStream contentStream = getBinding().getObjectService().getContentStream(
getRepositoryId(), objectId, null, null, null, null);
// TODO: what should happen if the length is not set?
- long length = (contentStream.getLength() == null ? -1 : contentStream.getLength().longValue());
+ long length = (contentStream.getBigLength() == null ? -1 : contentStream.getBigLength().longValue());
// convert and return stream object
- return getSession().getObjectFactory().createContentStream(contentStream.getFilename(), length,
+ return getSession().getObjectFactory().createContentStream(contentStream.getFileName(), length,
contentStream.getMimeType(), contentStream.getStream());
}
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#setContentStream(boolean,
* org.apache.opencmis.client.api.ContentStream)
*/
@@ -344,7 +343,7 @@ public class PersistentDocumentImpl exte
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Document#deleteContentStream()
*/
public ObjectId deleteContentStream() {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.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/PersistentFolderImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java Thu Apr 15 14:35:55 2010
@@ -28,7 +28,6 @@ import java.util.Set;
import org.apache.chemistry.opencmis.client.api.Ace;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.FileableCmisObject;
import org.apache.chemistry.opencmis.client.api.Folder;
@@ -42,6 +41,7 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.runtime.util.AbstractPagingList;
import org.apache.chemistry.opencmis.client.runtime.util.ContainerImpl;
import org.apache.chemistry.opencmis.commons.PropertyIds;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.bindings.FailedToDeleteData;
import org.apache.chemistry.opencmis.commons.bindings.NavigationService;
import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
@@ -76,7 +76,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#createDocument(java.util.Map,
* org.apache.opencmis.client.api.ContentStream,
* org.apache.opencmis.commons.enums.VersioningState, java.util.List, java.util.List,
@@ -110,7 +110,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.Folder#createDocumentFromSource(org.apache.opencmis.client.api
* .ObjectId, java.util.Map, org.apache.opencmis.commons.enums.VersioningState, java.util.List,
@@ -165,7 +165,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#createFolder(java.util.Map, java.util.List,
* java.util.List, java.util.List, org.apache.opencmis.client.api.OperationContext)
*/
@@ -195,7 +195,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#createPolicy(java.util.Map, java.util.List,
* java.util.List, java.util.List, org.apache.opencmis.client.api.OperationContext)
*/
@@ -225,7 +225,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#deleteTree(boolean,
* org.apache.opencmis.commons.enums.UnfileObjects, boolean)
*/
@@ -242,7 +242,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getAllowedChildObjectTypes()
*/
public List<ObjectType> getAllowedChildObjectTypes() {
@@ -268,7 +268,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getCheckedOutDocs(int)
*/
public PagingList<Document> getCheckedOutDocs(int itemsPerPage) {
@@ -277,7 +277,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @seeorg.apache.opencmis.client.api.Folder#getCheckedOutDocs(org.apache.opencmis.client.api.
* OperationContext, int)
*/
@@ -329,7 +329,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getChildren(int)
*/
public PagingList<CmisObject> getChildren(int itemsPerPage) {
@@ -338,7 +338,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.Folder#getChildren(org.apache.opencmis.client.api.OperationContext
* , int)
@@ -389,7 +389,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getDescendants(int)
*/
public List<Container<FileableCmisObject>> getDescendants(int depth) {
@@ -398,7 +398,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getDescendants(int,
* org.apache.opencmis.client.api.OperationContext)
*/
@@ -417,7 +417,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getFolderTree(int)
*/
public List<Container<FileableCmisObject>> getFolderTree(int depth) {
@@ -426,7 +426,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getFolderTree(int,
* org.apache.opencmis.client.api.OperationContext)
*/
@@ -481,7 +481,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#isRootFolder()
*/
public boolean isRootFolder() {
@@ -493,7 +493,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getFolderParent()
*/
public Folder getFolderParent() {
@@ -511,7 +511,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Folder#getPath()
*/
public String getPath() {
@@ -554,7 +554,7 @@ public class PersistentFolderImpl extend
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.runtime.AbstractPersistentFilableCmisObject#getPaths()
*/
@Override
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.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/PersistentSessionImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java Thu Apr 15 14:35:55 2010
@@ -31,7 +31,6 @@ import java.util.concurrent.locks.Reentr
import org.apache.chemistry.opencmis.client.api.Ace;
import org.apache.chemistry.opencmis.client.api.ChangeEvent;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.ExtensionHandler;
import org.apache.chemistry.opencmis.client.api.Folder;
@@ -54,6 +53,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.api.TypeDefinitionContainer;
import org.apache.chemistry.opencmis.commons.api.TypeDefinitionList;
import org.apache.chemistry.opencmis.commons.bindings.CmisBinding;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.bindings.DiscoveryService;
import org.apache.chemistry.opencmis.commons.bindings.NavigationService;
import org.apache.chemistry.opencmis.commons.bindings.ObjectData;
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=934426&r1=934425&r2=934426&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 Thu Apr 15 14:35:55 2010
@@ -21,12 +21,11 @@ package org.apache.chemistry.opencmis.cl
import java.io.Serializable;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Rendition;
import org.apache.chemistry.opencmis.client.api.Session;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
/**
* Implementation of <code>Rendition</code>.
@@ -65,7 +64,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getKind()
*/
public String getKind() {
@@ -74,7 +73,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getLength()
*/
public long getLength() {
@@ -83,7 +82,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getMimeType()
*/
public String getMimeType() {
@@ -92,7 +91,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getTitle()
*/
public String getTitle() {
@@ -101,7 +100,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getHeight()
*/
public int getHeight() {
@@ -110,7 +109,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getWidth()
*/
public int getWidth() {
@@ -119,7 +118,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getRenditionDocument()
*/
public Document getRenditionDocument() {
@@ -128,7 +127,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.Rendition#getRenditionDocument(org.apache.opencmis.client.api
* .OperationContext)
@@ -149,7 +148,7 @@ public class RenditionImpl implements Re
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.Rendition#getContentStream()
*/
public ContentStream getContentStream() {
@@ -157,16 +156,16 @@ public class RenditionImpl implements Re
return null;
}
- ContentStreamData contentStream = session.getBinding().getObjectService().getContentStream(
+ ContentStream contentStream = session.getBinding().getObjectService().getContentStream(
session.getRepositoryInfo().getId(), objectId, streamId, null, null, null);
if (contentStream == null) {
return null;
}
// TODO: what should happen if the length is not set?
- long length = (contentStream.getLength() == null ? -1 : contentStream.getLength().longValue());
+ long length = (contentStream.getBigLength() == null ? -1 : contentStream.getBigLength().longValue());
- return session.getObjectFactory().createContentStream(contentStream.getFilename(), length,
+ return session.getObjectFactory().createContentStream(contentStream.getFileName(), length,
contentStream.getMimeType(), contentStream.getStream());
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.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/PersistentObjectFactoryImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java Thu Apr 15 14:35:55 2010
@@ -34,7 +34,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.Acl;
import org.apache.chemistry.opencmis.client.api.AllowableActions;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.ContentStream;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Policy;
import org.apache.chemistry.opencmis.client.api.Property;
@@ -79,7 +78,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
import org.apache.chemistry.opencmis.commons.bindings.AllowableActionsData;
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.ObjectData;
import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
@@ -127,7 +126,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#createAllowableAction(java.util.Map)
*/
@@ -137,7 +136,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertAllowableActions(org.apache.
* opencmis.commons.provider.AllowableActionsData)
@@ -154,7 +153,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#createAce(java.lang.String,
* java.util.List, boolean)
*/
@@ -164,7 +163,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#createAcl(java.util.List,
* java.lang.Boolean)
*/
@@ -174,7 +173,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#convertAces(java.util.List)
*/
public AccessControlList convertAces(List<Ace> aces) {
@@ -194,7 +193,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertAcl(org.apache.opencmis.commons
* .provider.AccessControlList)
@@ -222,7 +221,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#convertPolicies(java.util.List)
*/
public List<String> convertPolicies(List<Policy> policies) {
@@ -245,7 +244,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#convertRendition(java.lang.String,
* org.apache.opencmis.commons.provider.RenditionData)
*/
@@ -268,7 +267,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#createContentStream(java.lang.String,
* long, java.lang.String, java.io.InputStream)
@@ -280,12 +279,12 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertContentStream(org.apache.opencmis
* .client.api.ContentStream)
*/
- public ContentStreamData convertContentStream(ContentStream contentStream) {
+ public ContentStream convertContentStream(ContentStream contentStream) {
if (contentStream == null) {
return null;
}
@@ -301,7 +300,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertTypeDefinition(org.apache.opencmis
* .commons.api.TypeDefinition)
@@ -326,7 +325,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#getTypeFromObjectData(org.apache.opencmis
* .commons.provider.ObjectData)
@@ -350,7 +349,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#createProperty(org.apache.opencmis.
* commons.api.PropertyDefinition, java.lang.Object)
@@ -361,7 +360,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#createPropertyMultivalue(org.apache
* .opencmis.commons.api.PropertyDefinition, java.util.List)
@@ -372,7 +371,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertProperties(org.apache.opencmis
* .client.api.objecttype.ObjectType, org.apache.opencmis.commons.provider.PropertiesData)
@@ -445,7 +444,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.api.repository.ObjectFactory#convertProperties(java.util.Map,
* org.apache.opencmis.client.api.objecttype.ObjectType, java.util.Set)
*/
@@ -655,7 +654,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertQueryProperties(org.apache.opencmis
* .commons.provider.PropertiesData)
@@ -681,7 +680,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertObject(org.apache.opencmis.commons
* .provider.ObjectData, org.apache.opencmis.client.api.OperationContext)
@@ -710,7 +709,7 @@ public class PersistentObjectFactoryImpl
/*
* (non-Javadoc)
- *
+ *
* @see
* org.apache.opencmis.client.api.repository.ObjectFactory#convertQueryResult(org.apache.opencmis
* .commons.provider.ObjectData)
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/BindingsObjectFactory.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/bindings/BindingsObjectFactory.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/BindingsObjectFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/BindingsObjectFactory.java Thu Apr 15 14:35:55 2010
@@ -70,6 +70,6 @@ public interface BindingsObjectFactory {
PropertiesData createPropertiesData(List<PropertyData<?>> properties);
- ContentStreamData createContentStream(BigInteger length, String mimetype, String filename,
+ ContentStream createContentStream(BigInteger length, String mimetype, String filename,
InputStream stream);
}
Copied: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStream.java (from r934418, incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStreamData.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/bindings/ContentStream.java?p2=incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStream.java&p1=incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStreamData.java&r1=934418&r2=934426&rev=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStreamData.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStream.java Thu Apr 15 14:35:55 2010
@@ -23,13 +23,15 @@ import java.math.BigInteger;
import org.apache.chemistry.opencmis.commons.api.ExtensionsData;
-public interface ContentStreamData extends ExtensionsData {
+public interface ContentStream extends ExtensionsData {
- BigInteger getLength();
+ long getLength();
+
+ BigInteger getBigLength();
String getMimeType();
- String getFilename();
+ String getFileName();
InputStream getStream();
}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ContentStream.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ObjectService.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/bindings/ObjectService.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ObjectService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/ObjectService.java Thu Apr 15 14:35:55 2010
@@ -37,7 +37,7 @@ import org.apache.chemistry.opencmis.com
public interface ObjectService {
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);
String createDocumentFromSource(String repositoryId, String sourceId, PropertiesData properties,
@@ -72,7 +72,7 @@ public interface ObjectService {
Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension);
- ContentStreamData getContentStream(String repositoryId, String objectId, String streamId,
+ ContentStream getContentStream(String repositoryId, String objectId, String streamId,
BigInteger offset, BigInteger length, ExtensionsData extension);
void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
@@ -88,7 +88,7 @@ public interface ObjectService {
UnfileObjects unfileObjects, Boolean continueOnFailure, ExtensionsData extension);
void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
- Holder<String> changeToken, ContentStreamData contentStream, ExtensionsData extension);
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension);
void deleteContentStream(String repositoryId, Holder<String> objectId,
Holder<String> changeToken, ExtensionsData extension);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/VersioningService.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/bindings/VersioningService.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/VersioningService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/bindings/VersioningService.java Thu Apr 15 14:35:55 2010
@@ -38,7 +38,7 @@ public interface VersioningService {
public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension);
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-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java Thu Apr 15 14:35:55 2010
@@ -59,7 +59,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.bindings.AccessControlList;
import org.apache.chemistry.opencmis.commons.bindings.AclCapabilities;
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;
@@ -2364,14 +2364,14 @@ public final class Converter {
/**
* Converts a content stream object.
*/
- public static ContentStreamData convert(CmisContentStreamType contentStream) {
+ public static ContentStream convert(CmisContentStreamType contentStream) {
if (contentStream == null) {
return null;
}
ContentStreamDataImpl result = new ContentStreamDataImpl();
- result.setFilename(contentStream.getFilename());
+ result.setFileName(contentStream.getFilename());
result.setLength(contentStream.getLength());
result.setMimeType(contentStream.getMimeType());
if (contentStream.getStream() != null) {
@@ -2397,15 +2397,15 @@ public final class Converter {
/**
* Converts a content stream object.
*/
- public static CmisContentStreamType convert(final ContentStreamData contentStream) {
+ public static CmisContentStreamType convert(final ContentStream contentStream) {
if (contentStream == null) {
return null;
}
CmisContentStreamType result = new CmisContentStreamType();
- result.setFilename(contentStream.getFilename());
- result.setLength(contentStream.getLength());
+ result.setFilename(contentStream.getFileName());
+ result.setLength(contentStream.getBigLength());
result.setMimeType(contentStream.getMimeType());
result.setStream(new DataHandler(new DataSource() {
@@ -2415,7 +2415,7 @@ public final class Converter {
}
public String getName() {
- return contentStream.getFilename();
+ return contentStream.getFileName();
}
public InputStream getInputStream() throws IOException {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/BindingsObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/BindingsObjectFactoryImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/BindingsObjectFactoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/BindingsObjectFactoryImpl.java Thu Apr 15 14:35:55 2010
@@ -28,7 +28,7 @@ import java.util.List;
import org.apache.chemistry.opencmis.commons.bindings.AccessControlEntry;
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.PropertiesData;
import org.apache.chemistry.opencmis.commons.bindings.PropertyBooleanData;
import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
@@ -61,7 +61,7 @@ public class BindingsObjectFactoryImpl i
return new AccessControlListImpl(aces);
}
- public ContentStreamData createContentStream(BigInteger length, String mimetype, String filename,
+ public ContentStream createContentStream(BigInteger length, String mimetype, String filename,
InputStream stream) {
return new ContentStreamDataImpl(length, mimetype, filename, stream);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java Thu Apr 15 14:35:55 2010
@@ -21,15 +21,15 @@ package org.apache.chemistry.opencmis.co
import java.io.InputStream;
import java.math.BigInteger;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
/**
* Content stream data implementation.
- *
+ *
* @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ *
*/
-public class ContentStreamDataImpl extends AbstractExtensionData implements ContentStreamData {
+public class ContentStreamDataImpl extends AbstractExtensionData implements ContentStream {
private String fFilename;
private BigInteger fLength;
@@ -49,29 +49,28 @@ public class ContentStreamDataImpl exten
InputStream stream) {
setLength(length);
setMimeType(mimetype);
- setFilename(filename);
+ setFileName(filename);
setStream(stream);
}
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.ContentStreamData#getFilename()
*/
- public String getFilename() {
+ public String getFileName() {
return fFilename;
}
- public void setFilename(String filename) {
+ public void setFileName(String filename) {
fFilename = filename;
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.provider.ContentStreamData#getLength()
- */
- public BigInteger getLength() {
+ public long getLength() {
+ return fLength == null ? -1 : fLength.longValue();
+ }
+
+ public BigInteger getBigLength() {
return fLength;
}
@@ -81,7 +80,7 @@ public class ContentStreamDataImpl exten
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.ContentStreamData#getMimeType()
*/
public String getMimeType() {
@@ -94,7 +93,7 @@ public class ContentStreamDataImpl exten
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.ContentStreamData#getStream()
*/
public InputStream getStream() {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java Thu Apr 15 14:35:55 2010
@@ -35,7 +35,7 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.chemistry.opencmis.commons.PropertyIds;
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.ObjectData;
import org.apache.chemistry.opencmis.commons.bindings.PropertiesData;
import org.apache.chemistry.opencmis.commons.bindings.PropertyData;
@@ -144,7 +144,7 @@ public class AtomEntryParser {
/**
* Returns the content stream.
*/
- public ContentStreamData getContentStream() {
+ public ContentStream getContentStream() {
return (fCmisContentStream == null ? fAtomContentStream : fCmisContentStream);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java Thu Apr 15 14:35:55 2010
@@ -40,7 +40,7 @@ import javax.servlet.http.HttpServletRes
import org.apache.chemistry.opencmis.commons.PropertyIds;
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;
@@ -446,7 +446,7 @@ public final class ObjectService {
}
// execute
- ContentStreamData content = service.getContentStream(context, repositoryId, objectId, streamId,
+ ContentStream content = service.getContentStream(context, repositoryId, objectId, streamId,
offset, length, null);
if ((content == null) || (content.getStream() == null)) {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java?rev=934426&r1=934425&r2=934426&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java Thu Apr 15 14:35:55 2010
@@ -26,7 +26,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import org.apache.chemistry.opencmis.commons.PropertyIds;
-import org.apache.chemistry.opencmis.commons.bindings.ContentStreamData;
+import org.apache.chemistry.opencmis.commons.bindings.ContentStream;
import org.apache.chemistry.opencmis.commons.bindings.PropertyStringData;
import org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser;
import org.apache.commons.codec.binary.Base64;
@@ -241,7 +241,7 @@ public class AtomEntryParserTest {
private byte[] parse(byte[] entry) throws Exception {
AtomEntryParser aep = new AtomEntryParser(new ByteArrayInputStream(entry));
- ContentStreamData contentStream = aep.getContentStream();
+ ContentStream contentStream = aep.getContentStream();
assertNotNull(contentStream);
assertNotNull(contentStream.getStream());