001    /*
002     * Apache License
003     * Version 2.0, January 2004
004     * http://www.apache.org/licenses/
005     *
006     * Copyright 2008 by chenillekit.org
007     *
008     * Licensed under the Apache License, Version 2.0 (the "License");
009     * you may not use this file except in compliance with the License.
010     * You may obtain a copy of the License at
011     *
012     * http://www.apache.org/licenses/LICENSE-2.0
013     */
014    
015    package org.chenillekit.tapestry.core.services;
016    
017    /**
018     * @version $Id: URIAssetAliasManager.java 594 2009-12-05 15:17:26Z mlusetti $
019     */
020    public interface URIAssetAliasManager
021    {
022        /**
023         * Takes a resource path to a URI resource and adds the uri path prefix to the path. May also convert part
024         * of the path to an alias (based on the manager's configuration).
025         *
026         * @param resourcePath resource path (with no leading slash)
027         * @return URL ready to send to the client
028         */
029        String toClientURL(String resourcePath);
030    
031        /**
032         * Reverses {@link #toClientURL(String)}, stripping off the uri prefix, and re-expanding any aliased folders back
033         * to complete folders.
034         */
035        String toResourcePath(String clientURL);
036    }