public class BackendVmsResource extends AbstractBackendCollectionResource<VM,VM> implements VmsResource
AbstractBackendResource.EntityIdResolver, AbstractBackendResource.QueryIdResolver
BaseBackendResource.BackendFailureException, BaseBackendResource.EntityNotFoundException, BaseBackendResource.WebFaultException
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 |
---|
BackendVmsResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
add(VM vm)
Creates a new VM and adds it to the database.
|
protected VM |
addInlineDetails(Set<DetailHelper.Detail> details,
VM vm) |
protected javax.ws.rs.core.Response |
addVm(VmStatic staticVm,
Guid storageDomainId) |
protected javax.ws.rs.core.Response |
addVmFromScratch(VmStatic staticVm,
Guid storageDomainId,
Disks disks) |
protected Guid |
getClusterId(VM vm) |
protected Guid |
getTemplateId(VM vm) |
protected Guid |
getTemplateStorageDomain(Guid templateId) |
VmResource |
getVmSubResource(String id)
Sub-resource locator method, returns individual VmResource on which the
remainder of the URI is dispatched.
|
VMs |
list() |
VmTemplate |
lookupTemplate(Guid id) |
protected VMs |
mapCollection(List<VM> entities) |
protected boolean |
namedCluster(VM vm) |
javax.ws.rs.core.Response |
performRemove(String id) |
protected VM |
populate(VM model,
VM entity) |
javax.ws.rs.core.Response |
remove(String id,
Action action) |
protected boolean |
templated(VM vm) |
asString, expectBlocking, getBackendCollection, getBackendCollection, getBackendCollection, getEntity, handleAsynchrony, performCreation, remove, resolveCreated
addLinks, addLinks, addLinks, addLinks, addOrUpdateLink, addParents, asCollection, asGuidOr404, asString, awaitCompletion, delay, entityNotFound, getAsynchronousStatus, getMapper, getMappingLocator, getQueryParams, incomplete, inject, injectSearchLinks, linkSubCollections, linkSubResource, map, map, map, map, newModel, notFound, notFound, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
remove
public VMs list()
list
in interface VmsResource
public VmResource getVmSubResource(String id)
VmsResource
getVmSubResource
in interface VmsResource
id
- the VM IDpublic javax.ws.rs.core.Response add(VM vm)
VmsResource
The VM#name, VM#templateId and VM#clusterId properties are required.
add
in interface VmsResource
vm
- the VM definition from which to create the new VMprotected javax.ws.rs.core.Response addVmFromScratch(VmStatic staticVm, Guid storageDomainId, Disks disks)
protected VM addInlineDetails(Set<DetailHelper.Detail> details, VM vm)
public javax.ws.rs.core.Response performRemove(String id)
performRemove
in class AbstractBackendCollectionResource<VM,VM>
public javax.ws.rs.core.Response remove(String id, Action action)
remove
in interface VmsResource
protected boolean templated(VM vm)
public VmTemplate lookupTemplate(Guid id)
protected boolean namedCluster(VM vm)
Copyright © 2012. All Rights Reserved.