| <?xml version="1.0"?> |
| <document> |
| <properties> |
| <title>Jackrabbit Extension Framwork - Node Types</title> |
| </properties> |
| <body> |
| <section name="Node Type Definition"> |
| <p> |
| A Jackrabbit extension is represented as a node in the |
| repository at an application defined location with mixin |
| node type |
| <code>rep:extension</code> |
| which is defined in compact node type definition format |
| as follows: |
| </p> |
| |
| <source><![CDATA[[rep:extension] mixin |
| - rep:name (string) mandatory copy |
| - rep:id (string) mandatory copy |
| - rep:class (string) copy |
| - rep:classpath (path) multiple copy |
| - rep:configurationClass (string) copy |
| + rep:configuration (nt:base) = nt:unstructured multiple copy]]></source> |
| |
| <p> |
| The |
| <code>rep:extension</code> |
| type is a mixin node type and as such any node may be |
| designated as the declaring node of an extension. The |
| advantage of this is that the extension declaring node |
| may at the same time be the root node of the extension |
| configuration also read from the repository. |
| </p> |
| <p> |
| The |
| <code>rep:id</code> |
| property contains the name of the extension type |
| provided by this extension. It is recommended that |
| extension type names follow the same pattern of reversed |
| domain name prefixes as is specified for Java packages. |
| </p> |
| <p> |
| The |
| <code>rep:name</code> |
| property contains the name of the extension itself. This |
| name identifies the concrete definitions amongst the set |
| of extensions defined with the same extension type. The |
| name of the extension must be unique amongst all |
| extensions of the same type. |
| </p> |
| <p> |
| The |
| <code>rep:class</code> |
| property contains the fully qualified name of the class |
| implementing this extensions. If this property is not |
| empty, the Jackrabbit Extension Framework is able to provide |
| instantiation support for that class. Refer to the |
| section |
| <a href="classes.html">Extension Classes</a> |
| for explanations of class loading support in the Jackrabbit |
| Extension Framework. |
| </p> |
| <p> |
| The multivalued |
| <code>rep:classpath</code> |
| property contains a list of absolute repository path |
| names denoting the classpath used to load the extension. |
| </p> |
| <p> |
| The |
| <code>rep:configurationClass</code> |
| property contains the fully qualified name of the class, |
| which is used to provide configuration to the extension. |
| The class must implement the |
| <code> |
| <a |
| href="http://jakarta.apache.org/commons/configuration/apidocs/org/apache/commons/configuration/Configuration.html"> |
| org.apache.commons.configuration.Configuration |
| </a> |
| </code> |
| interface. If missing the configuration is loaded |
| through an |
| <code> |
| <a |
| href="apidocs/org/apache/jackrabbit/extension/configuration/ItemConfiguration.html"> |
| ItemConfiguration |
| </a> |
| </code> |
| instance. Refer to the section |
| <a href="configuration.html">Configuration</a> |
| for more information on configuration support of the Jackrabbit |
| Extension Framework. |
| </p> |
| <p> |
| The <code>rep:configuration</code> child node contains the |
| extensions configuration. The |
| <a href="apidocs/org/apache/jackrabbit/extension/ExtensionDescriptor.html#getConfigurationNode()">ExtensionDescriptor.getConfigurationNode</a> |
| method returns this node and the |
| <a href="apidocs/org/apache/jackrabbit/extension/ExtensionDescriptor.html#getConfiguration()">ExtensionDescriptor.getConfiguration</a> |
| method will load the configuration from this node. This node |
| may be of any type. For example it may be a <code>nt:file</code> |
| node whose <code>jcr:content/jcr:data</code> property contains |
| the XML configuration file. |
| </p> |
| <p> |
| The |
| <code>ExtensionManager</code> |
| class loads extensions defined with this node type |
| through its |
| <code>findExtensions</code> |
| method loading the content into instances of the |
| <code>ExtensionDescriptor</code> |
| class for ease of access. |
| </p> |
| </section> |
| </body> |
| </document> |