- Magnolia relies on the JCR API to manage its data.
- Security is handled by JCR.
Three important Util classes
- For making coder's life more convenient, we implemented three Util classes.
- There are Util classes mainly either catch exceptions, or wrap some JCR Api calls together.
Access a workspace - javax.jcr.Session
Generally accessing a workspace with the JCR session 'javax.jcr.Session'
Get javax.jcr.Node or javax.jcr.Property
A specific Node or Property can be accessed by the JCR Session
Operations on javax.jcr.Node
Get a node's name
Get all child nodes as a collection
Get a specific child node by name
Get a node property by name
Get a node's path
Create and set a Property value to a specific node property
Create a sub node
Save the node with its changes
Content node MetaData
Some examples on content node MetaData with NodeTypes
Operations on javax.jcr.Property
Get a property's name
Get a property's path
Get the property's parent node
Get value from the property
Set the value of the property
Providing a Node as ContentMap to scripts
- Operating in template scripts directly on a JCR Node is not very handy.
- cmsfn provides to all scripts any Node transformed into a ContentMap
- Much easier access to the Nodes data by the ContentMap.
- ContentMap provides special attributes which are not properties:
In JavaIn Freemarker