3.2.1.5. Groovy REST services

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

JCR service supports REST services creation on Groovy script.

The feature is based on RESTful framework and uses the ResourceContainer concept.

Usage

Scripts should extend ResourceContainer and should be stored in JCR as a node of the exo:groovyResourceContainer type.

The component configuration enables Groovy services loader:


<component>
  <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
  <init-params>
    <object-param>
      <name>observation.config</name>
      <object type="org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader$ObservationListenerConfiguration">
        <field name="repository">
          <string>repository</string>
        </field>
        <field name="workspaces">
          <collection type="java.util.ArrayList">
            <value>
              <string>collaboration</string>
            </value>
          </collection>
        </field>
      </object>
    </object-param>
  </init-params>
</component>
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus