4
Overview of Packages and Samples
The vCloud SDK for Java includes sample application code and complete reference documentation on all
packages, classes, and methods in the SDK. This chapter is an introductory tour of those items.
Packages
The SDK includes four packages that support the JAXB bindings to the vCloud API XML schemas and three
packages that implement create, retrieve, update, and delete (CRUD) operations on the objects represented by
those schemas.
Table 4-1. Packages in the vCloud SDK for Java
Package Name
com.vmware.vcloud.sdk
com.vmware.vcloud.sdk.admin
com.vmware.vcloud.sdk.admin.extension
com.vmware.vcloud.api.rest.schema,
com.vmware.vcloud.api.rest.schema.extension
com.vmware.vcloud.api.rest.schema.ovf
com.vmware.vcloud.api.rest.schema.versioning
org.w3._2001.xmlschema
Samples
In addition to HellovCloud.java (see "Hello vCloud: A Structured Java Workflow Example" on page 13), the
SDK samples directory (vcloud-java-sdk-samples-1.0-sources\com\vmware\vcloud\sdk\samples)
includes several samples that demonstrate how you can use the vCloud SDK for Java to develop client
applications. Samples listed Table
and vApps. Samples listed Table
Table 4-2. User API Samples
Sample Name
CatalogInventorySample.java
CatalogItemCRUD.java
DiskCRUD.java
VMware, Inc.
Description
Defines the classes that implement the user API. Objects accessed by
these classes are typically readable by all users, and can be modified
by users with appropriate rights.
Defines the classes that implement the administrative API. Objects
accessed by these classes are typically readable by all users, but can
be created and modified only by a system administrator, organization
administrator or other privileged user. Many of these objects extend
types that are defined in the user API.
Defines the classes that implement extensions that support
operations on the vSphere Platform. All vSphere platform operations
are restricted to the system administrator.
XML schemas used by JAXB binding
4‐2 can be run by any user with rights to create and modify catalog items
4‐3 require organization administrator privileges.
Description
Lists name and href for all items in all catalogs in the organization.
Create, retrieve, update, or delete a catalog item.
Create, retrieve, update, or delete a virtual hard disk in a Vm object.
4
19