This plugin enables you to create a Grails project that utilizes the ATG Core as part of your ATG application.
The plugin sets up the ATG Ivy Resolver for you, so you can
just declare a dependency on your module and all your module's dependencies will
be available to grails
(and can be added to your IDE):
provided( [group:'ATG_MODULE',name:'Musicstore',version:'SNAPSHOT',type:'ivy'] )
The plugin provides a factory bean to make loading Nucleus components easy:
import org.grails.atg.nucleus.NucleusFactory
beans = {
artistRepo(NucleusFactory,'/musicstore/SongsRepository')
}
You can then inject the component into your controllers, services and even domain classes:
class ArtistController {
ContentRepository artistRepo
def list = {
def view = artistRepo.getView("artist")
Query q = view.queryBuilder.createUnconstrainedQuery()
[artists:view.executeQuery(q)]
}
}
Ideally, you can use dependency injection to access Nucleus components so you wont have to use DSP tags. However, the full DSP tag library can be used in your GSPs if you need it:
<%@ taglib prefix="dsp" uri="/dspTaglib" %>
<dsp:page>
...
Note that when the plugin is installed it tries to copy dspjspTaglib1_0.tld from your ATG install to web-app/WEB-INF/tld/. If for some reason it is not successful, you will have to copy it yourself.