Class BinaryGrailsPlugin

  • All Implemented Interfaces:
    ParentApplicationContextAware, GrailsPlugin, grails.plugins.GrailsPluginInfo, groovy.lang.GroovyObject, java.lang.Comparable, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class BinaryGrailsPlugin
    extends DefaultGrailsPlugin
    Models a pre-compiled binary plugin.
    Since:
    2.0
    See Also:
    GrailsPlugin
    • Field Detail

      • VIEWS_PROPERTIES

        public static final java.lang.String VIEWS_PROPERTIES
        See Also:
        Constant Field Values
      • RELATIVE_VIEWS_PROPERTIES

        public static final java.lang.String RELATIVE_VIEWS_PROPERTIES
        See Also:
        Constant Field Values
      • PROPERTIES_EXTENSION

        public static final java.lang.String PROPERTIES_EXTENSION
        See Also:
        Constant Field Values
      • DEFAULT_PROPERTIES_ENCODING

        public static final java.lang.String DEFAULT_PROPERTIES_ENCODING
        See Also:
        Constant Field Values
      • PLUGIN_DESCRIPTOR_PATH

        public static final java.lang.String PLUGIN_DESCRIPTOR_PATH
        See Also:
        Constant Field Values
    • 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

      • getProjectDirectory

        public java.io.File getProjectDirectory()
      • initializeProvidedArtefacts

        protected void initializeProvidedArtefacts​(java.util.List<java.lang.String> classNames)
      • getProvidedArtefacts

        public java.lang.Class<?>[] getProvidedArtefacts()
        Description copied from interface: GrailsPlugin
        Retrieves an array of provided Artefacts that are pre-compiled additions to the GrailsApplication object but are overridable by the end-user
        Specified by:
        getProvidedArtefacts in interface GrailsPlugin
        Overrides:
        getProvidedArtefacts in class DefaultGrailsPlugin
        Returns:
        A list of provided artefacts
      • 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
      • 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
      • 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