public class VcdClientImpl extends AbstractCxfRestClient implements VcdClient
| Modifier and Type | Class and Description |
|---|---|
static class |
VcdClientImpl.SessionTokenImpl
Implementation of
SessionToken to represent a current session with vCD. |
VcdClient.ClientRequestIdProvider, VcdClient.Query<QueryResultClass>, VcdClient.QueryListPage<T>, VcdClient.ReferenceTypeChangedCallBack, VcdClient.SessionTokenJaxRsClient.ErrorHandlerendpointEMPTY_CONTENTS| Constructor and Description |
|---|
VcdClientImpl(URI endpoint,
List<com.vmware.vcloud.api.rest.version.ApiVersion> candidateVersions,
CxfClientSecurityContext cxfClientSecurityContext)
Creates an instance of VcdClientImpl with given endpoint, cxfClientSecurityContext and
determines an
ApiVersion supported by both given vCD endpoint, and given list
of preferred API versions in candidateVersions |
VcdClientImpl(URI endpoint,
String apiVersion,
CxfClientSecurityContext cxfClientSecurityContext)
Creates an instance of VcdClientImpl with given endpoint, API version and cxfClientSecurityContext.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureHttpRequestHeaders(org.apache.cxf.jaxrs.client.Client client)
A method that must be implemented by derived classes to set any
HTTP request headers that the REST API implemented in such derived classes
require for proper operation.
|
protected static List<org.apache.cxf.jaxrs.provider.JAXBElementProvider<?>> |
createJAXBElementProviderFromObjectFactories()
Creates a
JAXBElementProvider that will return JAXBContexts that handle all
the JAXB-generated types using object factories supplied to this method. |
org.apache.cxf.jaxrs.client.WebClient |
createWebClient(URI uri,
String type)
Returns a CXF
WebClient corresponding to the specified URI. |
<ResponseClass> |
deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType ref,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
Convenience wrapper over {@link JaxRsClient#deleteResource(java.net.URI, Class).
|
<ResponseClass> |
deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType ref,
Class<ResponseClass> responseClass)
Convenience wrapper over {@link JaxRsClient#deleteResource(java.net.URI, Class).
|
<ResponseClass> |
deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
Deletes the resource described by the specified resource type.
|
<ResponseClass> |
deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType ref,
Class<ResponseClass> responseClass)
Convenience wrapper over {@link JaxRsClient#deleteResource(java.net.URI, Class).
|
VcdClient |
duplicate(boolean newSession)
Creates a clone of current
VcdClient
The new client will communicate with the same vCD as this client and is initialized with same
credentials and CxfClientSecurityContext. |
protected String[] |
getAcceptHeaders()
Accept headers that must be included with the request.
|
com.vmware.vcloud.api.rest.schema_v1_5.VCloudType |
getAdmin()
Returns the "admin" root resource type.
|
com.vmware.vcloud.api.rest.schema_v1_5.ApiExtensibilityType |
getApiExtensibility()
Returns the Api Extensibility object
|
String |
getClientApiVersion()
Gets the API version used by the client for vCloud API requests
|
protected VcdClient.ClientRequestIdProvider |
getClientRequestIdProvider() |
protected List<?> |
getCxfProviders() |
<T extends com.vmware.vcloud.api.rest.schema_v1_5.EntityType> |
getEntity(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType referenceType,
Class<T> resourceClass,
VcdClient.ReferenceTypeChangedCallBack referenceTypeChangedCallBack)
Get an entity using a
ReferenceType by first trying with its href and, when it fails,
trying to recover using the vcd entity resolver service. |
<ResponseClass extends com.vmware.vcloud.api.rest.schema_v1_5.EntityType> |
getEntity(String entityId,
String mediaType,
Class<ResponseClass> responseClass)
Resolve a vCloud entity using its identifier and then fetch the corresponding vCloud entity instance.
|
EventViewer |
getEventViewer() |
com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExtensionType |
getExtension()
Returns the "extension" root resource type.
|
String |
getJwtToken()
Get the current JWT for this client.
|
com.vmware.vcloud.api.rest.schema_v1_5.AdminOrgType |
getLoggedInAdminOrg()
Returns info about the admin view of the org, the session is logged in as (if permitted).
|
com.vmware.vcloud.api.rest.schema_v1_5.OrgType |
getLoggedInOrg()
Returns info about the org the session is logged in as.
|
NsxProxyApiClient |
getNsxProxyApiClient()
Returns an NsxProxyApiClient (which continues to use the existing session).
|
OpenApiClient |
getOpenApiClient()
Returns an OpenApiClient (which continues to use the existing session).
|
protected URI |
getOpenApiEndpoint()
Gets the openApi endpoint.
|
List<com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType> |
getOrganizations()
Gets the organizations defined/accessible in the vCloud server.
|
String |
getOrgContextHeader()
Get the value to be sent in the X-VMWARE-VCLOUD-ORG-ID header
|
com.vmware.vcloud.api.rest.schema.ovf.ObjectFactory |
getOvfObjectFactory()
Returns an object factory for OVF schema classes.
|
com.vmware.vcloud.api.rest.schema.ovf.vmware.ObjectFactory |
getOvfVmwareObjectFactory()
Returns an object factory VMware-specific OVF schema classes.
|
<QueryResultClass> |
getPackagedQuery(String queryPath,
Class<QueryResultClass> queryResultClass)
Returns an instance of the
VcdClient.Query object for a packaged query and query
result type. |
<QueryResultClass> |
getQuery(String queryTypeName,
Class<QueryResultClass> queryResultClass)
Returns an instance of the
VcdClient.Query object for the given query type name and query
result type. |
com.vmware.vcloud.api.rest.schema_v1_5.QueryListType |
getQueryList()
Returns the list of supported queries.
|
<ResourceClass> |
getResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
Class<ResourceClass> resourceClass)
Convenience wrapper over
JaxRsClient.getResource(java.net.URI, Class). |
<ResourceClass extends com.vmware.vcloud.api.rest.schema_v1_5.ResourceType> |
getResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resourceType,
Class<ResourceClass> resourceClass)
Gets the contents of the resource referenced by its href
|
<ResourceClass> |
getResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
Class<ResourceClass> resourceClass)
Gets the contents of the resource referenced by the link with the specified rel
and mediaType in the specified resource.
|
javax.ws.rs.core.Response |
getServerStatus()
Retrieves the current server status from the
api/server_status endpoint, adjusting
the Accept headers as needed. |
com.vmware.vcloud.api.rest.schema_v1_5.SessionType |
getSession()
Returns the
SessionType for the current session |
VcdClient.SessionToken |
getSessionToken()
Get the current opaque session token for this client.
|
com.vmware.vcloud.api.rest.schema_v1_5.MultisiteSessionUserInfoType |
getSessionUserInfo()
Returns the
MultisiteSessionUserInfoType for the current session's user |
VcdTaskMonitor |
getTaskMonitor()
Returns task monitor, which can be used to monitor specific task returned by POST or PUT
requests.
|
com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectFactory |
getVCloudExtensionObjectFactory()
Returns an object factory for vCD Extension API schema classes.
|
com.vmware.vcloud.api.rest.schema_v1_5.ObjectFactory |
getVCloudObjectFactory()
Returns an object factory for vCD API schema classes.
|
com.vmware.vcloud.api.rest.schema.versioning.SupportedVersionsType |
getVersions()
Gets information about the vCloud API versions supported by the server.
|
void |
login(ClientCredentials credentials)
Logs in to the remote vCloud API end point using the supplied credentials.
|
void |
loginWithJwt(String jwt,
String orgSecurityContext)
Reuses an existing session on the remote vCloud API end point using the supplied JWT taken
from another
VcdClient. |
void |
loginWithToken(VcdClient.SessionToken sessionToken)
Reuses an existing session on the remote vCloud API end point using the supplied session
token taken from another
VcdClient. |
void |
logout()
Logs out of the remote vCloud API end point
|
protected VcdErrorException |
makeException(javax.ws.rs.WebApplicationException webApplicationException) |
<ContentsClass,ResponseClass> |
postResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
Convenience wrapper over
JaxRsClient.postResource(java.net.URI, String, JAXBElement, Class) |
<ContentsClass,ResponseClass> |
postResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
Posts the contents to the resource referenced by the link with the specified rel and
mediaType in the specified resource
|
<ContentsClass,ResponseClass> |
putResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
Convenience wrapper over {@link JaxRsClient#putResource(java.net.URI, String, JAXBElement, Class)
|
<ContentsClass,ResponseClass> |
putResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
Puts the contents to the resource referenced by the link with the specified rel and
mediaType in the specified resource
|
<ContentsClass extends com.vmware.vcloud.api.rest.schema_v1_5.ResourceType,ResponseClass> |
putResource(String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
Like
VcdClient.putResource(ReferenceType, String, JAXBElement, Class) except constrains
the type of the contents parameter to be a type that has an href field and assumes that field
has been populated (which, for example, it will naturally if was returned by a getResource call and then
modified for use in this call). |
void |
relogin()
Repeats login if client credentials are present.
|
javax.ws.rs.core.Response |
removeResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource)
Deletes the resource described by the specified resource type.
|
<ResponseClass> |
removeResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
Deletes the resource described by the specified resource type.
|
com.vmware.vcloud.api.rest.schema_v1_5.EntityType |
resolveEntityById(String id)
Returns information about the resource with the specified ID.
|
void |
setAuthenticationHeader(org.apache.cxf.jaxrs.client.Client client)
Sets the vCloud API authentication header in the specified JAX-RS
Client object
to be the one for this VcdClient. |
protected void |
setAuthenticationHeaders(org.apache.cxf.jaxrs.client.Client client)
Configure authentication headers on the supplied clients
|
void |
setClientRequestIdProvider(VcdClient.ClientRequestIdProvider clientRequestIdGenerator) |
void |
setCredentials(ClientCredentials credentials)
Sets the credentials used for authentication.
|
void |
setMultisiteRequests(boolean federateRequests)
Controls whether requests made with this client request federated behavior or not.
|
void |
setOrgContextHeader(String orgContext)
Sets the X-VMWARE-VCLOUD-ORG-ID header to the specified value
|
configureClient, configureSSLTrustManager, createProxy, createWebClient, deleteResource, deleteResource, deleteResourceVoid, getEndpoint, getResource, getResource, optionsResource, postResource, postResource, postResourceVoid, putFile, putResource, putResource, putResourceVoid, setErrorHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateProxy, createWebClient, deleteResource, deleteResource, deleteResourceVoid, getEndpoint, getResource, getResource, optionsResource, postResource, postResource, postResourceVoid, putFile, putResource, putResource, putResourceVoid, setErrorHandlerpublic VcdClientImpl(URI endpoint, String apiVersion, CxfClientSecurityContext cxfClientSecurityContext)
public VcdClientImpl(URI endpoint, List<com.vmware.vcloud.api.rest.version.ApiVersion> candidateVersions, CxfClientSecurityContext cxfClientSecurityContext)
ApiVersion supported by both given vCD endpoint, and given list
of preferred API versions in candidateVersionsendpoint - URI of vCDcandidateVersions - a list of ApiVersions in order of most to least preferred by clientcxfClientSecurityContext - security context to use when communicating with given HTTPS vCD endpointprotected static List<org.apache.cxf.jaxrs.provider.JAXBElementProvider<?>> createJAXBElementProviderFromObjectFactories()
JAXBElementProvider that will return JAXBContexts that handle all
the JAXB-generated types using object factories supplied to this method.protected List<?> getCxfProviders()
getCxfProviders in class AbstractCxfRestClientWebClients we create.protected URI getOpenApiEndpoint()
public List<com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType> getOrganizations()
VcdClientVCloudClient#login
must be called prior to calling this method.getOrganizations in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.SessionType getSession()
VcdClientSessionType for the current sessiongetSession in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.MultisiteSessionUserInfoType getSessionUserInfo()
VcdClientMultisiteSessionUserInfoType for the current session's usergetSessionUserInfo in interface VcdClientpublic com.vmware.vcloud.api.rest.schema.versioning.SupportedVersionsType getVersions()
VcdClientgetVersions in interface VcdClientpublic String getClientApiVersion()
VcdClientgetClientApiVersion in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.VCloudType getAdmin()
VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExtensionType getExtension()
VcdClientgetExtension in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.QueryListType getQueryList()
VcdClientgetQueryList in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.ApiExtensibilityType getApiExtensibility()
VcdClientgetApiExtensibility in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.OrgType getLoggedInOrg()
VcdClientgetLoggedInOrg in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.EntityType resolveEntityById(String id)
VcdClientThe class of the returned value corresponds to the media-type 'application/vnd.vmware.vcloud.entity',
this means it's a strict instance of {link EntityType}, and not a specialization of EntityType.
Note that to fetch an entity and cast it to its specialized JAXB binding the methods
#getEntity(ReferenceType, Class) and VcdClient.getEntity(ReferenceType, Class, ReferenceTypeChangedCallBack)
are available.
resolveEntityById in interface VcdClientid - the unique identifier of the entity to resolveEntityType#getEntity(ReferenceType, Class),
VcdClient.getEntity(ReferenceType, Class, ReferenceTypeChangedCallBack)public com.vmware.vcloud.api.rest.schema_v1_5.AdminOrgType getLoggedInAdminOrg()
VcdClientgetLoggedInAdminOrg in interface VcdClientpublic OpenApiClient getOpenApiClient()
VcdClientgetOpenApiClient in interface VcdClientpublic NsxProxyApiClient getNsxProxyApiClient()
VcdClientgetNsxProxyApiClient in interface VcdClientprotected String[] getAcceptHeaders()
public void setAuthenticationHeader(org.apache.cxf.jaxrs.client.Client client)
VcdClientClient object
to be the one for this VcdClient.setAuthenticationHeader in interface VcdClientprotected void setAuthenticationHeaders(org.apache.cxf.jaxrs.client.Client client)
May possibly set cookies too, if applicable.
client - Client to set authentication headers on.public String getOrgContextHeader()
public void setOrgContextHeader(String orgContext)
VcdClientsetOrgContextHeader in interface VcdClientpublic void login(ClientCredentials credentials)
VcdClientpublic void relogin()
VcdClientpublic void loginWithJwt(String jwt, String orgSecurityContext)
VcdClientVcdClient.loginWithJwt in interface VcdClientjwt - A JWT which represents an existing session from a VcdClientorgSecurityContext - orgId of the org security context to make the request in. Used for Multisite
requests. Pass null to use issuing org as the context.public void loginWithToken(VcdClient.SessionToken sessionToken)
VcdClientVcdClient.loginWithToken in interface VcdClientsessionToken - An opaque token which represents an existing session from a VcdClientpublic VcdClient.SessionToken getSessionToken()
VcdClientVcdClient to an existing logged in session.getSessionToken in interface VcdClientnull if there is none.public String getJwtToken()
VcdClientVcdClient to an
existing logged in session and for making a request to a different, associated, org.getJwtToken in interface VcdClientnull if there is none.public void logout()
VcdClientpublic VcdClient duplicate(boolean newSession) throws VcdErrorException
VcdClientVcdClient
The new client will communicate with the same vCD as this client and is initialized with same
credentials and CxfClientSecurityContext. The session may or may not be shared amond
the 2 sessions.duplicate in interface VcdClientnewSession - true if a new session should be created in the cloned client,
false if both clients must share the sessionVcdClientVcdErrorException - if there were errors while initializing the cloned clientpublic org.apache.cxf.jaxrs.client.WebClient createWebClient(URI uri, String type)
JaxRsClientWebClient corresponding to the specified URI. Requests on the
resulting WebClient will have their "Content-Type" header set to the specified media type.createWebClient in interface JaxRsClientcreateWebClient in class AbstractCxfRestClientpublic javax.ws.rs.core.Response getServerStatus()
VcdClientapi/server_status endpoint, adjusting
the Accept headers as needed.getServerStatus in interface VcdClientResponse object containing response and http status code returned by the
call.public <ResourceClass> ResourceClass getResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
Class<ResourceClass> resourceClass)
VcdClientgetResource in interface VcdClientResourceClass - JAXB-generated class of the linked-to resourceresource - the resource with the linkrel - the rel of the desired linkmediaType - media type of contentresourceClass - JAXB-generated class of the linked-to resourcepublic <ResourceClass extends com.vmware.vcloud.api.rest.schema_v1_5.ResourceType> ResourceClass getResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resourceType,
Class<ResourceClass> resourceClass)
VcdClientgetResource in interface VcdClientResourceClass - JAXB-generated class of the linked-to resourceresourceType - the resource with the linkresourceClass - JAXB-generated class of the linked-to resourcepublic <ResourceClass> ResourceClass getResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
Class<ResourceClass> resourceClass)
VcdClientJaxRsClient.getResource(java.net.URI, Class).getResource in interface VcdClientpublic <ResponseClass extends com.vmware.vcloud.api.rest.schema_v1_5.EntityType> ResponseClass getEntity(String entityId, String mediaType, Class<ResponseClass> responseClass)
VcdClientgetEntity in interface VcdCliententityId - the vCloud entity identifier to use to resolve the entitymediaType - the media type corresponding to this entityresponseClass - the JAXB generated binding corresponding to the returned resultEntityType instance cast to its specific JAXB bindingVcdClient.resolveEntityById(String),
VcdClient.getEntity(ReferenceType, Class, ReferenceTypeChangedCallBack)public <T extends com.vmware.vcloud.api.rest.schema_v1_5.EntityType> T getEntity(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType referenceType,
Class<T> resourceClass,
VcdClient.ReferenceTypeChangedCallBack referenceTypeChangedCallBack)
VcdClientReferenceType by first trying with its href and, when it fails,
trying to recover using the vcd entity resolver service.
This method tolerates a ReferenceType instance where ReferenceType.getHref()
might return null or an invalid href. When the href is invalid or null, an attempt is made at
resolving a new href in order to GET the entity. This attempt is made possible by using the
API endpoint associated to this VcdClient and the entity identifier set in the passed
ReferenceType. The assumption is that the user of this API may persists the href of entities for
some period of time, while the vCloud API endpoint may be changed independently later on.
When an attempt to recover the entity href is successful, the
passed VcdClient.ReferenceTypeChangedCallBack is invoked with the new href as a parameter.
In the context of this method, an invalid href is defined has a URL on which an HTTP GET fails, this happens when for example a href is:
getEntity in interface VcdClientreferenceType - a ReferenceType of the entity to getresourceClass - a specialized EntityType classreferenceTypeChangedCallBack - a VcdClient.ReferenceTypeChangedCallBackEntityType corresponding to the given ReferenceTypepublic <ContentsClass,ResponseClass> ResponseClass putResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
VcdClientputResource in interface VcdClientContentsClass - JAXB-generated class of the request contentsResponseClass - JAXB-generated class of the responseresource - the resource with the linkrel - the rel of the desired linkmediaType - media type of contentcontents - the contents to be putresponseClass - JAXB-generated class of the responsepublic <ContentsClass,ResponseClass> ResponseClass putResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
VcdClientputResource in interface VcdClientpublic <ContentsClass extends com.vmware.vcloud.api.rest.schema_v1_5.ResourceType,ResponseClass> ResponseClass putResource(String mediaType, JAXBElement<ContentsClass> contents, Class<ResponseClass> responseClass)
VcdClientVcdClient.putResource(ReferenceType, String, JAXBElement, Class) except constrains
the type of the contents parameter to be a type that has an href field and assumes that field
has been populated (which, for example, it will naturally if was returned by a getResource call and then
modified for use in this call).putResource in interface VcdClientContentsClass - JAXB-generated class of the request contentsResponseClass - JAXB-generated class of the responsemediaType - media type of the contentcontents - the contents to put; contents.getHref() must be valid and identify the resource to be modifiedresponseClass - JAXB-generated class of the responsepublic <ContentsClass,ResponseClass> ResponseClass postResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
RelationType rel,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
VcdClientpostResource in interface VcdClientContentsClass - JAXB-generated class of the request contentsResponseClass - JAXB-generated class of the responseresource - the resource with the linkrel - the rel of the desired linkmediaType - media type of contentcontents - the contents to be postresponseClass - JAXB-generated class of the responsepublic <ContentsClass,ResponseClass> ResponseClass postResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType reference,
String mediaType,
JAXBElement<ContentsClass> contents,
Class<ResponseClass> responseClass)
VcdClientJaxRsClient.postResource(java.net.URI, String, JAXBElement, Class)postResource in interface VcdClientprotected VcdErrorException makeException(javax.ws.rs.WebApplicationException webApplicationException)
makeException in class AbstractCxfRestClientpublic javax.ws.rs.core.Response removeResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource)
VcdClientRelationType.REMOVE)
in the specified resource type (whose associated URL might or might not be the same as the value of
the resource type's "href" field).removeResource in interface VcdClientpublic <ResponseClass> ResponseClass removeResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
VcdClientRelationType.REMOVE)
in the specified resource type (whose associated URL might or might not be the same as the value of
the resource type's "href" field).removeResource in interface VcdClientforce - forces the resource to be deleted without regard to its state; child objects will
not be removed unless recursive delete is also asserted; null
indicates that this parameter will be omittedrecursive - recursively removes this resource and its children; null indicates that
this parameter will be omittedpublic <ResponseClass> ResponseClass deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType ref,
Class<ResponseClass> responseClass)
VcdClientdeleteResource in interface VcdClientpublic <ResponseClass> ResponseClass deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType ref,
Class<ResponseClass> responseClass)
VcdClientdeleteResource in interface VcdClientpublic <ResponseClass> ResponseClass deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ResourceType resource,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
VcdClientResourceType itself.deleteResource in interface VcdClientforce - forces the resource to be deleted without regard to its state; child objects will
not be removed unless recursive delete is also asserted; null
indicates that this parameter will be omittedrecursive - recursively removes this resource and its children; null indicates that
this parameter will be omittedpublic <ResponseClass> ResponseClass deleteResource(com.vmware.vcloud.api.rest.schema_v1_5.ReferenceType ref,
Boolean force,
Boolean recursive,
Class<ResponseClass> responseClass)
VcdClientdeleteResource in interface VcdClientforce - forces the resource to be deleted without regard to its state; child objects will
not be removed unless recursive delete is also asserted; null
indicates that this parameter will be omittedrecursive - recursively removes this resource and its children; null indicates that
this parameter will be omittedpublic com.vmware.vcloud.api.rest.schema_v1_5.ObjectFactory getVCloudObjectFactory()
VcdClientgetVCloudObjectFactory in interface VcdClientpublic com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectFactory getVCloudExtensionObjectFactory()
VcdClientgetVCloudExtensionObjectFactory in interface VcdClientpublic com.vmware.vcloud.api.rest.schema.ovf.ObjectFactory getOvfObjectFactory()
VcdClientgetOvfObjectFactory in interface VcdClientpublic com.vmware.vcloud.api.rest.schema.ovf.vmware.ObjectFactory getOvfVmwareObjectFactory()
VcdClientgetOvfVmwareObjectFactory in interface VcdClientpublic VcdTaskMonitor getTaskMonitor()
VcdClientgetTaskMonitor in interface VcdClientpublic EventViewer getEventViewer()
getEventViewer in interface VcdClientEventViewer.public void setMultisiteRequests(boolean federateRequests)
VcdClientsetMultisiteRequests in interface VcdClientpublic void setClientRequestIdProvider(VcdClient.ClientRequestIdProvider clientRequestIdGenerator)
setClientRequestIdProvider in interface VcdClientclientRequestIdGenerator - VcdClient.ClientRequestIdProvider to use to populate client request ID in requests
to VCDpublic <QueryResultClass> VcdClient.Query<QueryResultClass> getQuery(String queryTypeName, Class<QueryResultClass> queryResultClass)
VcdClientVcdClient.Query object for the given query type name and query
result type.getQuery in interface VcdClientqueryTypeName - Query type namequeryResultClass - Type of query results. Must be ReferenceType or a type derived from
QueryResultRecordType.VcdClient.Query objectpublic <QueryResultClass> VcdClient.Query<QueryResultClass> getPackagedQuery(String queryPath, Class<QueryResultClass> queryResultClass)
VcdClientVcdClient.Query object for a packaged query and query
result type.getPackagedQuery in interface VcdClientqueryPath - packaged query path in the format /{package}/queryqueryResultClass - Type of query results. Must be ReferenceType or a type derived from
QueryResultRecordType.VcdClient.Query objectpublic void setCredentials(ClientCredentials credentials)
VcdClientsetCredentials in interface VcdClientprotected VcdClient.ClientRequestIdProvider getClientRequestIdProvider()
protected final void configureHttpRequestHeaders(org.apache.cxf.jaxrs.client.Client client)
AbstractCxfRestClientconfigureHttpRequestHeaders in class AbstractCxfRestClientCopyright © 2019 VMware. All rights reserved.