org.apache.lenya.cms.publication.Document org.apache.lenya.cms.publication.Publication New ... Document resourceType-opendocument try { Object doc = ; if (doc instanceof Document && ((Document) doc).exists()) { String doctype = ; if ("opendocument".equals(doctype)) { String requestURI = ; String moduleURI = requestURI.substring(0,requestURI.lastIndexOf(".html")).concat(".odt?lenya.module=opendocument"); moduleURI Download ODT Upload ODT } } } catch (Exception e) { throw new ProcessingException("Error during menu generation: ", e); }