Groovy Documentation

org.codehaus.groovy.grails.plugins
[Java] Class BinaryGrailsPlugin

java.lang.Object
  groovy.lang.GroovyObjectSupport
      org.codehaus.groovy.grails.plugins.AbstractGrailsPlugin
          org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin
              org.codehaus.groovy.grails.plugins.BinaryGrailsPlugin

@SuppressWarnings("rawtypes")
public class BinaryGrailsPlugin
extends DefaultGrailsPlugin

Models a pre-compiled binary plugin.

Authors:
Graeme Rocher
See Also:
GrailsPlugin
Since:
2.0


Field Summary
static java.lang.String BASE_MESSAGES_PROPERTIES

static java.lang.String VIEWS_PROPERTIES

 
Fields inherited from class DefaultGrailsPlugin
LOG, pluginBean
 
Fields inherited from class AbstractGrailsPlugin
application, applicationContext, dependencies, dependencyNames, evictionList, isBase, manager, pluginClass, version
 
Constructor Summary
BinaryGrailsPlugin(java.lang.Class pluginClass, BinaryGrailsPluginDescriptor descriptor, GrailsApplication application)

Creates a binary plugin instance.

 
Method Summary
protected java.util.List calculateFilenamesForLocale(java.lang.String basename, java.util.Locale locale)

Calculate the filenames for the given bundle basename and Locale, appending language code, country code, and variant code.

BinaryGrailsPluginDescriptor getBinaryDescriptor()

@return The META-INF/grails-plugin.xml descriptor

java.util.Properties getProperties(java.util.Locale locale)

Obtains all properties for this binary plugin for the given locale.

java.lang.Class[] getProvidedArtefacts()

org.springframework.core.io.Resource getResource(java.lang.String path)

Resolves a static resource contained within this binary plugin

protected void initializeProvidedArtefacts(groovy.util.slurpersupport.GPathResult descriptor)

protected void initializeViewMap(BinaryGrailsPluginDescriptor descriptor)

java.lang.Class resolveView(java.lang.String viewName)

Resolves a view for the given view name.

 
Methods inherited from class DefaultGrailsPlugin
addExclude, addExclude, beans, checkForChanges, doArtefactConfiguration, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, doWithWebDescriptor, doc, getDependencyNames, getDependentVersion, getDescriptor, getFullName, getInstance, getLoadAfterNames, getLoadBeforeNames, getLog, getName, getObservedPluginNames, getParentCtx, getPlugin, getPluginDir, getPluginExcludes, getProperties, getProvidedArtefacts, getResolver, getTypeFilters, getWatchedResourcePatterns, getWatchedResources, hasInterestInChange, isEnabled, notifyOfEvent, notifyOfEvent, refresh, restartContainer, setDescriptor, setParentApplicationContext, setWatchedResources, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsScope, toString
 
Methods inherited from class AbstractGrailsPlugin
AbstractGrailsPlugin, checkForChanges, compareTo, doWithWebDescriptor, equals, getDependencyNames, getDependentVersion, getEvictionNames, getFileSystemName, getFileSystemShortName, getLoadAfterNames, getLoadBeforeNames, getManager, getName, getPluginClass, getPluginPath, getVersion, getWatchedResourcePatterns, hasInterestInChange, hashCode, isBasePlugin, refresh, setApplication, setApplicationContext, setBasePlugin, setManager
 
Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()
 

Field Detail

BASE_MESSAGES_PROPERTIES

public static final java.lang.String BASE_MESSAGES_PROPERTIES


VIEWS_PROPERTIES

public static final java.lang.String VIEWS_PROPERTIES


 
Constructor Detail

BinaryGrailsPlugin

public BinaryGrailsPlugin(java.lang.Class pluginClass, BinaryGrailsPluginDescriptor descriptor, GrailsApplication application)
Creates a binary plugin instance.
Parameters:
pluginClass - The plugin class
descriptor - The META-INF/grails-plugin.xml descriptor
application - The application


 
Method Detail

calculateFilenamesForLocale

protected java.util.List calculateFilenamesForLocale(java.lang.String basename, java.util.Locale locale)
Calculate the filenames for the given bundle basename and Locale, appending language code, country code, and variant code. E.g.: basename "messages", Locale "de_AT_oo" -> "messages_de_AT_OO", "messages_de_AT", "messages_de".

Follows the rules defined by java.util.Locale#toString().

Parameters:
basename - the basename of the bundle
locale - the locale
Returns:
the List of filenames to check


getBinaryDescriptor

public BinaryGrailsPluginDescriptor getBinaryDescriptor()
Returns:
The META-INF/grails-plugin.xml descriptor


getProperties

public java.util.Properties getProperties(java.util.Locale locale)
Obtains all properties for this binary plugin for the given locale. Note this method does not cache so clients should in general cache the results of this method.
Parameters:
locale - The locale
Returns:
The properties or null if non exist


getProvidedArtefacts

return providedArtefacts;
public java.lang.Class[] getProvidedArtefacts()


getResource

public org.springframework.core.io.Resource getResource(java.lang.String path)
Resolves a static resource contained within this binary plugin
Parameters:
path - The relative path to the static resource
Returns:
The resource or null if it doesn't exist


initializeProvidedArtefacts

protected void initializeProvidedArtefacts(lass>(); groovy.util.slurpersupport.GPathResult descriptor)


initializeViewMap

protected void initializeViewMap(@SuppressWarnings("hiding") BinaryGrailsPluginDescriptor descriptor)


resolveView

public java.lang.Class resolveView(java.lang.String viewName)
Resolves a view for the given view name.
Parameters:
viewName - The view name
Returns:
The view class which is a subclass of GroovyPage


 

Groovy Documentation