org.apache.tapestry5.internal.services
Interface RequestPathOptimizer
- All Known Implementing Classes:
- RequestPathOptimizerImpl
public interface RequestPathOptimizer
Used to optimize a path for inclusion in the rendered output of the page. When using lots of libraries, nested
folders, and page acivation contexts, you can often create a shorter URL as a relative path from the current request
URL. Of course, you need to make sure that's turned off inside an Ajax request since the base URL of the client it
totally unknown in that situation.
- See Also:
SymbolConstants.FORCE_ABSOLUTE_URIS
|
Method Summary |
String |
optimizePath(String path)
Optimizes the provided path, returning a new path that is shorter but (combined with the current requests' base
URL) will result in the same request URI. |
optimizePath
String optimizePath(String path)
- Optimizes the provided path, returning a new path that is shorter but (combined with the current requests' base
URL) will result in the same request URI. In many cases, this will return the provided path unchanged. During
XHR requests, this will always return the provided
path (no optimization takes place, since the base URI of the client is unknown).
- Parameters:
path - to be optimized
- Returns:
- the same path, or a new path that is equivalent, relative to the current request's URL
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.