Author: fmui
Date: Thu May 15 09:07:56 2014
New Revision: 1594833
URL: http://svn.apache.org/r1594833
Log:
CMIS-803: ConformanceCmisServiceWrapper should not set the VersioningState
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java?rev=1594833&r1=1594832&r2=1594833&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
Thu May 15 09:07:56 2014
@@ -438,7 +438,7 @@ public class FileShareRepository {
}
// check versioning state
- if (VersioningState.NONE != versioningState) {
+ if (!(VersioningState.NONE == versioningState || versioningState ==
null)) {
throw new CmisConstraintException("Versioning not supported!");
}
@@ -504,7 +504,7 @@ public class FileShareRepository {
checkUser(context, true);
// check versioning state
- if (VersioningState.NONE != versioningState) {
+ if (!(VersioningState.NONE == versioningState || versioningState ==
null)) {
throw new CmisConstraintException("Versioning not supported!");
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.java?rev=1594833&r1=1594832&r2=1594833&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.java
Thu May 15 09:07:56 2014
@@ -351,18 +351,6 @@ public class ConformanceCmisServiceWrapp
}
/**
- * Returns the <code>VersioningState.MAJOR</code> if <code>value</code> is
- * {@code null}.
- */
- protected VersioningState getDefault(VersioningState value) {
- if (value == null) {
- return VersioningState.MAJOR;
- }
-
- return value;
- }
-
- /**
* Returns the <code>UnfileObjects.DELETE</code> if <code>value</code> is
* {@code null}.
*/
@@ -721,7 +709,6 @@ public class ConformanceCmisServiceWrapp
checkRepositoryId(repositoryId);
checkProperties(properties);
checkProperty(properties, PropertyIds.OBJECT_TYPE_ID, String.class);
- versioningState = getDefault(versioningState);
try {
return getWrappedService().create(repositoryId, properties,
folderId, contentStream, versioningState,
@@ -737,7 +724,6 @@ public class ConformanceCmisServiceWrapp
checkRepositoryId(repositoryId);
checkProperties(properties);
checkProperty(properties, PropertyIds.OBJECT_TYPE_ID, String.class);
- versioningState = getDefault(versioningState);
try {
return getWrappedService().createDocument(repositoryId,
properties, folderId, contentStream,
@@ -752,7 +738,6 @@ public class ConformanceCmisServiceWrapp
ExtensionsData extension) {
checkRepositoryId(repositoryId);
checkId("Source Id", sourceId);
- versioningState = getDefault(versioningState);
try {
return getWrappedService().createDocumentFromSource(repositoryId,
sourceId, properties, folderId,