XIN Mods Package Manager

A Package Manager for Bloomreach Hippo CMS — putting your content before your application.

Watch the video below to get a quick overview of the Package Manager's functionality.


Tutorial Package used in the video above

What does it do?

The package manager is central to the flexibility required to move content between servers. It allows you to package CNDs and parts of the content tree, ZIP them and save them to disk so that you can load them up in a different XIN Mods enabled Hippo CMS instance at a later time.

There are three main parts to the package manager:

  • the packages list: a simple overview of the packages;
  • creating a package: it defines what paths and CNDs should be bundled and exported; and
  • ingesting packages: the ability to load previously downloaded packages back into your instance.

The package manager can be used with the GUI or through a set of API endpoints.

Why a package manager?

Reasons for creating this package manager:

  • make it so that the content inside your JCR no longer has to be handled with kids' gloves, instead your Hippo instance now has little to no value as you can easily reingest large amounts of content into a new repository;
  • enable the easy transfer of bits of content between different parts of your development infrastructure.
  • quickly provide a "function" to your Hippo instance by importing a set of document types you require (for example, ingest a Blog Package to quickly start creating Blog documents)
Quickstart

Getting started with XIN Mods is easy!
Read more »

Packages List

When visiting the Package Manager you are first greeted with a list of packages that have previously been ingested. From here you can create a new package or ingest a package.

Packages list

If you click on one of the existing packages you'll see the "Filters" that have been setup for it. A filter is a content path in the JCR that is to be zipped into the package when the "Download" button is pressed. This can be any kind of node, a DAM node, a document type, or a template definition node, language nodes -- it doesn't matter.

Expanded Package

Additionally you can enter the prefixes of the CNDs (Content Node Definitions) that are related to the document types you are packaging so that they are imported alongside your content if required.

If you want to download a new version of the content represented by the filters in the package, simply click the "Download" button.

Creating a Package

A dialog that allows you to create a new package:

Create a package

Required fields:

  • Package name; the name of your package.
  • Content paths; all the paths in the JCR that should be filtered into the ZIP file;
  • CND identifiers; either a full CND name like xinmods:blogdocument to be precise, or you can get everything in a namespace simply by specifying xinmods:
  • Require CNDs; if the package has requirements on other CNDs being there you can configure them here.

Ingesting Packages

Load an existing ZIP file back into a Hippo Instance.

Ingest a package

If you've already downloaded a package from the Package Manager, you can reingest them here. Simply choose the file you want to upload and select the options relevant to your scenario:

  • Ingest packaged content; Ingest the documents from the package;
  • Ingest packaged CNDs; ingest the CNDs that are part of the package;
  • Keep package definition; if not checked the package definition won't end up on the package list shown above.

Package Manager API

REST Endpoints

Export a package:

$ curl -X GET -H Content-Type: application/json -H Accept: application/json http://localhost:8080/site/custom-api/packages/blog-package/export -o package2.zip -v

Import a package:

$ curl -X PUT -F "file=@package2.zip;type=application/zip" http://localhost:8080/site/custom-api/packages/import -v

Create a package definition:

curl -X PUT -H "Content-Type: application/json" -d @test-package.json "http://localhost:8080/site/custom-api/packages/test-package2" -v

test-package.json

{
     "filters" : ["/content/documents/"],
     "cnds": ["xinmods:basedocument", "xinmods:blogdocument"]
}

Change/Edit a package definition:

curl -X POST -H "Content-Type: application/json" -d @test-package.json "http://localhost:8080/site/custom-api/packages/test-package2" -v

Delete a package definition:

curl -X DELETE -H "Content-Type: application/json" "http://localhost:8080/site/custom-api/packages/test-package2" -v

List package definitions:

curl -X GET -H "Content-Type: application/json" "http://localhost:8080/site/custom-api/packages/list" -v