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/HEAD/root@126378 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:35:31 +00:00
parent e8f94dbdaa
commit 10d9b76ddb
2 changed files with 204 additions and 4 deletions

View File

@@ -1062,7 +1062,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);
}
}
@@ -1123,8 +1123,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);