Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

100983: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud)
      100824: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2)
         100184: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5)
            100131 : Merged DEV to V4.1-BUG-FIX (4.1.10)
               99521 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT
                  - Don't include PWC in a version series
               99824 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT
                  - Return PWC as a part of version series. Fixes to pass TCK


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@100998 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-04-01 01:24:34 +00:00
parent 448868345c
commit 6dcac7796e
4 changed files with 84 additions and 17 deletions

View File

@@ -36,7 +36,6 @@ import org.alfresco.opencmis.dictionary.RelationshipTypeDefintionWrapper;
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.repo.version.Version2Model;
import org.alfresco.repo.version.VersionBaseModel;
import org.alfresco.repo.version.VersionModel;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -598,7 +597,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
public boolean isLatestVersion()
{
return isCurrentVersion();
return (isCurrentVersion() && !hasPWC()) || isPWC();
}
public boolean isLatestMajorVersion()
@@ -899,16 +898,18 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
private NodeRef getLatestNonMajorVersionNodeRef()
{
// if (isPWC())
// {
// return nodeRef;
// } else if (hasPWC())
// {
// return connector.getCheckOutCheckInService().getWorkingCopy(getCurrentNodeNodeRef());
// } else
// {
if (isPWC())
{
return nodeRef;
}
else if (hasPWC())
{
return connector.getCheckOutCheckInService().getWorkingCopy(getCurrentNodeNodeRef());
}
else
{
return getCurrentNodeNodeRef();
// }
}
}
// TODO lock here??