我正在使用AEM 6.2並試圖從節點的「jcr:content」中獲取「damFolderPath」值。如何從AEM中的節點獲取「damFolderPath」?
我試圖這些:
//resourcePath = "/content/projects/newyear-1"
Resource resource = resourceResolver.getResource(resourcePath);
Node tNode = resource.adaptTo(Node.class);
Property prop = tNode.getProperty("jcr:content/damFolderPath");
log.info("\n...Output 1:"+tNode.hasProperty("damFolderPath"));
log.info("\n...Output 2:"+prop.toString());
輸出1:假
輸出2:屬性[PropertyDelegate {父= /內容/項目/ NEWYEAR-1 /公里/ JCR: content:{jcr:primaryType = nt:unstructured,detailsHref = /projects/details.html,jcr:title = kms,active = true,cq:template =/apps/swa/projects/templates/default,damFolderPath =/content/dam/projects/newyear-1/kms, c overUrl =/content/dam/projects/newyear-1/kms/cover,sling:resourceType = cq/gui/components/projects/admin/card/projectcontent,links = {...},dashboard = {...} },property = damFolderPath =/content/dam/projects/newyear-1/kms}]
我可以看到它在那裏,但我如何從output2中獲取它?