Class FreemarkerURLHelper
java.lang.Object
com.peterphi.std.guice.freemarker.FreemarkerURLHelper
- Direct Known Subclasses:
DebugPerRequestFreemarkerURLHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.UriBuilderReturn a UriBuilder for an absolute URIprotected Stringjavax.ws.rs.core.UriBuildercontext()Returns a URL for a resource from the context pathReturn only the path for a given URLrelativeRest(String path) Returns a relative URL for a resource from the REST path, assuming it is relative to another path on the same server.relativeRestConcat(String path) Similar to therelativeRestmethod, however this performs concatenation using String operations rather than UriBuilder, allowing the representation of URLs which are technically invalid (e.g.javax.ws.rs.core.UriBuilderrest()Returns a URL for a resource from the REST path (which may be different from the context path)restConcat(String path) Similar to therestmethod, however this performs concatenation using String operations rather than UriBuilder, allowing the representation of URLs which are technically invalid (e.g.
-
Constructor Details
-
FreemarkerURLHelper
-
-
Method Details
-
context
public javax.ws.rs.core.UriBuilder context() -
rest
public javax.ws.rs.core.UriBuilder rest() -
context
Returns a URL for a resource from the context path- Parameters:
path-- Returns:
-
rest
Returns a URL for a resource from the REST path (which may be different from the context path)- Parameters:
path-- Returns:
-
relativeRest
Returns a relative URL for a resource from the REST path, assuming it is relative to another path on the same server.- Parameters:
path-- Returns:
-
restConcat
Similar to therestmethod, however this performs concatenation using String operations rather than UriBuilder, allowing the representation of URLs which are technically invalid (e.g. using templates)- Parameters:
path-- Returns:
-
relativeRestConcat
Similar to therelativeRestmethod, however this performs concatenation using String operations rather than UriBuilder, allowing the representation of URLs which are technically invalid (e.g. using templates)- Parameters:
path-- Returns:
-
absolute
Return a UriBuilder for an absolute URI- Parameters:
path-- Returns:
-
relative
Return only the path for a given URL- Parameters:
url-- Returns:
-
concat
-