Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`ClasspathAssetAliasManagerImpl(AssetPathConstructor assetPathConstructor, java.util.Map<java.lang.String,java.lang.String> configuration)` Configuration is a map of aliases (short names) to complete names.

Method Summary
`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").
`java.lang.String` | `toClientURL(java.lang.String resourcePath)` Takes a resource path to a classpath resource and adds the asset path prefix to the path.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClasspathAssetAliasManagerImpl

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

  Configuration is a map of aliases (short names) to complete names. Keys and values should end with a slash, but one will be provided as necessary, so don't both.

Method Detail

### toClientURL

    public java.lang.String toClientURL(java.lang.String resourcePath)

  Description copied from interface: `ClasspathAssetAliasManager`
  Takes a resource path to a classpath resource and adds the asset path prefix to the path. May also convert part of the path to an alias (based on the manager's configuration).

  Specified by:
    `toClientURL` in interface `ClasspathAssetAliasManager`
  Parameters:
    `resourcePath` - resource path on the classpath (with no leading slash)
  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.