org.grails.plugin.resource
[Groovy] Class BundleResourceMapper
java.lang.Object
org.grails.plugin.resource.BundleResourceMapper
class BundleResourceMapper
This mapper creates synthetic AggregatedResourceMeta instances for any bundle
names found in the resource declarations, and gathers up info about those resources
so that when the bundle itself is requested, the aggregated file is created and returned.
This sets any ResourceMeta to which this mapper applies, to be "delegating" to the new aggregated resource
so when those resources are rendered/requested, the bundle URI is written out.
- Authors:
- Marc Palmer (marc@grailsrocks.com)
Method Summary |
java.lang.Object
|
map(java.lang.Object resource, java.lang.Object config)
Find resources that belong in bundles, and create the bundles, and make the resource delegate to the bundle.
|
Methods inherited from class java.lang.Object
|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
MIMETYPE_TO_RESOURCE_META_CLASS
static java.lang.Object MIMETYPE_TO_RESOURCE_META_CLASS
-
grailsResourceProcessor
java.lang.Object grailsResourceProcessor
-
phase
java.lang.Object phase
-
BundleResourceMapper
BundleResourceMapper()
-
map
java.lang.Object map(java.lang.Object resource, java.lang.Object config)
- Find resources that belong in bundles, and create the bundles, and make the resource delegate to the bundle.
Creates a new aggregated resource for the bundle and shoves all the resourceMetas into it.
We rely on the smart linking stuff to avoid writing out the same bundle multiple times, so you still have
dependencies to the individual resources but these delegate to the aggregated resource, and hence all such
resources will return the same link url, and not be included more than once.
Groovy Documentation