org.apache.lenya.cms.publication.Document New ... Document resourceType-news try { Object doc = ; if (doc instanceof Document && ((Document) doc).exists()) { String doctype = ; if ("news".equals(doctype)) { news-settings } } } catch (Exception e) { throw new ProcessingException("Error during menu generation: ", e); }