Hi list,

I need to search the repository for a simple value, and got this:


HierarchyManager configManager = 
MgnlContext.getHierarchyManager(ContentRepository.CONFIG);

QueryManager configQueryManager = configManager.getQueryManager();

Query configQuery = configQueryManager.createQuery("//*[jcr:contains(., 
'"+searchKey+"')]", "xpath");

QueryResult configResult = configQuery.execute();

Collection<Content> configResults = configResult.getContent("nt:base");



Is there a less verbose way (beside wrapping it in a class myself)?



regards

Hans


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to