Jochen Kraushaar created CMIS-869:
-------------------------------------
Summary: DefaultDocumentTypeHandler: createDocument: Wrong
implementation of CMIS 1.0 specification
Key: CMIS-869
URL: https://issues.apache.org/jira/browse/CMIS-869
Project: Chemistry
Issue Type: Bug
Components: opencmis-server-jcr
Affects Versions: OpenCMIS 0.11.0
Reporter: Jochen Kraushaar
The CMIS 1.0 specification says:
2.2.4.1 createDocument > 2.2.4.1.1 Inputs: Enum versioningState is optional.
The default is "major".
When creating a new versionable document using the DefaultDocumentTypeHandler
the created JCR node is in state isCheckedOut = true (see JCR 2.0 15.1 Creating
a Versionable Node). At the end of the createDocument method getJcrNode is
called. If versioningState is set to "major" or "minor", the node is checked
in. If no versioningState is given, the private working copy is returned by
getJcrNode:
{code}
if (versioningState == VersioningState.MINOR || versioningState ==
VersioningState.MAJOR) {
return jcrVersion.checkin(null, null, "auto checkin");
} else {
return jcrVersion.getPwc();
}
{code}
Returning the private working copy is (according to the CMIS spec) only allowed
if versioningState is set to "checkedout".
Instead of using "major" as default for versioningState, "checkedout" is the
default if versioningState parameter is omitted by the client.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)