(Quick Reference)

1 Overview - Reference Documentation

Authors: Marc Palmer (marc@grailsrocks.com), Stéphane Maldini (smaldini@vmware.com)

Version: 1.0.0

1 Overview

The Plugin Platform provides APIs and utilities that provide the glue required for advanced Grails plugin development and integration across multiple Grails versions, and turbo-charge the development of a new generation of plugins.

The founding principle is that these platform features should not be part of Grails core because this would tie plugins that use the APIs to specific Grails versions.

This relative freedom from Grails versions means that plugins that use the platform should remain compatible with more Grails versions for longer, and that new features used by all plugins can be added outside of the Grails release cycle.

1.1 The APIs

The features include in this release include:
  • Configuration API - Plugin-namespaced config, Config merging, validation and default values
  • Security API - An abstraction of basic security features that most applications require, with implementations to be provided by plugins or your application
  • UI Extensions - A set of tags and helper properties and functions
  • Navigation API - A standard artefact and DSL for navigation and tags for accessing this
  • Events API - A standard event bus that can be plugged in to any event implementation, with a lightweight default provider for in-app messaging

Each feature is covered in more detail later in this documentation.

The platform is very self-referential - it uses own APIs - for example to provide event hooks for Grails application lifecycle, to declare dynamic methods on your controller and service artefacts, and to declare the configuration values that it uses.

All of these APIs are designed to be as simple as possible.

Use this platform to add tighter and more consistent integration to your own plugins.

1.2 Change log

1.0.RC1

  • Injected methods will not overwrite existing methods now, will warn instead
  • Added userExists method to security API
  • Unified i18N text and body handling in UI Extension tags
  • Improved dev-mode UI at /platform
  • Bug fixes and improvements to Events API

1.0.M3

Was: 1.0.M2 but due to release error we had to roll to M3.

  • Events API
  • New UI Extension tags p:text and p:textScope
  • New UI Extension properties pluginFlash, pluginSession, pluginRequestAttributes
  • Documentation for Events API, Navigation API, new UI Extensions
  • A little Grails treat for those browsing /platform/ on Mac

1.0.M2-SNAPSHOT

  • Refined and documented Navigation API
  • There are no longer any "g" namespaced tags. All g: tags have move to p: namespace
  • Added "site.url" Config setting for siteLink tag to use instead of grails.serverURL if the two differ for your use case
  • Refactored Injection, Conventions and Navigation implementations into public interface + implementation classes
  • Config reloading supported now - all plugin configs and constraints etc. are re-applied
  • legacyPrefix support in doWithConfigOptions - automatically copies over old Config values to your new plugin namespaced config
  • Added cssPrefix attribute to displayMessage

1.0.M1

First public release with Config and Security APIs and some UI Extensions. Work-in-progress APIs for Events, Injection, Conventions and Navigation.

1.3 Known Issues

1.0.M3

  • Automatic convention controller navigation includes all actions, not just those with GET allowedMethod
  • Platform "dev" navigation scope items do not render when browsing /platform in your own applications.

1.0.M1

  • Config API - false validation errors with platform-ui due to no x.y.'*' support yet
  • Navigation API - controllers do not auto-register in Grails 1.3.x, no DSL artefact, no reloading
  • Conventions API - API not for public use. Not fully implemented / TBD
  • Events - API not for public use. Scopes not fully implemented / TBD
  • Injection - injection may not re-apply dynamic methods and properties to reloaded or new artefacts, API is not for public use at all yet