This project provides higher level features and examples of Content Import and Export, using Hippo Workflow API (for higher/workflow level document management), Hippo JCR POJO Binding library (for lower level JCR mappings/bindings) and Gallery Magick Image Processing library (for thumbnail image generation).
Also, this project provides Built-in REST Services for content exporting and importing.
So, while Hippo JCR POJO Binding library focuses only on JCR Node level mappings and bindings and doesn't provide any Hippo Workflow level operations, this project aims to provide higher level, that is, Hippo Workflow level, Content Export/Import features.
The code of this project is on GitHub at https://github.com/bloomreach-forge/content-export-import/.
In other content import tools such as the discontinued "Hippo CMS Import tool"
or any custom import modules (e.g, DaemonModule
with REST API calls),
you can easily see them very complicated.
Those tools do provide too many features such as task execution engine,
a specific POJO mapping, link resolutions between imported documents and binaries,
specific XML format support, etc.
It sounded promising, but those were too much to maintain and furthermore most of those services were not really core features that a content import tool should provide.
We believe the core features needed for a content import tool are just as follows instead:
The other features can be easily replaced by other existing services. For example,
batch size
, throttle
, etc. for system availability in batch processes.
You can also push a script into the queue using JCR API if you want it scheduled at specific time, too.
FileObject
s to marshal/unmarshal to/from.
As mentioned above, link resolution between imported documents caused so complicated implementations in other content import modules in the past.
In this module, we would like to avoid that kind of complication by simplifying the approach like the following:
/content/documents/myhippoproject/A
,
a document B is to be imported into /content/documents/myhippoproject/B
,
and the document A is to be linked to the document B (e.g, A/relateddoc/@hippo:docbase="{UUID_of_B}"
).
A/relateddoc/@hippo:docbase="/content/documents/myhippoproject/B"
.
A/relateddoc/@hippo:docbase="/content/documents/myhippoproject/B"
)
by finding the UUID of the linked content by the path information (e.g, A/relateddoc/@hippo:docbase="{UUID_of_B_resolved_by_the_path}"
).
It's simple, stupid, isn't it? :-)
This project provides Built-in REST Services for content exporting and importing.
Also, it provides task components for content exporting and importing as well as example Groovy Updater Scripts.
This project provides migration task componets which can be used in any Java application or in Groovy updater scripts instead of trying to provide a whole new UI.
There are basically four content migration task interfaces for which components are provided by this project:
Interface Name | Description | Implementation(s) |
---|---|---|
BinaryExportTask | ContentMigrationTask to export binary (gallery/asset) data to ContentNode objects. | DefaultBinaryExportTask |
DocumentVariantExportTask | ContentMigrationTask to export document variant nodes to ContentNode objects. | WorkflowDocumentVariantExportTask |
BinaryImportTask | ContentMigrationTask to import binary (gallery/asset) data from ContentNode objects. | DefaultBinaryImportTask |
DocumentVariantImportTask | ContentMigrationTask to import ContentNode objects and create or update documents. | WorkflowDocumentVariantImportTask |
Also there are some other core components used by the task implementations:
Interface Name | Description | Implementation(s) |
---|---|---|
DocumentManager | Hippo CMS Document/Folder Workflow manager to be used when maintaining Hippo folders and documents. | WorkflowDocumentManagerImpl |
You can find the following example groovy updater scripts using the task components in the demo project:
Updater script name | Description |
---|---|
Example_Export_Asset_and_Image_Set_Content | A example script to export asset and image set content, using BinaryExportTask. |
Example_Export_Published_Documents | A example script to export published documents, using DocumentVariantExportTask. |
Example_Import_Asset_and_Image_Set_Content | A example script to import asset and image set content, using BinaryImportTask. |
Example_Import_Image_Files | A example script to import image set content by scanning image files in a directory without JSON files, using BinaryImportTask. |
Example_Import_Documents_As_Unpublished | A example script to import documents as unpublished status, using DocumentVariantImportTask. |
Example_Clean_Hippo_Mirror_Docbase_Values_Having_Paths | A example script to clean interim hippo:docbase values of Hippo Mirror nodes having paths instead of UUIDs. |
Example_Clean_Hippo_String_Docbase_Property_Values_Having_Paths | A example script to clean interim String Docbase property values having paths instead of UUIDs. |
You will see more explanations in the Tutorial pages.
In the demo subfolder, you can build and run demo application, which contains all the examples explained in this site documentation.
Here are example comomands to check out, build and run demo application:
$ cd demo $ mvn clean verify $ mvn -P cargo.run
Visit http://localhost:8080/cms/ and Control Panel / Updater Editor in the Admin perspective to test it with the following example groovy updater scripts like the following (as ordered):
Note: As a functional testing, you might want to remove the following nodes through CMS Console (http://localhost:8080/cms/console/) to see how it exports and imports content after exporting all the content and before importing all the content back (between #2 and #3).
/content/gallery/contenteximdemo/*
/content/assets/contenteximdemo/*
/content/documents/contenteximdemo/*
Please see Release Notes.