Uploaded image for project: 'Bloomreach Forge'
  1. Bloomreach Forge
  2. FORGE-135

[Content-EXIM] Migrate the existing demo Groovy scripts to Repository JAX-RS Services

    XMLWordPrintable

Details

    Description

      Migrate the existing demo Groovy scripts [1] to Repository JAX-RS Services [2].

      For example,

      • Content-EXIM might have one more submodule (next to 'core' submodule): 'rs'.
      • The 'rs' submodule simply contains a DaemonModule to register some JAX-RS services which are migrated from the existing groovy script examples [1] like the following:
        Export and download zip
        POST /content-exim/export
        {
          "binaries": {
            "queries": [
              "/jcr:root/content/gallery/folder1/element(*,hippo:document)[@jcr:primaryType='hippogallery:imageset' or @jcr:primaryType='hippogallery:exampleAssetSet']",
              "/jcr:root/content/assets/folder2//element(*,hippo:document)[@jcr:primaryType='hippogallery:imageset' or @jcr:primaryType='hippogallery:exampleAssetSet']"
            ],
            "paths": [
              "/content/gallery/myhippoproject/a/b/c.jpg",
              "/content/gallery/myhippoproject/a/b/d.jpg"
            ]
          }
          "documents": {
            "queries": [
              "/jcr:root/content/documents/folder1//element(*,hippostd:publishable)[@hippostd:state='unpublished']/..",
              "/jcr:root/content/documents/folder2//element(*,hippostd:publishable)[@hippostd:state='unpublished']/.."
            ],
            "paths": [
              "/content/documents/myhippoproject/a/b/c",
              "/content/documents/myhippoproject/a/b/d"
            ]
          }
        }
        
        Upload zip and import
        curl -H "Content-Type: application/octect-stream" -XPOST "http://localhost:8080/cms/ws/content-exim/import" --data-binary "@content.zip"
        
        curl -H "Content-Type: application/octect-stream" -XPOST "http://localhost:8080/cms/ws/content-exim/import?doctagfield=myhippoproject:eximtag&doctagvalue=1.1" --data-binary "@content.zip"
        
        

      This approach will be very simple and doable and manageable in the longer term as well.

      [1] https://onehippo-forge.github.io/content-export-import/tutorials.html
      [2] https://www.onehippo.org/library/concepts/hippo-services/repository-jaxrs-service.html

      Attachments

        Issue Links

          Activity

            People

              wko Woonsan Ko (Inactive)
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: