org.chenillekit.tapestry.core.services.impl
Class URIAssetAliasManagerImpl

java.lang.Object
  extended by org.chenillekit.tapestry.core.services.impl.URIAssetAliasManagerImpl
All Implemented Interfaces:
URIAssetAliasManager

public class URIAssetAliasManagerImpl
extends Object
implements URIAssetAliasManager

Version:
$Id: URIAssetAliasManagerImpl.java 700 2010-10-15 20:49:38Z homburgs $

Constructor Summary
URIAssetAliasManagerImpl(Request request, Map<String,String> configuration)
          Configuration is a map of aliases (short names) to complete names.
 
Method Summary
 String toClientURL(String resourcePath)
          Takes a resource path to a URI resource and adds the uri path prefix to the path.
 String toResourcePath(String clientURL)
          Reverses URIAssetAliasManager.toClientURL(String), stripping off the uri prefix, and re-expanding any aliased folders back to complete folders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIAssetAliasManagerImpl

public URIAssetAliasManagerImpl(Request request,
                                Map<String,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 String toClientURL(String resourcePath)
Description copied from interface: URIAssetAliasManager
Takes a resource path to a URI resource and adds the uri 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 URIAssetAliasManager
Parameters:
resourcePath - resource path (with no leading slash)
Returns:
URL ready to send to the client

toResourcePath

public String toResourcePath(String clientURL)
Description copied from interface: URIAssetAliasManager
Reverses URIAssetAliasManager.toClientURL(String), stripping off the uri prefix, and re-expanding any aliased folders back to complete folders.

Specified by:
toResourcePath in interface URIAssetAliasManager


Copyright © 2008-2011 ChenilleKit. All Rights Reserved.