Package org.grails.plugins
Class BinaryGrailsPlugin
- java.lang.Object
-
- groovy.lang.GroovyObjectSupport
-
- org.grails.plugins.AbstractGrailsPlugin
-
- org.grails.plugins.DefaultGrailsPlugin
-
- org.grails.plugins.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 Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PROPERTIES_ENCODINGstatic java.lang.StringPLUGIN_DESCRIPTOR_PATHstatic java.lang.StringPROPERTIES_EXTENSIONstatic java.lang.StringRELATIVE_VIEWS_PROPERTIESstatic charUNDERSCOREstatic java.lang.StringVIEWS_PROPERTIES-
Fields inherited from class org.grails.plugins.DefaultGrailsPlugin
LOG, pluginBean
-
Fields inherited from class org.grails.plugins.AbstractGrailsPlugin
applicationContext, config, dependencies, dependencyNames, evictionList, grailsApplication, isBase, manager, PLUGIN_GROOVY, PLUGIN_GROOVY_PATH, PLUGIN_YML, PLUGIN_YML_PATH, pluginClass, propertySource, version
-
Fields inherited from interface grails.plugins.GrailsPlugin
ARTEFACTS, DEPENDS_ON, DO_WITH_APPLICATION_CONTEXT, DO_WITH_DYNAMIC_METHODS, DO_WITH_SPRING, DO_WITH_WEB_DESCRIPTOR, ENVIRONMENTS, EVENT_ON_CHANGE, EVENT_ON_CONFIG_CHANGE, EVENT_ON_SHUTDOWN, EVICT, OBSERVE, ON_CHANGE, ON_CONFIG_CHANGE, ON_SHUTDOWN, PLUGIN_EXCLUDES, PLUGIN_LOAD_AFTER_NAMES, PLUGIN_LOAD_BEFORE_NAMES, PLUGINS_PATH, PROFILES, PROVIDED_ARTEFACTS, SCOPES, STATUS, STATUS_DISABLED, STATUS_ENABLED, TYPE_FILTERS, WATCHED_RESOURCES
-
-
Constructor Summary
Constructors Constructor Description BinaryGrailsPlugin(java.lang.Class<?> pluginClass, BinaryGrailsPluginDescriptor descriptor, GrailsApplication application)Creates a binary plugin instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryGrailsPluginDescriptorgetBinaryDescriptor()java.io.FilegetProjectDirectory()java.util.PropertiesgetProperties(java.util.Locale locale)Obtains all properties for this binary plugin for the given locale.java.lang.Class<?>[]getProvidedArtefacts()Retrieves an array of provided Artefacts that are pre-compiled additions to the GrailsApplication object but are overridable by the end-userorg.springframework.core.io.ResourcegetResource(java.lang.String path)Resolves a static resource contained within this binary pluginprotected voidinitializeProvidedArtefacts(java.util.List<java.lang.String> classNames)protected voidinitializeViewMap(BinaryGrailsPluginDescriptor descriptor)java.lang.ClassresolveView(java.lang.String viewName)Resolves a view for the given view name.-
Methods inherited from class org.grails.plugins.DefaultGrailsPlugin
addExclude, beans, doArtefactConfiguration, doc, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, getDependencyNames, getDependentVersion, getDescriptor, getFullName, getInstance, getLoadAfterNames, getLoadBeforeNames, getLog, getName, getObservedPluginNames, getParentCtx, getPlugin, getPluginDir, getPluginExcludes, getProperties, getResolver, getTypeFilters, getWatchedResourcePatterns, getWatchedResources, hasInterestInChange, isEnabled, isEnabled, notifyOfEvent, notifyOfEvent, refresh, setApplicationContext, setDescriptor, setManager, setParentApplicationContext, setWatchedResources, supportsCurrentScopeAndEnvironment, supportsEnvironment, toString
-
Methods inherited from class org.grails.plugins.AbstractGrailsPlugin
checkForChanges, compareTo, equals, getConfigurationResource, getEvictionNames, getFileSystemName, getFileSystemShortName, getManager, getPluginClass, getPluginPath, getPluginPathCamelCase, getPropertySource, getVersion, hashCode, isBasePlugin, readPluginConfiguration, setApplication, setBasePlugin
-
-
-
-
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
-
UNDERSCORE
public static final char UNDERSCORE
- 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 classdescriptor- The META-INF/grails-plugin.xml descriptorapplication- The application
-
-
Method Detail
-
getProjectDirectory
public java.io.File getProjectDirectory()
-
initializeViewMap
protected void initializeViewMap(BinaryGrailsPluginDescriptor descriptor)
-
initializeProvidedArtefacts
protected void initializeProvidedArtefacts(java.util.List<java.lang.String> classNames)
-
getProvidedArtefacts
public java.lang.Class<?>[] getProvidedArtefacts()
Description copied from interface:GrailsPluginRetrieves an array of provided Artefacts that are pre-compiled additions to the GrailsApplication object but are overridable by the end-user- Specified by:
getProvidedArtefactsin interfaceGrailsPlugin- Overrides:
getProvidedArtefactsin classDefaultGrailsPlugin- Returns:
- A list of provided artefacts
-
getBinaryDescriptor
public BinaryGrailsPluginDescriptor getBinaryDescriptor()
- Returns:
- The META-INF/grails-plugin.xml descriptor
-
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
-
-