3.4.2. Instantiation

Warning

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

org.exoplatform.services.script.groovy.GroovyScriptInstantiator is part of the exo.core.component.script.groovy project. GroovyScriptInstantiator can load script from specified URL and parse stream that contains Groovy source code. It has possibility of injecting the component from Container in the Groovy Class constructor. See the configuration example:


<component>
  <type>org.exoplatform.services.script.groovy.GroovyScriptInstantiator</type>
</component>

Note

You should keep one class per one Groovy file. This is the same for interface and its implementation. However, the Groovy parser is limited that does not have the Class[] parseClass(InputStream) or Collection parseClass(InputStream) type but only Class parseClass(InputStream) instead.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus