Merged HEAD (5.2) to 5.2.N (5.2.1)

126378 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      120059 jvonka: FileFolder API - NodeApiTest - add tests (+ve & -ve) to update node information
      RA-639


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 10:52:00 +00:00
parent 9ebe1f7c00
commit 79848e45da
2 changed files with 204 additions and 4 deletions

View File

@@ -1069,7 +1069,7 @@ public class NodesImpl implements Nodes
}
else
{
throw new IllegalArgumentException("Failed to change (specialise) the node type - from "+nodeTypeQName+" to "+destNodeTypeQName);
throw new InvalidArgumentException("Failed to change (specialise) node type - from "+nodeTypeQName+" to "+destNodeTypeQName);
}
}
@@ -1130,8 +1130,15 @@ public class NodesImpl implements Nodes
if (props.size() > 0)
{
// update node properties - note: null will unset the specified property
nodeService.addProperties(nodeRef, props);
try
{
// update node properties - note: null will unset the specified property
nodeService.addProperties(nodeRef, props);
}
catch (DuplicateChildNodeNameException dcne)
{
throw new ConstraintViolatedException(dcne.getMessage());
}
}
return getFolderOrDocument(nodeRef.getId(), parameters);