mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix ALF-3086: CMIS checkin of a non-versionable document should make it versionable
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20477 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1048,6 +1048,13 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
|||||||
NodeRef nodeRef = getObject(objectId, NodeRef.class, true, true, true);
|
NodeRef nodeRef = getObject(objectId, NodeRef.class, true, true, true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE) == false)
|
||||||
|
{
|
||||||
|
Map<QName, Serializable> props = new HashMap<QName, Serializable>();
|
||||||
|
props.put(ContentModel.PROP_INITIAL_VERSION, false);
|
||||||
|
props.put(ContentModel.PROP_AUTO_VERSION, false);
|
||||||
|
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, props);
|
||||||
|
}
|
||||||
return checkOutCheckInService.checkin(nodeRef, createVersionProperties(checkinComment, isMajor));
|
return checkOutCheckInService.checkin(nodeRef, createVersionProperties(checkinComment, isMajor));
|
||||||
}
|
}
|
||||||
catch (CheckOutCheckInServiceException e)
|
catch (CheckOutCheckInServiceException e)
|
||||||
|
Reference in New Issue
Block a user