You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/04/18 15:50:38 UTC
svn commit: r935340 [1/2] - in /incubator/chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/
chemistry-opencmis-client/chemistry-opencmis-clien...
Author: fmui
Date: Sun Apr 18 13:50:37 2010
New Revision: 935340
URL: http://svn.apache.org/viewvc?rev=935340&view=rev
Log:
first complete draft of the new server interfaces
Added:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/refactor/
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/refactor/CmisServiceWrapper.java
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
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/AbstractSimpleReadOnlyTests.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-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/NavigationService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/VersioningService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisServiceFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/ObjectInfo.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServicesFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/ObjectInfoImpl.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/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -41,7 +41,6 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import org.apache.chemistry.opencmis.commons.impl.Constants;
import org.apache.chemistry.opencmis.commons.impl.ReturnVersion;
@@ -51,9 +50,6 @@ import org.apache.chemistry.opencmis.com
/**
* Versioning Service AtomPub client.
- *
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
*/
public class VersioningServiceImpl extends AbstractAtomPubService implements VersioningService {
@@ -64,15 +60,6 @@ public class VersioningServiceImpl exten
setSession(session);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#checkOut(java.lang
- * .String, org.apache.opencmis.client.provider.Holder,
- * org.apache.opencmis.client.provider.ExtensionsData,
- * org.apache.opencmis.client.provider.Holder)
- */
public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
Holder<Boolean> contentCopied) {
if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
@@ -123,14 +110,6 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#cancelCheckOut(
- * java.lang.String, java.lang.String,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
// find the link
String link = loadLink(repositoryId, objectId, Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
@@ -142,18 +121,6 @@ public class VersioningServiceImpl exten
delete(new UrlBuilder(link));
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#checkIn(java.lang
- * .String, org.apache.opencmis.client.provider.Holder, java.lang.Boolean,
- * org.apache.opencmis.client.provider.PropertiesData,
- * org.apache.opencmis.client.provider.ContentStreamData, java.lang.String,
- * java.util.List, org.apache.opencmis.client.provider.AccessControlList,
- * org.apache.opencmis.client.provider.AccessControlList,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
ExtensionsData extension) {
@@ -242,29 +209,6 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.commons.provider.VersioningService#getAllVersions
- * (java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean,
- * org.apache.opencmis.commons.api.ExtensionsData)
- */
- public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId, String filter,
- Boolean includeAllowableActions, ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported by Atom binding! "
- + "Use 'getAllVersions(String repositoryId, String objectId, String versionSeriesId, "
- + "String filter, Boolean includeAllowableActions, ExtensionsData extension)' instead!'");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#getAllVersions(
- * java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
Boolean includeAllowableActions, ExtensionsData extension) {
List<ObjectData> result = new ArrayList<ObjectData>();
@@ -315,18 +259,8 @@ public class VersioningServiceImpl exten
return result;
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.apache.opencmis.client.provider.VersioningService#
- * getObjectOfLatestVersion(java.lang.String , java.lang.String,
- * java.lang.Boolean, java.lang.String, java.lang.Boolean,
- * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
- * java.lang.Boolean, java.lang.Boolean,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
- public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
ReturnVersion returnVersion = ReturnVersion.LATEST;
@@ -334,27 +268,19 @@ public class VersioningServiceImpl exten
returnVersion = ReturnVersion.LASTESTMAJOR;
}
- return getObjectInternal(repositoryId, IdentifierType.ID, versionSeriesId, returnVersion, filter,
+ return getObjectInternal(repositoryId, IdentifierType.ID, objectId, returnVersion, filter,
includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeACL, extension);
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.apache.opencmis.client.provider.VersioningService#
- * getPropertiesOfLatestVersion(java.lang .String, java.lang.String,
- * java.lang.Boolean, java.lang.String,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
- public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, ExtensionsData extension) {
+ public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, ExtensionsData extension) {
ReturnVersion returnVersion = ReturnVersion.LATEST;
if ((major != null) && (major.booleanValue())) {
returnVersion = ReturnVersion.LASTESTMAJOR;
}
- ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, versionSeriesId, returnVersion, filter,
+ ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, objectId, returnVersion, filter,
Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, extension);
return object.getProperties();
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -45,9 +45,6 @@ import org.apache.chemistry.opencmis.com
/**
* Versioning Service Web Services client.
- *
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
*/
public class VersioningServiceImpl extends AbstractWebServicesService implements VersioningService {
@@ -61,15 +58,6 @@ public class VersioningServiceImpl exten
fPortProvider = portProvider;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#checkOut(java.lang
- * .String, org.apache.opencmis.client.provider.Holder,
- * org.apache.opencmis.client.provider.ExtensionsData,
- * org.apache.opencmis.client.provider.Holder)
- */
public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
Holder<Boolean> contentCopied) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
@@ -91,14 +79,6 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#cancelCheckOut(
- * java.lang.String, java.lang.String,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
@@ -115,18 +95,6 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#checkIn(java.lang
- * .String, org.apache.opencmis.client.provider.Holder, java.lang.Boolean,
- * org.apache.opencmis.client.provider.PropertiesData,
- * org.apache.opencmis.client.provider.ContentStreamData, java.lang.String,
- * java.util.List, org.apache.opencmis.client.provider.AccessControlList,
- * org.apache.opencmis.client.provider.AccessControlList,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
ContentStream contentStream, String checkinComment, List<String> policies, Acl addACEs, Acl removeACEs,
ExtensionsData extension) {
@@ -148,29 +116,8 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.commons.provider.VersioningService#getAllVersions
- * (java.lang.String, java.lang.String, java.lang.String, java.lang.String,
- * java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData)
- */
public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
Boolean includeAllowableActions, ExtensionsData extension) {
- return getAllVersions(repositoryId, versionSeriesId, filter, includeAllowableActions, extension);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.provider.VersioningService#getAllVersions(
- * java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
- public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId, String filter,
- Boolean includeAllowableActions, ExtensionsData extension) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
try {
@@ -196,18 +143,8 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.apache.opencmis.client.provider.VersioningService#
- * getObjectOfLatestVersion(java.lang.String , java.lang.String,
- * java.lang.Boolean, java.lang.String, java.lang.Boolean,
- * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
- * java.lang.Boolean, java.lang.Boolean,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
- public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
@@ -222,20 +159,12 @@ public class VersioningServiceImpl exten
}
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.apache.opencmis.client.provider.VersioningService#
- * getPropertiesOfLatestVersion(java.lang .String, java.lang.String,
- * java.lang.Boolean, java.lang.String,
- * org.apache.opencmis.client.provider.ExtensionsData)
- */
- public Properties getPropertiesOfLatestVersion(String repositoryId, String VersionSeriesId, Boolean major,
- String filter, ExtensionsData extension) {
+ public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, ExtensionsData extension) {
VersioningServicePort port = fPortProvider.getVersioningServicePort();
try {
- return convert(port.getPropertiesOfLatestVersion(repositoryId, VersionSeriesId, major, filter,
+ return convert(port.getPropertiesOfLatestVersion(repositoryId, versionSeriesId, major, filter,
convert(extension)));
} catch (CmisException e) {
throw convertException(e);
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -495,12 +495,12 @@ public abstract class AbstractSimpleRead
// check latest version
ObjectData latestVersionObject = getBinding().getVersioningService().getObjectOfLatestVersion(
- getTestRepositoryId(), versionSeriesId, Boolean.FALSE, "*", Boolean.TRUE, IncludeRelationships.BOTH,
- null, Boolean.TRUE, Boolean.TRUE, null);
+ getTestRepositoryId(), objectId, versionSeriesId, Boolean.FALSE, "*", Boolean.TRUE,
+ IncludeRelationships.BOTH, null, Boolean.TRUE, Boolean.TRUE, null);
assertNotNull(latestVersionObject);
Properties latestVersionProperties = getBinding().getVersioningService().getPropertiesOfLatestVersion(
- getTestRepositoryId(), versionSeriesId, Boolean.FALSE, "*", null);
+ getTestRepositoryId(), objectId, versionSeriesId, Boolean.FALSE, "*", null);
assertNotNull(latestVersionProperties);
assertEquals(latestVersionObject.getProperties(), latestVersionProperties);
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -266,13 +266,23 @@ public class PersistentDocumentImpl exte
* org.apache.opencmis.client.api.OperationContext)
*/
public Document getObjectOfLatestVersion(boolean major, OperationContext context) {
- String versionSeriesId = getVersionSeriesId();
+ String objectId;
+ String versionSeriesId;
+
+ readLock();
+ try {
+ objectId = getObjectId();
+ versionSeriesId = getVersionSeriesId();
+ } finally {
+ readUnlock();
+ }
+
if (versionSeriesId == null) {
throw new CmisRuntimeException("Version series id is unknown!");
}
ObjectData objectData = getBinding().getVersioningService().getObjectOfLatestVersion(getRepositoryId(),
- versionSeriesId, major, context.getFilterString(), context.isIncludeAllowableActions(),
+ objectId, versionSeriesId, major, context.getFilterString(), context.isIncludeAllowableActions(),
context.getIncludeRelationships(), context.getRenditionFilterString(), context.isIncludePolicies(),
context.isIncludeAcls(), null);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/NavigationService.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/api/NavigationService.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/NavigationService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/NavigationService.java Sun Apr 18 13:50:37 2010
@@ -25,24 +25,16 @@ import org.apache.chemistry.opencmis.com
/**
* Navigation Service interface. See CMIS 1.0 domain model for details.
- *
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
- * @see <a
- * href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis">OASIS
- * CMIS Technical Committee</a>
*/
public interface NavigationService {
- List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth, String filter,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- Boolean includePathSegment, ExtensionsData extension);
-
ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
- ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension);
+ List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth, String filter,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ Boolean includePathSegment, ExtensionsData extension);
List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth, String filter,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
@@ -52,6 +44,8 @@ public interface NavigationService {
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includeRelativePathSegment, ExtensionsData extension);
+ ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension);
+
ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryService.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/api/RepositoryService.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryService.java Sun Apr 18 13:50:37 2010
@@ -23,24 +23,49 @@ import java.util.List;
/**
* Repository Service interface. See CMIS 1.0 domain model for details.
- *
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
- * @see <a
- * href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis">OASIS
- * CMIS Technical Committee</a>
*/
public interface RepositoryService {
+ /**
+ * Returns a list of CMIS repositories available from this CMIS service
+ * endpoint.
+ */
List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension);
+ /**
+ * Returns information about the CMIS repository, the optional capabilities
+ * it supports and its Access Control information if applicable.
+ *
+ * @param repositoryId
+ * the identifier for the repository
+ */
RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension);
+ /**
+ * Returns the list of Object-Types defined for the Repository that are
+ * children of the specified Type.
+ *
+ * @param repositoryId
+ * the identifier for the repository
+ * @param typeId
+ * optional) the typeId of an Object-Type specified in the
+ * repository
+ * @param includePropertyDefinitions
+ * (optional) if <code>true</code>, then the Repository MUST
+ * return the property definitions for each object type returned
+ */
TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
+ /**
+ * Returns the set of descendant object type defined for the repository
+ * under the specified type.
+ */
List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
Boolean includePropertyDefinitions, ExtensionsData extension);
+ /**
+ * Gets the definition of the specified object type.
+ */
TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/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/api/VersioningService.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/VersioningService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/VersioningService.java Sun Apr 18 13:50:37 2010
@@ -41,17 +41,13 @@ public interface VersioningService {
ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
ExtensionsData extension);
- public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension);
- public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, ExtensionsData extension);
+ public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, ExtensionsData extension);
public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
Boolean includeAllowableActions, ExtensionsData extension);
-
- @Deprecated
- public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId, String filter,
- Boolean includeAllowableActions, ExtensionsData extension);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisService.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/api/server/CmisService.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisService.java Sun Apr 18 13:50:37 2010
@@ -19,18 +19,52 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+/**
+ * OpenCMIS server interface.
+ */
public interface CmisService extends RepositoryService, NavigationService, ObjectService, VersioningService,
DiscoveryService, MultiFilingService, RelationshipService, AclService, PolicyService {
+ /**
+ * Creates a new document, folder or policy.
+ *
+ * The property "cmis:objectTypeId" defines the type and implicitly the base
+ * type.
+ */
ObjectData create(String repositoryId, Properties properties, String folderId, ContentStream contentStream,
VersioningState versioningState, List<String> policies, ExtensionsData extension);
+ /**
+ * Deletes an object or cancels a check out.
+ *
+ * For the Web Services binding this is always an object deletion. For the
+ * AtomPub it depends on the referenced object. If it is a checked out
+ * document then the check out must be canceled. If the object is not a
+ * checked out document then the object must be deleted.
+ */
void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
ExtensionsData extension);
+ /**
+ * Applies a new ACL to an object.
+ *
+ * Since it is not possible to transmit an "add ACL" and a "remove ACL" via
+ * AtomPub, the merging has to be done the client side. The ACEs provided
+ * here is supposed to the new complete ACL.
+ */
Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation);
+ /**
+ * Returns the {@link ObjectInfo} of the given object id or
+ * <code>null</code> if no object info exists.
+ *
+ * Only AtomPub requests will require object infos.
+ */
ObjectInfo getObjectInfo(String objectId);
+ /**
+ * Signals that this object will not be used anymore and resources can
+ * released.
+ */
void close();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisServiceFactory.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/api/server/CmisServiceFactory.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisServiceFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/CmisServiceFactory.java Sun Apr 18 13:50:37 2010
@@ -1,6 +1,24 @@
package org.apache.chemistry.opencmis.commons.api.server;
+import java.util.Map;
+
public interface CmisServiceFactory {
+ /**
+ * Initializes the factory instance.
+ */
+ void init(Map<String, String> parameters);
+
+ /**
+ * Cleans up the the factory instance.
+ */
+ void destroy();
+
+ /**
+ * Returns a {@link CmisService} object for the given {@link CallContext}.
+ *
+ * When the {@link CmisService} object is not longer needed
+ * {@link CmisService#close()} will be called.
+ */
CmisService getService(CallContext context);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/ObjectInfo.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/api/server/ObjectInfo.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/ObjectInfo.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/server/ObjectInfo.java Sun Apr 18 13:50:37 2010
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
import java.util.GregorianCalendar;
import java.util.List;
+import org.apache.chemistry.opencmis.commons.api.ObjectData;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
/**
@@ -159,4 +160,9 @@ public interface ObjectInfo {
* <code>null</code> is no such relationships exist.
*/
List<String> getRelationshipTargetIds();
+
+ /**
+ * Returns the full object.
+ */
+ ObjectData getObject();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.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/server/AbstractCmisService.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java Sun Apr 18 13:50:37 2010
@@ -40,6 +40,18 @@ public abstract class AbstractCmisServic
private Map<String, ObjectInfo> objectInfoMap;
+ // --- repository service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required. Convenience implementation is present.</li>
+ * </ul>
+ */
public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
RepositoryInfo result = null;
@@ -60,48 +72,169 @@ public abstract class AbstractCmisServic
return result;
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * </ul>
+ */
public abstract List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension);
- public abstract TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
-
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * </ul>
+ */
public abstract TypeDefinitionList getTypeChildren(String repositoryId, String typeId,
Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
Boolean includePropertyDefinitions, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported!");
- }
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * </ul>
+ */
+ public abstract TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
+
+ // --- navigation service ---
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * <li>Object infos should contain the folder and all returned children.</li>
+ * </ul>
+ */
public abstract ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the folder and all returned descendants.</li>
+ * </ul>
+ */
public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported!");
- }
-
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the folder and all returned descendants.</li>
+ * </ul>
+ */
public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * <li>Object infos should contain the object and all returned parents.</li>
+ * </ul>
+ */
public abstract List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includeRelativePathSegment, ExtensionsData extension);
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned parent folder.</li>
+ * </ul>
+ */
+ public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+ throw new CmisNotSupportedException("Not supported!");
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the folder and the returned objects.</li>
+ * </ul>
+ */
+ public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ throw new CmisNotSupportedException("Not supported!");
+ }
+
+ // --- object service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub</li>
+ * <li>Implementation is optional. Convenience implementation is present.</li>
+ * <li>Object infos should contain the newly created object.</li>
+ * </ul>
+ */
public ObjectData create(String repositoryId, Properties properties, String folderId, ContentStream contentStream,
VersioningState versioningState, List<String> policies, ExtensionsData extension) {
// check properties
@@ -147,187 +280,569 @@ public abstract class AbstractCmisServic
Boolean.TRUE, null);
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public String createDocument(String repositoryId, Properties properties, String folderId,
ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
Acl removeAces, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
Acl addAces, Acl removeAces, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
- Acl addAces, Acl removeAces, ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported!");
- }
-
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the newly created object.</li>
+ * </ul>
+ */
public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
Acl removeAces, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
- ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported!");
- }
-
- public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
+ Acl addAces, Acl removeAces, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
- ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
- UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
- throw new CmisNotSupportedException("Not supported!");
- }
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is required.</li>
+ * <li>Object infos should contain the returned object.</li>
+ * </ul>
+ */
+ public abstract ObjectData getObject(String repositoryId, String objectId, String filter,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension);
- public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
- BigInteger length, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public abstract ObjectData getObject(String repositoryId, String objectId, String filter,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension);
-
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned object.</li>
+ * </ul>
+ */
public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
Boolean includeAcl, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+ BigInteger length, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the updated object.</li>
+ * </ul>
+ */
+ public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+ Properties properties, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the moved object.</li>
+ * </ul>
+ */
public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
- Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional. Convenience implementation is present.</li>
+ * </ul>
+ */
+ public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+ deleteObjectOrCancelCheckOut(repositoryId, objectId, allVersions, extension);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
+ ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
- Properties properties, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+ UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
- ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- versioning service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the checked out object.</li>
+ * </ul>
+ */
public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
Holder<Boolean> contentCopied) {
throw new CmisNotSupportedException("Not supported!");
}
- public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
- Boolean includeAllowableActions, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
+ public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
- public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId, String filter,
- Boolean includeAllowableActions, ExtensionsData extension) {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the checked in object.</li>
+ * </ul>
+ */
+ public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
+ ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
+ ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned object.</li>
+ * </ul>
+ */
public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
String filter, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned objects.</li>
+ * </ul>
+ */
+ public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
+ Boolean includeAllowableActions, ExtensionsData extension) {
+ throw new CmisNotSupportedException("Not supported!");
+ }
+
+ // --- discovery service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned objects.</li>
+ * </ul>
+ */
public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- multi filing service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the added object.</li>
+ * </ul>
+ */
public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the removed object.</li>
+ * </ul>
+ */
public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- relationship service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the object and the returned relationship
+ * objects.</li>
+ * </ul>
+ */
public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- ACL service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
AclPropagation aclPropagation, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- policy service ---
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the applied policy object.</li>
+ * </ul>
+ */
public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * <li>Object infos should contain the returned policy objects.</li>
+ * </ul>
+ */
public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * <b>Implementation Hints:</b>
+ * <ul>
+ * <li>Bindings: AtomPub, Web Services, Local</li>
+ * <li>Implementation is optional.</li>
+ * </ul>
+ */
public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
throw new CmisNotSupportedException("Not supported!");
}
+ // --- server specific ---
+
public ObjectInfo getObjectInfo(String objectId) {
+ if (objectInfoMap == null) {
+ return null;
+ }
+
return objectInfoMap.get(objectId);
}
+ /**
+ * Adds an object info.
+ */
public void addObjectInfo(ObjectInfo objectInfo) {
if (objectInfoMap == null) {
objectInfoMap = new HashMap<String, ObjectInfo>();
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServicesFactory.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/server/AbstractServicesFactory.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServicesFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServicesFactory.java Sun Apr 18 13:50:37 2010
@@ -8,15 +8,9 @@ import org.apache.chemistry.opencmis.com
public abstract class AbstractServicesFactory implements CmisServiceFactory {
- /**
- * Initializes the factory instance.
- */
public void init(Map<String, String> parameters) {
}
- /**
- * Cleans up the the factory instance.
- */
public void destroy() {
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/ObjectInfoImpl.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/server/ObjectInfoImpl.java?rev=935340&r1=935339&r2=935340&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/ObjectInfoImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/ObjectInfoImpl.java Sun Apr 18 13:50:37 2010
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
import java.util.GregorianCalendar;
import java.util.List;
+import org.apache.chemistry.opencmis.commons.api.ObjectData;
import org.apache.chemistry.opencmis.commons.api.server.ObjectInfo;
import org.apache.chemistry.opencmis.commons.api.server.RenditionInfo;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
@@ -53,6 +54,7 @@ public class ObjectInfoImpl implements O
private boolean supportsFolderTree = false;
private List<String> relationshipSourceIds = null;
private List<String> relationshipTargetIds = null;
+ private ObjectData object = null;
public ObjectInfoImpl() {
}
@@ -245,4 +247,12 @@ public class ObjectInfoImpl implements O
public void setRelationshipTargetIds(List<String> relationshipTargetIds) {
this.relationshipTargetIds = relationshipTargetIds;
}
+
+ public ObjectData getObject() {
+ return object;
+ }
+
+ public void setObject(ObjectData object) {
+ this.object = object;
+ }
}
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -70,8 +70,8 @@ public class VersioningServiceImpl exten
includeAllowableActions, extension, null);
}
- public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
return fVersioningSvc.getObjectOfLatestVersion(fDummyCallContext, repositoryId, versionSeriesId, major, filter,
@@ -79,8 +79,8 @@ public class VersioningServiceImpl exten
extension, null);
}
- public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
- String filter, ExtensionsData extension) {
+ public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, ExtensionsData extension) {
return fVersioningSvc.getPropertiesOfLatestVersion(fDummyCallContext, repositoryId, versionSeriesId, major,
filter, extension);
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=935340&r1=935339&r2=935340&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 Sun Apr 18 13:50:37 2010
@@ -127,8 +127,8 @@ public class VersioningTest extends Abst
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
// test that object is checked out and that all properties are set
@@ -168,7 +168,7 @@ public class VersioningTest extends Abst
assertTrue(fCreator.verifyProperty(idHolder.getValue(), VersionTestTypeSystemCreator.PROPERTY_ID,
PROP_VALUE_NEW));
- List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, docId, "*", false, null);
+ List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, docId, docId, "*", false, null);
assertEquals(2, allVersions.size());
}
@@ -185,8 +185,8 @@ public class VersioningTest extends Abst
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
@@ -222,8 +222,8 @@ public class VersioningTest extends Abst
assertFalse(isCheckedOut(docId));
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
@@ -284,8 +284,8 @@ public class VersioningTest extends Abst
assertFalse(isCheckedOut(docId));
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
@@ -329,8 +329,8 @@ public class VersioningTest extends Abst
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
@@ -344,7 +344,7 @@ public class VersioningTest extends Abst
String checkinComment = "Checkin with content and properties.";
fVerSvc.checkIn(fRepositoryId, idHolder, true, newProps, altContent, checkinComment, null, null, null, null);
- Properties latest = fVerSvc.getPropertiesOfLatestVersion(fRepositoryId, docId, true, "*", null);
+ Properties latest = fVerSvc.getPropertiesOfLatestVersion(fRepositoryId, docId, docId, true, "*", null);
assertNotNull(latest);
checkVersionProperties(verId, versioningState, latest.getProperties(), checkinComment);
@@ -363,8 +363,8 @@ public class VersioningTest extends Abst
Holder<Boolean> contentCopied = new Holder<Boolean>();
Holder<String> idHolder = new Holder<String>(verId); // or should this
- // be version
- // series?
+ // be version
+ // series?
fVerSvc.checkOut(fRepositoryId, idHolder, null, contentCopied);
String pwcId = idHolder.getValue();
@@ -381,7 +381,7 @@ public class VersioningTest extends Abst
// get latest major version
versioningState = VersioningState.MAJOR;
boolean isMajor = true;
- ObjectData objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, isMajor, "*", false,
+ ObjectData objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, docId, isMajor, "*", false,
IncludeRelationships.NONE, null, false, false, null);
checkVersionProperties(verId, versioningState, objData.getProperties().getProperties(), checkinComment);
ContentStream retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(), null, BigInteger
@@ -391,7 +391,7 @@ public class VersioningTest extends Abst
// get latest non-major version, must be the same as before
versioningState = VersioningState.MAJOR;
isMajor = false;
- objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, isMajor, "*", false,
+ objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, docId, isMajor, "*", false,
IncludeRelationships.NONE, null, false, false, null);
checkVersionProperties(verId, versioningState, objData.getProperties().getProperties(), checkinComment);
retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(), null,
@@ -443,7 +443,7 @@ public class VersioningTest extends Abst
@Test
public void testModifyOldVersions() {
String versionSeriesId = createVersionSeriesWithThreeVersions();
- List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, versionSeriesId, "*", false, null);
+ List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, null, versionSeriesId, "*", false, null);
assertEquals(3, allVersions.size());
}
@@ -474,7 +474,7 @@ public class VersioningTest extends Abst
String docId = getVersionSeriesId(verId, version.getProperties().getProperties());
assertTrue(null != docId && docId.length() > 0);
- List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, docId, "*", false, null);
+ List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, docId, docId, "*", false, null);
assertEquals(1, allVersions.size());
checkVersionProperties(verId, versioningState, allVersions.get(0).getProperties().getProperties(), null);
@@ -513,14 +513,14 @@ public class VersioningTest extends Abst
assertNotNull(pdb);
boolean bVal = pdb.getFirstValue();
assertEquals(versioningState != VersioningState.CHECKEDOUT, bVal); // if
- // checked
- // out
- // it
- // isn
- // 't
- // the
- // latest
- // version
+ // checked
+ // out
+ // it
+ // isn
+ // 't
+ // the
+ // latest
+ // version
pdb = (PropertyBoolean) props.get(PropertyIds.IS_MAJOR_VERSION);
assertNotNull(pdb);
@@ -688,7 +688,7 @@ public class VersioningTest extends Abst
cmisComplexType.addCustomPropertyDefinitions(propertyDefinitions);
cmisComplexType.setIsVersionable(true); // make it a versionable
- // type;
+ // type;
// add type to types collection
typesList.add(cmisComplexType);