hippo get together workshop automatic export
DESCRIPTION
By Bert LeunisTRANSCRIPT
![Page 1: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/1.jpg)
Workshop Automatic ExportBert Leunis
Hippo Gettogether April 20, 2012
![Page 2: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/2.jpg)
Check out the demo project from: ● http://svn.onehippo.org/repos/hippo/hippo-
training-autoexport/trunk● build it with: mvn clean install● run it with: mvn -Pcargo.run
Set up the demo project locally
![Page 3: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/3.jpg)
Agenda
1. Developer at work, creating configuration2. What can Automatic Export do to help you?3. Tips & Tricks
![Page 4: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/4.jpg)
Things you make as a Hippo Developer: ● java code (HippoBeans, HstComponents)● templates (JSP, Freemarker)● repository content (type definitions, hst
configuration, etc)
What's in a Days Work?
![Page 5: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/5.jpg)
LOCAL PROJECT
CMS
SITE
CONTENT
![Page 6: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/6.jpg)
1. Build your project: mvn clean install 2. Run your project: mvn -Pcargo.run
Building & Running
![Page 7: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/7.jpg)
LOCAL PROJECT
RUNNINGCONTAINER
site.war
cms.war
content.jar
![Page 8: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/8.jpg)
1. CMS will check if content needs to be
bootstrapped.2. All entries in all hippoecm-extension.xml files
are processed.3. Every entry points to a packaged file, and
that is bootstrapped into the repository.4. The hippoecm-extension.xml file of your
content.jar from your project is processed.
CMS starts up....
![Page 9: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/9.jpg)
LOCAL PROJECT
RUNNINGCONTAINER STORAGE
site.war
cms.war
content.jar
Repository
BOOTSTRAP
![Page 10: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/10.jpg)
1. You use the cms and console to update
some configuration, say create a new document type.
2. Now the changed configuration must be stored in the content module of your project so it can be bootstrapped next time.
3. You need the actual data there as xml file.4. You need an entry in the hippoecm-
extension file.
Developer at work
![Page 11: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/11.jpg)
LOCAL PROJECT
RUNNINGCONTAINER STORAGE
site.war
cms.war
content.jar
Repository
1. EXPORT CONFIG AS XML
2. UPDATE HIPPOECM-EXTENSION.XML
![Page 12: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/12.jpg)
1. You need to be accurate about which nodes
to export.2. Place the exported xml in your content
module.3. Write a correct entry in hippoecm-extension.
xml.4. This is error prone and boring.5. Luckily there is now...
This is tiring and cumbersome work
![Page 13: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/13.jpg)
LOCAL PROJECT
RUNNINGCONTAINER STORAGE
site.war
cms.war
content.jar
Repository
1. EXPORT CONFIG AS XML
2. UPDATE HIPPOECM-EXTENSION.XML
AUTOMATIC EXPORT !!
![Page 14: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/14.jpg)
1. Export the changed xml files2. Write an entry in hippoecm-extension.xml if
necessary.3. You can configure the behavior of the
export.
Yes, Automatic Export can do for you:
![Page 15: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/15.jpg)
Basic export: new document type
● log in at http://localhost:8080/cms as admin● go to the documents perspective and to the
Configuration tab● create a new document type, say the
agendadocument, add a field to it, click Done and Type actions / Commit
● check the log to see what the Automatic Export has exported
● check the new/changed files in your project
![Page 16: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/16.jpg)
Enable / disable from the console
● log in at http://localhost:8080/cms/console as admin
● at the top right of your screen you see the status of the automatic export
● you can toggle the status here too
![Page 17: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/17.jpg)
Configuration options
● log in at http://localhost:8080/cms/console as admin
● navigate to:/hippo:configuration/hippo:modules/autoexport/hippo:moduleconfig
Here you can configure 3 basic characteristics:1. Exclusion patterns2. Filter uuids3. Multiple modules
![Page 18: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/18.jpg)
1. Exclusion patterns
● define them with the multivalued "excluded" property
● the value is a path in the repository● use the wildcard * for path elements● use the wildcards ** for paths In our demo project you can see that there are two exclusion patterns defined for the /hst:hst/hst:configuration path. They prevent that the unpublished changes in the Channel Manager are exported.
![Page 19: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/19.jpg)
Test the given exclusion pattern
● In the cms, go to the Channel perspective, click on the channel name, and click Edit templates.
● Change the homepage template by adding the list component to the container.
● Click Save and Close.● Check the logs to see that nothing is
exported.● Click publish templates, check the logs
again.
![Page 20: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/20.jpg)
2. Filter uuids from the exported file
● In exported document content you need the uuids of the exported data. But in for example exported hst configuration, the uuid is just clutter.
● The multivalued "filteruuidpaths" property lets you define paths in the repository where configuration exists of which you do not want the uuids in the exports.
● For example: the hst config that was exported after the change in the Channel Manager does not contain jcr:uuid properties.
![Page 21: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/21.jpg)
3. Export to multiple content modules
● If you work with multiple content modules, you can instruct the autoexport to send the exports from different content paths to different modules.
● Use the multivalued "modules" property in the autoexport config node.
● Values are formatted as modulename:/repositorypath
![Page 22: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/22.jpg)
Export to the foocontent module
● in our demo, from two repository paths the autoexport will export to the foocontent module in the project
● add a node "foo" below the rootnode in the repository
● add a node too at the other path● click "Write changes to repository"● check the logs and the foocontent module in
your project
![Page 23: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/23.jpg)
Tips and Tricks - 1
Autoexport supports Deltas.
![Page 24: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/24.jpg)
Tips and Tricks - 2
Autoexport tries to be clever about sequence numbers for hippoecm-extension.xml.
![Page 25: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/25.jpg)
Tips and Tricks - 3
Before you commit your changes to a versioning system: rebuild your project & restart with a new storage folder.You may want to keep a copy of the storage folder.mvn -Pcargo.run -Drepo.path=storage
![Page 26: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/26.jpg)
Tips and Tricks - 4
Do not change the content module manually in your project while working with autoexport. With autoexport you get a powerful tool, but you have to be careful while you are using it.
![Page 27: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/27.jpg)
Tips and Tricks - 5
Follow the setup of the content module as we have it in the archetype.
![Page 28: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/28.jpg)
Tips and Tricks - 6
● Give the autoexport a chance!● http://wiki.onehippo.
com/display/CMS7/Automatic+export+add-on
● Ask your questions on the mailing list.
![Page 29: Hippo get together workshop automatic export](https://reader034.vdocuments.mx/reader034/viewer/2022051411/547badb7b4af9fa0158b4f57/html5/thumbnails/29.jpg)
All aboard!!