com.vmware.vcloud.sdk
Class Catalog

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

public class Catalog
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.CatalogType>

Helper class to access the Catalog Resource in vCloud API.

See Also:
CatalogType

Method Summary
 CatalogItem addCatalogItem(com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType)
          Adding a catalogItem
 Task capturevApp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVApp)
          Create a vApp template in this catalog from a vApp.
 Task copyCatalogItem(String name, String description, com.vmware.vcloud.api.rest.schema.ReferenceType sourceRef)
          Copy a catalog item from one catalog to another
 VappTemplate createVappTemplate(com.vmware.vcloud.api.rest.schema.UploadVAppTemplateParamsType vappTemplateParams)
          Creating and Uploading a vapp template.
static Catalog getCatalogById(VcloudClient client, String vCloudId)
          Get Catalog helper using the vCloud ID
static Catalog getCatalogByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Get Catalog helper using the Catalog Ref typically obtained from the Organization.
 com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogItemRefByName(String name)
          Returns a catalog item reference for the given catalogitem name
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getCatalogItemReferences()
          Returns a collection of catalogItem references
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getCatalogItemRefsByName()
          Returns a hashmap of catalog item references by name
 com.vmware.vcloud.api.rest.schema.ReferenceType getOrgReference()
          Returns the Parent Organization reference
 Task moveCatalogItem(String name, String description, com.vmware.vcloud.api.rest.schema.ReferenceType sourceRef)
          Move a catalog item from one catalog to another
 Task sync()
          Force sync the catalog to the remote subscribed catalog.
 VappTemplate uploadVappTemplate(String vAppTemplateName, String vAppTemplateDesc, String localOvfFileLocation, Boolean manifestRequired, com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageRef)
          Uploading the ovf package as a vapp template to the catalog.
 
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
 

Method Detail

getCatalogByReference

public static Catalog getCatalogByReference(VcloudClient client,
                                            com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                                     throws VCloudException
Get Catalog helper using the Catalog Ref typically obtained from the Organization.

Parameters:
client - vCloud API client VcloudClient
catalogRef - ReferenceType
Returns:
Catalog helper
Throws:
VCloudException
See Also:
Organization.getCatalogRefs()

getCatalogById

public static Catalog getCatalogById(VcloudClient client,
                                     String vCloudId)
                              throws VCloudException
Get Catalog 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:
Catalog
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

addCatalogItem

public CatalogItem addCatalogItem(com.vmware.vcloud.api.rest.schema.CatalogItemType catalogItemType)
                           throws VCloudException
Adding a catalogItem

Parameters:
catalogItemType - CatalogItemType
Returns:
CatalogItem helper
Throws:
VCloudException

getCatalogItemRefsByName

public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getCatalogItemRefsByName()
Returns a hashmap of catalog item references by name

Returns:
HashMap

getCatalogItemRefByName

public com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogItemRefByName(String name)
Returns a catalog item reference for the given catalogitem name

Parameters:
name - String
Returns:
ReferenceType

getCatalogItemReferences

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getCatalogItemReferences()
Returns a collection of catalogItem references

Returns:
Collection

getOrgReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getOrgReference()
                                                                throws VCloudException
Returns the Parent Organization reference

Returns:
ReferenceType
Throws:
VCloudException

uploadVappTemplate

public VappTemplate uploadVappTemplate(String vAppTemplateName,
                                       String vAppTemplateDesc,
                                       String localOvfFileLocation,
                                       Boolean manifestRequired,
                                       com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageRef)
                                throws VCloudException,
                                       DuplicateNameException,
                                       ResourceNotAddedException,
                                       TimeoutException
Uploading the ovf package as a vapp template to the catalog. Make sure that the ovf file, manifest file(if any) and its corresponding vmdk files are residing in the same location.

Parameters:
vAppTemplateName - - name of the vapptemplate
vAppTemplateDesc - - description of the vapptempalte
localOvfFileLocation - - local media file location.
manifestRequired - - does the vapptemplate contains a manifest file which needs to be uploaded.
vdcStorageRef - - vdc's storage profile reference. If null, defaults to the vdc's default storage profile. For vCD 1.5 this parameter should be set to null.
Returns:
VappTemplate
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
Since:
API 5.5, SDK 5.5

createVappTemplate

public VappTemplate createVappTemplate(com.vmware.vcloud.api.rest.schema.UploadVAppTemplateParamsType vappTemplateParams)
                                throws VCloudException
Creating and Uploading a vapp template. This is the initial step for creating a vapp template

Parameters:
vappTemplateParams - UploadVAppTemplateParamsType
Returns:
VappTemplate
Throws:
VCloudException
Since:
API 5.5, SDK 5.5
See Also:
VappTemplate.uploadOVFFile(java.io.InputStream, long), VappTemplate.uploadFile(String, java.io.InputStream, long), VappTemplate.uploadFile(String, java.io.InputStream, long, long), VappTemplate.monitorUpload(), VappTemplate.getUploadFileNames()

capturevApp

public Task capturevApp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVApp)
                 throws VCloudException
Create a vApp template in this catalog from a vApp.

Parameters:
captureVApp - CaptureVAppParamsType
Returns:
Task
Throws:
VCloudException
Since:
API 5.5, SDK 5.5

sync

public Task sync()
          throws VCloudException
Force sync the catalog to the remote subscribed catalog.

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

copyCatalogItem

public Task copyCatalogItem(String name,
                            String description,
                            com.vmware.vcloud.api.rest.schema.ReferenceType sourceRef)
                     throws VCloudException
Copy a catalog item from one catalog to another

Parameters:
name - String
description - String
sourceRef - ReferenceType
Returns:
Task
Throws:
VCloudException
Since:
API 5.5, SDK 5.5

moveCatalogItem

public Task moveCatalogItem(String name,
                            String description,
                            com.vmware.vcloud.api.rest.schema.ReferenceType sourceRef)
                     throws VCloudException
Move a catalog item from one catalog to another

Parameters:
name - String
description - String
sourceRef - ReferenceType
Returns:
Task
Throws:
VCloudException
Since:
API 5.5, SDK 5.5


Copyright © 2016. All Rights Reserved.