Concepts
Document
A document is represented in JCR by a subtree ("bonsai tree") of which the root node is of node type "hippo:document". All descending nodes under the root node of the bonsai tree belong to the document, except those descending from a node of type "hippo:handle" inside the bonsai tree.
Documents can contain other documents. In that case the contained document is a subtree of the containnig document's tree. Each document can have its own workflow, the workflow for a document also applies to subdocuments of that document.
At this moment a hippo:document node always has a mixin:referencable. This will change in the near future though, so this should not be depended upon by implementations.
Handle
A handle is a node of type hippo:handle. All the child nodes of a handle node are documents, i.e. nodes of type hippo:document.
The document nodes under a handle basically represent different versions of the same document. Examples:
- different languages
- different workflow states (draft, published, etc.)
Documents are always referenced through their handle, never directly.
Sugar
Hippo Repository implements some specific functionalities, which is exposed through JCR. It is possible to add convenience methods to the Hippo version of a JCR node, to directly access these functionalities. These methods are pure convenience/sugar, eventually their implementation is always a (number of) JCR operation(s).
Example:
- getCanonicalNode(): to get the physical node represented by a virtual node
Workspace
Through the Hippo workspace several objects can be retrieved, e.g.
- The workflow for a node => wsp.getWorkflow(Node n)
- A Document Manager => wsp.getDocumentManager(String, String) e.g. ("newsletter", "3")
A document manager provides functionalities for a certain type of document. An add-on containing a certain document type, can provide a custom document manager for that document type.
CMS prototype
The plan
We aim to build a CMS prototype based on the user interface of Hippo CMS 6. The GUI plugins will need to work on the conceptual level of handles and documents, rather than JCR nodes (like the Showcase GUI / Admin console). A Wicket model needs to be created for this.
"Documents" tab
The Documents tab shows three columns like Hippo CMS 6. From left to right they contain the folder tree, the documents listing, and the different boxes with actions, workflow, etc.
The "folder tree" view shows all nodes of type nt:unstructured, all the way down the JCR tree until a hippo:handle node is encountered.
Clicking on a folder/node in the tree causes the middle view (the "document listing") to show the handles (shown as "documents" to the user) directly under the folder/node selected in the tree. (NvK: subfolders under the folder, i.e. nodes of type nt:unstructured should also be listed in the middle view).
Clicking on a "document" (handle) in the middle view causes a number of views on the right side to be loaded:
- actions view
- workflow view
- details view
- document variations view??? e.g. languages, workflow states...