}
@SuppressWarnings("unchecked")
private Map<String, Set<String>> findCommandNames()
{
QueryManager qm = MgnlContext.getQueryManager(ContentRepository.CONFIG);
Iterator catalogIter = CatalogFactory.getInstance().getNames();
Map<String, Set<String>> retVal = new HashMap<String, Set<String>>();
while (catalogIter.hasNext())
{
String catalog = (String) catalogIter.next();
try
{
Query q = qm.createQuery("//commands//" + catalog + "//*", Query.XPATH);
QueryResult qr = q.execute();
Collection collection = qr.getContent("mgnl:contentNode");
if (CollectionUtils.isEmpty(collection))
continue;
Iterator commandIter = collection.iterator();