mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15182: Much improved ScriptNode childByNamePath() implementation, ScriptNode API for getParents() and getParentAssocs() and test script for the new APIs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
var child1 = companyhome.childByNamePath("/Data Dictionary");
|
||||
var child2 = companyhome.childByNamePath("/Data Dictionary/Scripts");
|
||||
var child3 = companyhome.childByNamePath("/Data Dictionary/Scripts/backup and log.js");
|
||||
logger.getSystem().out(child1 != null && child2 != null && child3 != null);
|
||||
|
||||
var parentCount = child1.parentAssocs["contains"].length;
|
||||
|
||||
var parents = child2.parents;
|
||||
|
||||
var result = (child1 != null && child2 != null && child3 != null && parentCount == 1 && parents.length == 1);
|
||||
result;
|
Reference in New Issue
Block a user