Workshop Automatic Export          Bert LeunisHippo Gettogether April 20, 2012
Set up the demo project locallyCheck out the demo project from:● http://svn.onehippo.org/repos/hippo/hippo-  training-auto...
Agenda1. Developer at work, creating configuration2. What can Automatic Export do to help you?3. Tips & Tricks
Whats in a Days Work?Things you make as a Hippo Developer:● java code (HippoBeans, HstComponents)● templates (JSP, Freemar...
LOCAL    CMSPROJECT          CONTENT           SITE
Building & Running1. Build your project: mvn clean install2. Run your project: mvn -Pcargo.run
LOCAL     RUNNINGPROJECT   CONTAINER           cms.war            content.jar           site.war
CMS starts up....1. CMS will check if content needs to be   bootstrapped.2. All entries in all hippoecm-extension.xml file...
LOCAL     RUNNING                                 STORAGEPROJECT   CONTAINER           cms.war                Repository  ...
Developer at work1. You use the cms and console to update   some configuration, say create a new   document type.2. Now th...
LOCAL         RUNNING                                 STORAGE PROJECT       CONTAINER                 cms.war             ...
This is tiring and cumbersome work1. You need to be accurate about which nodes   to export.2. Place the exported xml in yo...
LOCAL         RUNNING                                 STORAGE PROJECT       CONTAINER                 cms.war             ...
Yes, Automatic Export can do foryou:1. Export the changed xml files2. Write an entry in hippoecm-extension.xml if   necess...
Basic export: new document type● log in at http://localhost:8080/cms as admin● go to the documents perspective and to the ...
Enable / disable from the console● log in at http://localhost:8080/cms/console as  admin● at the top right of your screen ...
Configuration options● log in at http://localhost:8080/cms/console as   admin● navigate to:   /hippo:configuration/hippo:m...
1. Exclusion patterns● define them with the multivalued "excluded"  property● the value is a path in the repository● use t...
Test the given exclusion pattern● In the cms, go to the Channel perspective,  click on the channel name, and click Edit  t...
2. Filter uuids from the exported file● In exported document content you need the  uuids of the exported data. But in for ...
3. Export to multiple contentmodules● If you work with multiple content modules,  you can instruct the autoexport to send ...
Export to the foocontent module● in our demo, from two repository paths the  autoexport will export to the foocontent  mod...
Tips and Tricks - 1Autoexport supports Deltas.
Tips and Tricks - 2Autoexport tries to be clever about sequencenumbers for hippoecm-extension.xml.
Tips and Tricks - 3Before you commit your changes to aversioning system: rebuild your project & restartwith a new storage ...
Tips and Tricks - 4Do not change the content module manually inyour project while working with autoexport.With autoexport ...
Tips and Tricks - 5Follow the setup of the content module as wehave it in the archetype.
Tips and Tricks - 6● Give the autoexport a chance!● http://wiki.onehippo.  com/display/CMS7/Automatic+export+add-  on● Ask...
All aboard!!
Upcoming SlideShare
Loading in …5
×

Hippo get together workshop automatic export

938 views

Published on

By Bert Leunis

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
938
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Hippo get together workshop automatic export

  1. 1. Workshop Automatic Export Bert LeunisHippo Gettogether April 20, 2012
  2. 2. Set up the demo project locallyCheck 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
  3. 3. Agenda1. Developer at work, creating configuration2. What can Automatic Export do to help you?3. Tips & Tricks
  4. 4. Whats in a Days Work?Things you make as a Hippo Developer:● java code (HippoBeans, HstComponents)● templates (JSP, Freemarker)● repository content (type definitions, hst configuration, etc)
  5. 5. LOCAL CMSPROJECT CONTENT SITE
  6. 6. Building & Running1. Build your project: mvn clean install2. Run your project: mvn -Pcargo.run
  7. 7. LOCAL RUNNINGPROJECT CONTAINER cms.war content.jar site.war
  8. 8. CMS starts up....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.
  9. 9. LOCAL RUNNING STORAGEPROJECT CONTAINER cms.war Repository content.jar BOOTSTRAP site.war
  10. 10. Developer at work1. 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.
  11. 11. LOCAL RUNNING STORAGE PROJECT CONTAINER cms.war content.jar Repository site.war 1. EXPORT CONFIG AS XML2. UPDATE HIPPOECM- EXTENSION.XML
  12. 12. This is tiring and cumbersome work1. 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...
  13. 13. LOCAL RUNNING STORAGE PROJECT CONTAINER cms.war content.jar Repository site.war AUTOMATIC EXPORT !! 1. EXPORT CONFIG AS XML2. UPDATE HIPPOECM- EXTENSION.XML
  14. 14. Yes, Automatic Export can do foryou:1. Export the changed xml files2. Write an entry in hippoecm-extension.xml if necessary.3. You can configure the behavior of the export.
  15. 15. 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
  16. 16. 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
  17. 17. Configuration options● log in at http://localhost:8080/cms/console as admin● navigate to: /hippo:configuration/hippo:modules /autoexport/hippo:moduleconfigHere you can configure 3 basic characteristics:1. Exclusion patterns2. Filter uuids3. Multiple modules
  18. 18. 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 pathsIn our demo project you can see that there aretwo exclusion patterns defined for the /hst:hst/hst:configuration path. They prevent thatthe unpublished changes in the ChannelManager are exported.
  19. 19. 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.
  20. 20. 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
  21. 21. 3. Export to multiple contentmodules● 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
  22. 22. 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
  23. 23. Tips and Tricks - 1Autoexport supports Deltas.
  24. 24. Tips and Tricks - 2Autoexport tries to be clever about sequencenumbers for hippoecm-extension.xml.
  25. 25. Tips and Tricks - 3Before you commit your changes to aversioning system: rebuild your project & restartwith a new storage folder.You may want to keep a copy of the storagefolder.mvn -Pcargo.run -Drepo.path=storage
  26. 26. Tips and Tricks - 4Do not change the content module manually inyour project while working with autoexport.With autoexport you get a powerful tool, butyou have to be careful while you are using it.
  27. 27. Tips and Tricks - 5Follow the setup of the content module as wehave it in the archetype.
  28. 28. 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.
  29. 29. All aboard!!

×