After a bit google search I think there is no solution yet, to achieve this you
need the good 'ol deprecated sql language:
public LinkedList<HashMap<String, String>> getAllAssets() throws
LoginException, RepositoryException {
LinkedList<HashMap<String, String>> ll = new LinkedList<HashMap<String,
String>>();
final String statement = "select * from nt:base where jcr:path like
'/myFolder/%'";
final String language = "sql";
NodeIterator nit = QueryUtil.search("dam", statement, language);
while (nit.hasNext()) {
HashMap<String, String> hm = new HashMap<String, String>();
Node node = nit.nextNode();
String primaryNodeType = node.getPrimaryNodeType().getName();
if (primaryNodeType.equals("mgnl:folder")) {
hm.put("isFolder", "true");
if (node.hasProperty("title")) {
hm.put("folderName", node.getProperty("title").getString());
} else {
hm.put("folderName", node.getName());
}
}
if (primaryNodeType.equals("mgnl:asset")) {
hm.put("isFolder", "false");
Asset asset = damTemplatingFunctions. getAsset("jcr",
node.getPath());
hm.put("link", asset.getLink());
hm.put("fileName", asset.getFileName());
}
if (!hm.isEmpty()) {
ll.add(hm);
}
}
return ll;
}
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=e58a5395-852f-4a53-80d2-036f5cac5efb
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------