XIN MODS PACKAGE MANAGER
A Package Manager For Bloomreach XM: Prioritising your content over 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 Bloomreach XM 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 Bloomreach XM 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 Bloomreach XM instance by importing a set of document types you require (for example, ingest a Blog Package to quickly start creating Blog documents)
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.
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.
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:
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 Bloomreach XM Instance.
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 "[email protected];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
Go back to the overview to discover more functions of XIN Mods.