Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Devstatus
Statusimplemented
Target5.0 Alpha1

<to be reviewed>

...

Ready to move to technical documentation.

Jira
serverMagnolia
keyDOCU-404

The Motivation

Until M5 Magnolia stored MetaData on a separate subnode - among others this

  • made complex queries (JCR_SQL2/JQOM) more complicated (if not outright impossible) as one had to use joins to access MetaData (e.g. for sorting by values in metadata)
    • some of the joins are extremely slow
  • doubled the amount of nodes in repo
  • forced to treat MetaData separately in Java
  • made exported xml harder to read
  • duplicated properties like jcr:created and jcr:createdBy

The

...

Implementation 

The properties hosted on the MetaData subnode are replaced by several fine grained mixins. Property names got consolidated.

...

New Mixins

[mgnl:lastModified]
  MIXIN

  • mgnl:lastModified (DATE)
  • mgnl:lastModifiedBy (STRING)

[mgnl:activatable]
  MIXIN

  • mgnl:lastActivated (DATE)
  • mgnl:lastActivatedBy (STRING)
  • mgnl:activationStatus (STRING)

[mgnl:renderable]
  MIXIN

  • mgnl:template (STRING)

[mgnl:created]
  MIXIN

  • mgnl:created (DATE)
  • mgnl:createdBy (STRING)

[mgnl:versionable]
  MIXIN

  • mgnl:comment (STRING)

 

Mapping

...

old

...

property name

...

old propertynew property namedefined by Mixin
MetaData/mgnl:title--
MetaData/mgnl:creationdatemgnl:createdmgnl:created
<none>mgnl:createdBymgnl:created
MetaData/mgnl:templatetype--
MetaData/mgnl:lastactionmgnl:lastActivatedmgnl:activatable
MetaData/mgnl:activatoridmgnl:lastActivatedBymgnl:activatable
MetaData/mgnl:activatedmgnl:activationStatusmgnl:activatable
MetaData/mgnl:templatemgnl:templatemgnl:renderable
MetaData/mgnl:authoridmgnl:lastModifiedBymgnl:lastModified
MetaData/mgnl:lastmodifiedmgnl:lastModifiedmgnl:lastModified
MetaData/mgnl:commentmgnl:commentmgnl:versionable

Convenience

In order easily see what custom nodeType defines what properties we created info.magnolia.jcr.util.NodeTypes.

It hosts a proper inner class for each node type together with the constants for all it's properties and some convenience methods. 

Backwards Compatibility

  • info.magnolia.cms.core.MetaData has been adapted to be fully backwards compatible
    • If you have code still using the MetaData type and the old property names, we'll internally map these to the new property names on the workingNode. 

Migration

Bootstrap files

  • We still support Bootstrap files containing MetaData subsides
    • info.magnolia.importexport.postprocessors.MetaDataImportPostProcessor will take care of moving the contained properties to the workingNode and rename to the new structure

Repositories

  • <to be described>in next Sprint (s011) we'll add an InstallationTask migrating existing content to the new repository layout