public class DtoFactory.UriFactory
extends java.lang.Object
Constructor and Description |
---|
DtoFactory.UriFactory() |
Modifier and Type | Method and Description |
---|---|
<T extends AbstractResource> |
registerIdentifiableRestResource(java.lang.Class<T> type,
java.lang.Class<? extends AbstractCampRestResource> restResource)
registers a CAMP Resource type against a RestResource, generating the URI
by concatenating the @Path annotation on the RestResource with the ID of the CAMP resource
|
<T> void |
registerIdentityFunction(java.lang.Class<T> type,
java.lang.String resourceTypeUriBase,
com.google.common.base.Function<T,java.lang.String> fnIdentity)
registers a type to generate a URI which concatenates the given base with the
result of the given function to generate an ID against an object of the given type
|
<T> void |
registerResourceUriFunction(java.lang.Class<T> type,
com.google.common.base.Function<T,java.lang.String> fnUri)
registers a function which generates a URI given a type; note that this method cannot be used for links
|
java.lang.String |
uri(AbstractResource x) |
java.lang.String |
uri(java.lang.Class<? extends AbstractResource> targetType,
java.lang.String id) |
java.lang.String |
uriOfRestResource(java.lang.Class<?> restResourceClass) |
public <T> void registerResourceUriFunction(java.lang.Class<T> type, com.google.common.base.Function<T,java.lang.String> fnUri)
public <T> void registerIdentityFunction(java.lang.Class<T> type, java.lang.String resourceTypeUriBase, com.google.common.base.Function<T,java.lang.String> fnIdentity)
public <T extends AbstractResource> void registerIdentifiableRestResource(java.lang.Class<T> type, java.lang.Class<? extends AbstractCampRestResource> restResource)
public java.lang.String uri(java.lang.Class<? extends AbstractResource> targetType, java.lang.String id)
public java.lang.String uri(AbstractResource x)
public java.lang.String uriOfRestResource(java.lang.Class<?> restResourceClass)