Package org.apache.tapestry5.internal.services

## Class ClasspathAssetAliasManagerImpl

- java.lang.Object
- - org.apache.tapestry5.internal.services.ClasspathAssetAliasManagerImpl

- All Implemented Interfaces:
    `ClasspathAssetAliasManager`

      public class ClasspathAssetAliasManagerImpl
      extends java.lang.Object
      implements ClasspathAssetAliasManager

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClasspathAssetAliasManagerImpl​(java.util.Map<java.lang.String,​java.lang.String> configuration)` | Configuration is a map of aliases (short names) to complete names.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AssetAlias` | `extractAssetAlias​(Resource resource)` | Takes a classpath resource and determines the proper alias for it based on the mappings contributed to the service.
    `java.util.Map<java.lang.String,​java.lang.String>` | `getMappings()` | 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").

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClasspathAssetAliasManagerImpl

          public ClasspathAssetAliasManagerImpl​(java.util.Map<java.lang.String,​java.lang.String> configuration)

      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 Detail

    - #### extractAssetAlias

          public AssetAlias extractAssetAlias​(Resource resource)

      Description copied from interface: `ClasspathAssetAliasManager`
      Takes a classpath resource and determines the proper alias for it based on the mappings contributed to the service.
      Specified by:
        `extractAssetAlias` in interface `ClasspathAssetAliasManager`
      Parameters:
        `resource` - classpath resource
      Returns:
        URL ready to send to the client

    - #### getMappings

          public java.util.Map<java.lang.String,​java.lang.String> getMappings()

      Description copied from interface: `ClasspathAssetAliasManager`
      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"). This exists primarily so that `ClasspathAssetRequestHandler`s can be created automatically for each mapping.
      Specified by:
        `getMappings` in interface `ClasspathAssetAliasManager`