VMware, Inc.
19
4
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.
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 4
‐
2
can
be
run
by
any
user
with
rights
to
create
and
modify
catalog
items
and
vApps.
Samples
listed
Table 4
‐
3
require
organization
administrator
privileges.
Overview of Packages and Samples
4
Table 4-1.
Packages in the vCloud SDK for Java
Package Name
Description
com.vmware.vcloud.sdk
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.
com.vmware.vcloud.sdk.admin
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.
com.vmware.vcloud.sdk.admin.extension
Defines
the
classes
that
implement
extensions
that
support
operations
on
the
vSphere
Platform.
All
vSphere
platform
operations
are
restricted
to
the
system
administrator.
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
XML
schemas
used
by
JAXB
binding
Table 4-2.
User API Samples
Sample Name
Description
CatalogInventorySample.java
Lists
name
and
href
for
all
items
in
all
catalogs
in
the
organization.
CatalogItemCRUD.java
Create,
retrieve,
update,
or
delete
a
catalog
item.
DiskCRUD.java
Create,
retrieve,
update,
or
delete
a
virtual
hard
disk
in
a
Vm
object.