public class DtoFactory.UriFactory extends Object
| Constructor and Description |
|---|
DtoFactory.UriFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends AbstractResource> |
registerIdentifiableRestResource(Class<T> type,
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(Class<T> type,
String resourceTypeUriBase,
com.google.common.base.Function<T,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(Class<T> type,
com.google.common.base.Function<T,String> fnUri)
registers a function which generates a URI given a type; note that this method cannot be used for links
|
String |
uri(AbstractResource x) |
String |
uri(Class<? extends AbstractResource> targetType,
String id) |
String |
uriOfRestResource(Class<?> restResourceClass) |
public <T> void registerResourceUriFunction(Class<T> type, com.google.common.base.Function<T,String> fnUri)
public <T> void registerIdentityFunction(Class<T> type, String resourceTypeUriBase, com.google.common.base.Function<T,String> fnIdentity)
public <T extends AbstractResource> void registerIdentifiableRestResource(Class<T> type, Class<? extends AbstractCampRestResource> restResource)
public String uri(Class<? extends AbstractResource> targetType, String id)
public String uri(AbstractResource x)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.