Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

121928 jvonka: Nodes (File/Folder) API - minor cleanup (remove experimental code)
   - will be replaced by move/copy operations (and also batch/bulk operation in the future)
   RA-684 RA-806, RA-668


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126441 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:55:39 +00:00
parent 6775385f1f
commit 6e89ab1ea3
3 changed files with 6 additions and 50 deletions

View File

@@ -1070,6 +1070,11 @@ public class NodesImpl implements Nodes
// TODO should we able to specify content properties (eg. mimeType ... or use extension for now, or encoding)
public Node createNode(String parentFolderNodeId, Node nodeInfo, Parameters parameters)
{
if (nodeInfo.getNodeRef() != null)
{
throw new InvalidArgumentException("Unexpected id when trying to create a new node: "+nodeInfo.getNodeRef());
}
// check that requested parent node exists and it's type is a (sub-)type of folder
final NodeRef parentNodeRef = validateOrLookupNode(parentFolderNodeId, null);