Package: org.codehaus.groovy.grails.plugins

## [Java] Class BinaryGrailsPlugin

- org.codehaus.groovy.grails.plugins.BinaryGrailsPlugin

- Models a pre-compiled binary plugin.

  Authors:
    Graeme Rocher
  See Also:
    GrailsPlugin
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `VIEWS_PROPERTIES` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class DefaultGrailsPlugin` | `LOG, pluginBean`
    `class AbstractGrailsPlugin` | `application, applicationContext, dependencies, dependencyNames, evictionList, isBase, manager, pluginClass, version`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BinaryGrailsPlugin (java.lang.Class<?> pluginClass, BinaryGrailsPluginDescriptor descriptor, GrailsApplication application)` Creates a binary plugin instance.

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected java.util.List<java.lang.String>` | `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `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`
    `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`
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), 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

    - #### public static final java.lang.String VIEWS_PROPERTIES

  - ### Constructor Detail

    - #### 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

    - #### protected java.util.List<java.lang.String> 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

    - #### public BinaryGrailsPluginDescriptor getBinaryDescriptor()

      Returns:
        The META-INF/grails-plugin.xml descriptor

    - #### 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

    - #### @java.lang.Override public java.lang.Class<?>[] getProvidedArtefacts()

    - #### 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

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

    - #### protected void initializeViewMap(BinaryGrailsPluginDescriptor descriptor)

    - #### 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