public class AbstractBackendResource<R extends BaseResource,Q> extends BackendResource
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractBackendResource.EntityIdResolver |
protected class |
AbstractBackendResource.QueryIdResolver |
BaseBackendResource.BackendFailureException, BaseBackendResource.EntityNotFoundException, BaseBackendResource.WebFaultException| Modifier and Type | Field and Description |
|---|---|
protected static javax.ws.rs.core.Response.Status |
ACCEPTED_STATUS |
protected Class<Q> |
entityType |
protected static String |
ID_SEPARATOR |
protected MappingLocator |
mappingLocator |
protected Class<R> |
modelType |
protected static long |
MONITOR_DELAY |
protected String[] |
subCollections |
backend, httpHeaders, LOG, messageBundle, sessionHelper, uriInfo| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBackendResource(Class<R> modelType,
Class<Q> entityType) |
protected |
AbstractBackendResource(Class<R> modelType,
Class<Q> entityType,
String... subCollections) |
| Modifier and Type | Method and Description |
|---|---|
protected R |
addLinks(R model,
boolean doNotLinkSubCollections) |
protected R |
addLinks(R model,
Class<? extends BaseResource> suggestedParent,
boolean doNotLinkSubCollections) |
protected R |
addLinks(R model,
Class<? extends BaseResource> suggestedParent,
String... subCollectionMembersToExclude) |
protected R |
addLinks(R model,
String... subCollectionMembersToExclude) |
protected <B extends BaseResource> |
addOrUpdateLink(B model,
String relation,
String href) |
protected R |
addParents(R model)
Add any parent resource references needed for constructing links.
|
protected List<Q> |
asCollection(Object o) |
protected Guid |
asGuidOr404(String id)
Convert a string to a Guid, or return a 404 response.
|
protected String |
asString(List<Guid> list) |
protected CreationStatus |
awaitCompletion(VdcReturnValueBase result) |
protected void |
delay(long delay) |
protected Q |
entityNotFound() |
protected CreationStatus |
getAsynchronousStatus(VdcReturnValueBase result) |
protected <F,T> Mapper<F,T> |
getMapper(Class<F> from,
Class<T> to) |
MappingLocator |
getMappingLocator() |
protected VdcQueryParametersBase |
getQueryParams(Class<? extends VdcQueryParametersBase> queryParamsClass,
Guid id) |
protected boolean |
incomplete(CreationStatus status) |
protected <S extends AbstractBackendResource<?,?>> |
inject(S resource) |
protected R |
injectSearchLinks(R resource,
String[] rels) |
protected R |
linkSubCollections(R model,
Class<? extends BaseResource> suggestedParent,
String... subCollectionMembersToExclude) |
protected R |
linkSubResource(R model,
String subResource,
String oid) |
protected R |
map(Q entity) |
protected R |
map(Q entity,
R template) |
protected Q |
map(R model) |
protected Q |
map(R model,
Q template) |
protected R |
newModel(String id) |
protected R |
notFound() |
protected <T> T |
notFound(Class<T> clz) |
protected R |
populate(R model,
Q entity) |
protected <B extends BaseResource> |
removeIfExist(B model,
String relation) |
void |
setMappingLocator(MappingLocator mappingLocator) |
protected String |
urlEncode(String url) |
doAction, doGetEntity, doNonBlockingAction, expectNonBlocking, getBackendCollection, getConfigurationValue, getEntity, getEntity, getEntity, performAction, performAction, performNonBlockingActionasCollection, asGuid, asGuid, combine, fault, getBackend, getCurrent, getEffectiveLocale, getHttpHeaders, getMessageBundle, getSessionHelper, getUriInfo, handleError, handleError, instantiate, localize, localize, localize, sessionize, sessionize, setBackend, setHttpHeaders, setMessageBundle, setSessionHelper, setUriInfo, validateEnum, validateParameters, validateParametersprotected static final String ID_SEPARATOR
protected static final long MONITOR_DELAY
protected static final javax.ws.rs.core.Response.Status ACCEPTED_STATUS
protected MappingLocator mappingLocator
protected Class<R extends BaseResource> modelType
protected String[] subCollections
public void setMappingLocator(MappingLocator mappingLocator)
public MappingLocator getMappingLocator()
protected <S extends AbstractBackendResource<?,?>> S inject(S resource)
protected CreationStatus awaitCompletion(VdcReturnValueBase result)
protected CreationStatus getAsynchronousStatus(VdcReturnValueBase result)
protected boolean incomplete(CreationStatus status)
protected void delay(long delay)
protected R addParents(R model)
the - resource representationprotected R addLinks(R model, Class<? extends BaseResource> suggestedParent, String... subCollectionMembersToExclude)
protected R addLinks(R model, Class<? extends BaseResource> suggestedParent, boolean doNotLinkSubCollections)
protected R linkSubCollections(R model, Class<? extends BaseResource> suggestedParent, String... subCollectionMembersToExclude)
protected <B extends BaseResource> void removeIfExist(B model, String relation)
protected <B extends BaseResource> void addOrUpdateLink(B model, String relation, String href)
protected VdcQueryParametersBase getQueryParams(Class<? extends VdcQueryParametersBase> queryParamsClass, Guid id)
protected Guid asGuidOr404(String id)
id - the incoming UUIDjavax.ws.rs.WebApplicationException - a 404 response, if the UUID is invalidprotected R notFound()
protected Q entityNotFound()
protected <T> T notFound(Class<T> clz)
Copyright © 2012. All Rights Reserved.