org.apache.tapestry5.services.assets
Class AssetsModule

java.lang.Object
  extended by org.apache.tapestry5.services.assets.AssetsModule

@Marker(value=Core.class)
public class AssetsModule
extends Object

Since:
5.3

Constructor Summary
AssetsModule()
           
 
Method Summary
static void bind(ServiceBinder binder)
           
 void disableCompressionForImageTypes(MappedConfiguration<String,Boolean> configuration)
          Disables compression for the following content types: image/jpeg image/gif image/png application/x-shockwave-flash
 StreamableResourceSource enableCompressedCaching(StreamableResourceSource delegate, boolean gzipEnabled, ResourceChangeTracker tracker)
           
 StreamableResourceSource enableCompression(StreamableResourceSource delegate, boolean gzipEnabled, int compressionCutoff)
           
 StreamableResourceSource enableMinification(StreamableResourceSource delegate, ResourceMinimizer minimizer, boolean enabled)
           
 StreamableResourceSource enableUncompressedCaching(StreamableResourceSource delegate, ResourceChangeTracker tracker)
           
 void setupDefaultContentTypeMappings(MappedConfiguration<String,String> configuration)
          Adds content types: css text/css js text/javascript jpg, jpeg image/jpeg gif image/gif png image/png svg image/svg+xml swf application/x-shockwave-flash
static void setupSymbols(MappedConfiguration<String,String> configuration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetsModule

public AssetsModule()
Method Detail

bind

public static void bind(ServiceBinder binder)

setupSymbols

@Contribute(value=SymbolProvider.class)
@FactoryDefaults
public static void setupSymbols(MappedConfiguration<String,String> configuration)

enableCompression

@Decorate(id="GZipCompression",
          serviceInterface=StreamableResourceSource.class)
public StreamableResourceSource enableCompression(StreamableResourceSource delegate,
                                                                                                           @Symbol(value="tapestry.gzip-compression-enabled")
                                                                                                           boolean gzipEnabled,
                                                                                                           @Symbol(value="tapestry.min-gzip-size")
                                                                                                           int compressionCutoff)

enableCompressedCaching

@Decorate(id="CacheCompressed",
          serviceInterface=StreamableResourceSource.class)
@Order(value="before:GZIpCompression")
public StreamableResourceSource enableCompressedCaching(StreamableResourceSource delegate,
                                                                                                                            @Symbol(value="tapestry.gzip-compression-enabled")
                                                                                                                            boolean gzipEnabled,
                                                                                                                            ResourceChangeTracker tracker)

enableUncompressedCaching

@Decorate(id="Cache",
          serviceInterface=StreamableResourceSource.class)
@Order(value="after:GZipCompression")
public StreamableResourceSource enableUncompressedCaching(StreamableResourceSource delegate,
                                                                                                                              ResourceChangeTracker tracker)

enableMinification

@Decorate(id="Minification",
          serviceInterface=StreamableResourceSource.class)
@Order(value="after:Cache")
public StreamableResourceSource enableMinification(StreamableResourceSource delegate,
                                                                                                                       ResourceMinimizer minimizer,
                                                                                                                       @Symbol(value="tapestry.enable-minification")
                                                                                                                       boolean enabled)

setupDefaultContentTypeMappings

@Contribute(value=ContentTypeAnalyzer.class)
public void setupDefaultContentTypeMappings(MappedConfiguration<String,String> configuration)
Adds content types:
css
text/css
js
text/javascript
jpg, jpeg
image/jpeg
gif
image/gif
png
image/png
svg
image/svg+xml
swf
application/x-shockwave-flash


disableCompressionForImageTypes

@Contribute(value=CompressionAnalyzer.class)
public void disableCompressionForImageTypes(MappedConfiguration<String,Boolean> configuration)
Disables compression for the following content types:



Copyright © 2003-2012 The Apache Software Foundation.