Class ClasspathAssetAliasManagerImpl
java.lang.Object
org.apache.tapestry5.internal.services.ClasspathAssetAliasManagerImpl
- All Implemented Interfaces:
ClasspathAssetAliasManager
-
Constructor Summary
ConstructorsConstructorDescriptionClasspathAssetAliasManagerImpl(Map<String, String> configuration) Configuration is a map of aliases (short names) to complete names. -
Method Summary
Modifier and TypeMethodDescriptionextractAssetAlias(Resource resource) Takes a classpath resource and determines the proper alias for it based on the mappings contributed to the service.Returns the mappings used by the service: the keys are the folder aliases (i.e, "corelib") and the values are the corresponding paths (i.e., "org/apache/tapestry5/corelib").
-
Constructor Details
-
ClasspathAssetAliasManagerImpl
Configuration is a map of aliases (short names) to complete names. Keys and values must not start or end with a slash, but may contain them.
-
-
Method Details
-
extractAssetAlias
Description copied from interface:ClasspathAssetAliasManagerTakes a classpath resource and determines the proper alias for it based on the mappings contributed to the service.- Specified by:
extractAssetAliasin interfaceClasspathAssetAliasManager- Parameters:
resource- classpath resource- Returns:
- URL ready to send to the client
-
getMappings
Description copied from interface:ClasspathAssetAliasManagerReturns the mappings used by the service: the keys are the folder aliases (i.e, "corelib") and the values are the corresponding paths (i.e., "org/apache/tapestry5/corelib"). This exists primarily so thatClasspathAssetRequestHandlers can be created automatically for each mapping.- Specified by:
getMappingsin interfaceClasspathAssetAliasManager
-