Repositories

Typically Magnolia has one repository, magnolia, which in turn contains several workspaces. There is a workspace for storing website content, another for user accounts, third for configuration and so on.

A content repository is a high-level information management system that is a superset of traditional data repositories. It implements content services such as:

  • Hierarchical, structured and unstructured content

  • Granular content access and access control

  • Node types, property types (text, number, date, binary)

  • Queries (XPath, SQL)

  • Import and export

  • Referential integrity

  • Versioning

  • Observation

  • Locking

  • Clustering

  • Multiple persistence models

A content repository can store text and binary data (images, documents). You don’t need to worry about how the data is stored. The repository provides a standardized way to store and retrieve it whether it resides in a traditional database or in a file system.

diagram

Repositories configuration

Magnolia uses Apache Jackrabbit content repository which conforms to the speciifcations outlined in JSR 283. The configuration options provided by Jackrabbit are defined in the API RepositoryConfig.

Configuration file

Magnolia ships with a few examples of popular repository configurations that customers might use as-is or the basis for a customized configuration.

From a high level the file is organized with the follwoing structure.

<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<Repository>
  <DataSources .../>
  <FileSystem .../>
  <Security .../>
  <DataStore .../>
  <Workspaces .../>
  <Workspace> <!-- Blueprint for all new workspaces -->
    <FileSystem .../>
    <PersistenceManager .../>
    <SearchIndex .../>
    <WorkspaceSecurity .../>
  </Workspace>
  <Versioning .../>
</Repository>

The repo config folders are located here:

  • /magnolia-x.x.x/apache-tomcat-x.x.x/webapps/magnoliaAuthor/WEB-INF/config/repo-conf

  • /magnolia-x.x.x/apache-tomcat-x.x.x/webapps/magnoliaPublic/WEB-INF/config/repo-conf

OOTB Examples

  • jackrabbit-bundle-derby-search.xml

  • jackrabbit-bundle-h2-search.xml

  • jackrabbit-bundle-ingres-search.xml

  • jackrabbit-bundle-mysql-search.xml

  • jackrabbit-bundle-postgres-search.xml

  • jackrabbit-memory-search.xml

There are several other examples of configuration files available in our git repository.

Two properties are required for the content repository (see Configuration management).

  • Repository home directory: specified in the magnolia.properties file as magnolia.repositories.home

  • Repository configuration file: specified in the magnolia.properties file as magnolia.repositories.jackrabbit.config

The repository configuration file specifies global options like security, data sources and versioning. A default workspace configuration template is also included in the repository configuration file. For each workspace that was created, there will also be a workspace.xml file created inside the workspace home directory that will be used for the workspace.

Feedback