Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Plugin for creating Grails applications that utilize the ATG Core. e.g., Nucleus, Repositories, and the DSP taglib.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .settings
Octocat-spinner-32 grails-app
Octocat-spinner-32 scripts
Octocat-spinner-32 src
Octocat-spinner-32 web-app
Octocat-spinner-32 .classpath
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .project
Octocat-spinner-32 AtgCoreGrailsPlugin.groovy
Octocat-spinner-32 README.md
Octocat-spinner-32 application.properties
Octocat-spinner-32 plugin.xml
README.md

This plugin enables you to create a Grails project that utilizes the ATG Core as part of your ATG application.

Dependencies

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'] )

Injecting Nucleus Components

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)]
    }

}

DSP Tags

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.

Something went wrong with that request. Please try again.