Package org.apache.tapestry5.services
Interface PathConstructor
-
- All Known Implementing Classes:
PathConstructorImpl
public interface PathConstructor
Central location for logic related to building client-side paths, taking into account the context path (if any), and theSymbolConstants.APPLICATION_FOLDER
(if any).- Since:
- 5.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
constructClientPath(java.lang.String... terms)
Constructs a client path, the path portion of an absolute URL.java.lang.String
constructDispatchPath(java.lang.String... terms)
Constructs the dispatch path, which is like the client path, but omits the context path; this aligns the result with the value returned fromRequest.getPath()
, and is used in code, typicallyDispatcher
implementations, that are attempting to route based on the incoming request path.
-
-
-
Method Detail
-
constructClientPath
java.lang.String constructClientPath(java.lang.String... terms)
Constructs a client path, the path portion of an absolute URL. The result consists of the the context path (if any), the application folder (if any), then the series of terms.- Parameters:
terms
- additional terms (folder names, or a file name) following the context path and application folder.- Returns:
- the full path, starting with a leading slash, and including the context path, application folder, and the terms, all seperated with slashes
-
constructDispatchPath
java.lang.String constructDispatchPath(java.lang.String... terms)
Constructs the dispatch path, which is like the client path, but omits the context path; this aligns the result with the value returned fromRequest.getPath()
, and is used in code, typicallyDispatcher
implementations, that are attempting to route based on the incoming request path.- Parameters:
terms
- additional terms (folder names, or a file name) following the context path and application folder.- Returns:
- path string starting with a leading slash, and including the application folder (if any) and the individual terms, seperated by slashes
-
-