Search in sources :

Example 11 with AssetFactory

use of org.apache.tapestry5.services.AssetFactory in project tapestry-5 by apache.

the class AssetsModule method configureStandardAssetFactories.

@Contribute(AssetSource.class)
public void configureStandardAssetFactories(MappedConfiguration<String, AssetFactory> configuration, @ContextProvider AssetFactory contextAssetFactory, @ClasspathProvider AssetFactory classpathAssetFactory) {
    configuration.add(AssetConstants.CONTEXT, contextAssetFactory);
    configuration.add(AssetConstants.CLASSPATH, classpathAssetFactory);
    configuration.add(AssetConstants.HTTP, new ExternalUrlAssetFactory(AssetConstants.HTTP));
    configuration.add(AssetConstants.HTTPS, new ExternalUrlAssetFactory(AssetConstants.HTTPS));
    configuration.add(AssetConstants.FTP, new ExternalUrlAssetFactory(AssetConstants.FTP));
    configuration.add(AssetConstants.PROTOCOL_RELATIVE, new ExternalUrlAssetFactory(AssetConstants.PROTOCOL_RELATIVE));
}
Also used : ExternalUrlAssetFactory(org.apache.tapestry5.internal.services.ExternalUrlAssetFactory) Contribute(org.apache.tapestry5.ioc.annotations.Contribute)

Aggregations

AssetFactory (org.apache.tapestry5.services.AssetFactory)8 AssetSource (org.apache.tapestry5.services.AssetSource)7 Test (org.testng.annotations.Test)7 Asset (org.apache.tapestry5.Asset)6 ThreadLocale (org.apache.tapestry5.ioc.services.ThreadLocale)6 Resource (org.apache.tapestry5.commons.Resource)5 ClasspathResource (org.apache.tapestry5.ioc.internal.util.ClasspathResource)5 Contribute (org.apache.tapestry5.ioc.annotations.Contribute)2 Locale (java.util.Locale)1 ExternalUrlAssetFactory (org.apache.tapestry5.internal.services.ExternalUrlAssetFactory)1 ClasspathAssetRequestHandler (org.apache.tapestry5.internal.services.assets.ClasspathAssetRequestHandler)1 ContextAssetRequestHandler (org.apache.tapestry5.internal.services.assets.ContextAssetRequestHandler)1 DefaultTemplateLocator (org.apache.tapestry5.internal.services.templates.DefaultTemplateLocator)1 PageTemplateLocator (org.apache.tapestry5.internal.services.templates.PageTemplateLocator)1 SymbolSource (org.apache.tapestry5.ioc.services.SymbolSource)1 AssetRequestDispatcher (org.apache.tapestry5.services.AssetRequestDispatcher)1