Fix for ALF-16823 CMIS 0.8 TCK - getAllVersions reports more then one latest version

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43652 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2012-11-16 11:19:05 +00:00
parent 71728c6afb
commit d5f9cca34a

View File

@@ -125,6 +125,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + CMISConnector.UNVERSIONED_VERSION_LABEL; objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + CMISConnector.UNVERSIONED_VERSION_LABEL;
versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL; versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL;
currentObjectId = objectId; currentObjectId = objectId;
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef);
} }
else else
{ {
@@ -138,6 +139,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
objecVariant = (headVersion.getVersionLabel().equals(versionLabel) ? CMISObjectVariant.CURRENT_VERSION objecVariant = (headVersion.getVersionLabel().equals(versionLabel) ? CMISObjectVariant.CURRENT_VERSION
: CMISObjectVariant.VERSION); : CMISObjectVariant.VERSION);
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(headVersion.getVersionedNodeRef());
} }
} }
@@ -150,6 +152,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
currentObjectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel; currentObjectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel;
currentNodeId = nodeRef.toString(); currentNodeId = nodeRef.toString();
objecVariant = CMISObjectVariant.CURRENT_VERSION; objecVariant = CMISObjectVariant.CURRENT_VERSION;
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef);
} }
else else
{ {
@@ -325,7 +328,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
} }
// check if checked out // check if checked out
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(getCurrentNodeNodeRef()); hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef);
} else if (objectId.startsWith(CMISConnector.ASSOC_ID_PREFIX)) } else if (objectId.startsWith(CMISConnector.ASSOC_ID_PREFIX))
{ {
// check the association id // check the association id
@@ -420,7 +423,6 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
analyseCurrentVersion(nodeRef); analyseCurrentVersion(nodeRef);
} }
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef);
} }
protected void analyseAssociationRef() protected void analyseAssociationRef()