com.vmware.vcloud.sdk
Class CatalogItem

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.CatalogItemType>
          extended by com.vmware.vcloud.sdk.CatalogItem

public class CatalogItem
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.CatalogItemType>

Helper class to access the CatalogItem Resource in vCloud API.

See Also:
CatalogItemType

Constructor Summary
CatalogItem(VcloudClient client, com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType_v1_5)
          Constructor to create a CatalogItem
 
Method Summary
 void delete()
          Delete CatalogItem .
static void delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType catalogItemRef)
          Delete CatalogItem .
static CatalogItem getCatalogItemById(VcloudClient client, String vCloudId)
          Get CatalogItem helper using the vCloud ID
static CatalogItem getCatalogItemByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType catalogItemRef)
          Get CatalogItem for the given Catalog Item ReferenceType.
 com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogReference()
          Returns the Catalog ReferenceType for this catalog item
 com.vmware.vcloud.api.rest.schema.ReferenceType getEntityReference()
          Returns the entity contained in the catalog item.
 Task sync()
          Sync catalog item
 CatalogItem updateCatalogItem(com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType)
          Updates CatalogItem
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudEntity
getMetadata, getReference, getTasks
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudResource
getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogItem

public CatalogItem(VcloudClient client,
                   com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType_v1_5)
Constructor to create a CatalogItem

Parameters:
client - VcloudClient
catalogItemType_v1_5 - CatalogItemType
Method Detail

getCatalogReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogReference()
                                                                    throws VCloudException
Returns the Catalog ReferenceType for this catalog item

Returns:
ReferenceType
Throws:
VCloudException

getEntityReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getEntityReference()
                                                                   throws VCloudException
Returns the entity contained in the catalog item. The entity can be a media or vaptemplate

Returns:
ReferenceType
Throws:
VCloudException

getCatalogItemByReference

public static CatalogItem getCatalogItemByReference(VcloudClient client,
                                                    com.vmware.vcloud.api.rest.schema.ReferenceType catalogItemRef)
                                             throws VCloudException
Get CatalogItem for the given Catalog Item ReferenceType.

Parameters:
client - vCloud API client VcloudClient
catalogItemRef - ReferenceType ReferenceType
Returns:
CatalogItem helper CatalogItem
Throws:
VCloudException
See Also:
Catalog.getCatalogItemRefByName(String), Catalog.getCatalogItemRefsByName(), Catalog.getCatalogItemReferences()

getCatalogItemById

public static CatalogItem getCatalogItemById(VcloudClient client,
                                             String vCloudId)
                                      throws VCloudException
Get CatalogItem helper using the vCloud ID

Parameters:
client - VcloudClient
vCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example: "urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Returns:
CatalogItem
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

updateCatalogItem

public CatalogItem updateCatalogItem(com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType)
                              throws VCloudException
Updates CatalogItem

Parameters:
catalogItemType - CatalogItemType
Returns:
CatalogItem
Throws:
VCloudException

delete

public void delete()
            throws VCloudException
Delete CatalogItem . This is long running operation and returns the Task

Throws:
VCloudException

delete

public static void delete(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType catalogItemRef)
                   throws VCloudException
Delete CatalogItem . This is long running operation and returns the Task

Parameters:
client - vCloud Client VcloudClient
catalogItemRef - CatalogItem Ref
Throws:
VCloudException

sync

public Task sync()
          throws VCloudException
Sync catalog item

Returns:
Task
Throws:
VCloudException
Since:
API 5.5, SDK 5.5


Copyright © 2016. All Rights Reserved.