检索自定义节点属性以及在露天中删除节点时出现问题

时间:2016-03-20 10:04:13

标签: alfresco alfresco-share alfresco-webscripts

我在过去3周内使用过alfresco 5.0.d版本。我创建了作为代理的节点并输入了agencyType,并创建了诸如name,code和createdDate之类的属性,并且能够将数据保存在节点属性中。在搜索选项中,将名称作为输入,需要根据名称检索代码和createdDate。

用于访问以下节点属性的Webscript API

nodes= search.luceneSearch("TEXT:"+filter, "@agency:name", true);

结果:

  

"节点类型:{http://www.alfresco.org/model/content/1.0}content,   节点方面:   [{http://www.alfresco.org/model/rendition/1.0}renditioned,   {http://www.alfresco.org/model/content/1.0}titled,   {http://www.alfresco.org/model/content/1.0}ownable,   {http://www.alfresco.org/model/content/1.0}auditable,   {http://www.alfresco.org/model/system/1.0}referenceable,   {http://www.alfresco.org/model/system/1.0}localized,   {http://www.alfresco.org/model/content/1.0}author,   {http://www.alfresco.org/model/forum/1.0}discussable]" ;,"节点   键入:{http://www.alfresco.org/model/content/1.0}content,Node   方面:   [{http://www.alfresco.org/model/rendition/1.0}renditioned,   {http://www.alfresco.org/model/content/1.0}titled,   {http://www.alfresco.org/model/content/1.0}ownable,   {http://www.alfresco.org/model/content/1.0}auditable,   {http://www.alfresco.org/model/system/1.0}可参考

但我需要根据name属性获取节点属性,我根据name属性删除节点时需要知道该属性。

请帮忙解决此问题。

1 个答案:

答案 0 :(得分:2)

node.properties提供对此节点的所有属性的访问权限。返回的属性通过关联数组访问。可以通过以下方式访问节点的属性:

Example: node.properties["name"]

Example: node.properties.name

Source

这对你有帮助吗?