public abstract class AbstractBackendReadOnlyDevicesResource<D extends BaseDevice,C extends BaseDevices,Q extends IVdcQueryable> extends AbstractBackendCollectionResource<D,Q> implements ReadOnlyDevicesResource<D,C>
AbstractBackendResource.EntityIdResolver, AbstractBackendResource.QueryIdResolver
BaseBackendResource.BackendFailureException, BaseBackendResource.EntityNotFoundException, BaseBackendResource.WebFaultException
Modifier and Type | Field and Description |
---|---|
protected Class<C> |
collectionType |
protected Guid |
parentId |
protected VdcQueryParametersBase |
queryParams |
protected VdcQueryType |
queryType |
CASE_SENSITIVE_CONSTRAINT_PARAMETER, FROM_CONSTRAINT_PARAMETER, LOG
ACCEPTED_STATUS, entityType, ID_SEPARATOR, mappingLocator, modelType, MONITOR_DELAY, subCollections
backend, httpHeaders, messageBundle, sessionHelper, uriInfo
Constructor and Description |
---|
AbstractBackendReadOnlyDevicesResource(Class<D> modelType,
Class<C> collectionType,
Class<Q> entityType,
Guid parentId,
VdcQueryType queryType,
VdcQueryParametersBase queryParams,
String... subCollections) |
Modifier and Type | Method and Description |
---|---|
D |
addParents(D device)
Add any parent resource references needed for constructing links.
|
ReadOnlyDeviceResource<D> |
getDeviceSubResource(String id)
Sub-resource locator method, returns individual DeviceResource on which the
remainder of the URI is dispatched.
|
protected List<D> |
getList(C collection) |
C |
list() |
Q |
lookupEntity(Guid id) |
protected C |
mapCollection(List<Q> entities) |
protected abstract boolean |
matchEntity(Q entity,
Guid id) |
protected javax.ws.rs.core.Response |
performRemove(String id) |
protected boolean |
validate(D device) |
asString, expectBlocking, getBackendCollection, getBackendCollection, getBackendCollection, getEntity, handleAsynchrony, performCreation, remove, resolveCreated
addLinks, addLinks, addLinks, addLinks, addOrUpdateLink, asCollection, asGuidOr404, asString, awaitCompletion, delay, entityNotFound, getAsynchronousStatus, getMapper, getMappingLocator, getQueryParams, incomplete, inject, injectSearchLinks, linkSubCollections, linkSubResource, map, map, map, map, newModel, notFound, notFound, populate, removeIfExist, setMappingLocator, urlEncode
doAction, doGetEntity, doNonBlockingAction, expectNonBlocking, getBackendCollection, getConfigurationValue, getEntity, getEntity, getEntity, performAction, performAction, performNonBlockingAction
asCollection, 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, validateParameters
protected Class<C extends BaseDevices> collectionType
protected Guid parentId
protected VdcQueryType queryType
protected VdcQueryParametersBase queryParams
public AbstractBackendReadOnlyDevicesResource(Class<D> modelType, Class<C> collectionType, Class<Q> entityType, Guid parentId, VdcQueryType queryType, VdcQueryParametersBase queryParams, String... subCollections)
public C list()
list
in interface ReadOnlyDevicesResource<D extends BaseDevice,C extends BaseDevices>
public ReadOnlyDeviceResource<D> getDeviceSubResource(String id)
ReadOnlyDevicesResource
getDeviceSubResource
in interface ReadOnlyDevicesResource<D extends BaseDevice,C extends BaseDevices>
id
- the Device IDpublic D addParents(D device)
AbstractBackendResource
addParents
in class AbstractBackendResource<D extends BaseDevice,Q extends IVdcQueryable>
protected boolean validate(D device)
protected javax.ws.rs.core.Response performRemove(String id)
performRemove
in class AbstractBackendCollectionResource<D extends BaseDevice,Q extends IVdcQueryable>
Copyright © 2012. All Rights Reserved.