Options:

Use JCR Directly

Client code example:

Node node = (Node) session.getItem("/foo/bar");
Node content = node.getNode("jcr:content");
long lastModified = content.getProperty("jcr:lastModified").getLong()
  • Advantages
    • No Java API definition necessary (content model is API)
    • All JCR features can be used
  • Disadvantages
    • Verbose
    • No Lenya-specific code completion

Lenya Publication API

Client code example:

Document doc = session.getDocument("/foo/bar");
long lastModified = doc.getLastModified();
  • Open issues
    • Object-JCR mapping?
  • Advantages
    • Minimal amount of client code (not verbose)
  • Disadvantages
    • With a layered approach (hiding all layers below the publication API), only the repository features exposed by the API can be used

Via Sling

  • Open issues
    • Status of OSGi-fication of Cocoon
  • Advantages
    • Out-of-the-box features
      • REST access for CRUD
      • DOJO store from repository content
    • Community
    • Tools
  • No labels