|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vmware.vcloud.sdk.VcloudResource<T>
com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.MediaType>
com.vmware.vcloud.sdk.Media
public class Media
Helper class to access the Media Resource in vCloud API.
MediaType| Constructor Summary | |
|---|---|
Media(VcloudClient client,
com.vmware.vcloud.api.rest.schema.MediaType mediaResource_v1_5)
Constructor to create the Media. |
|
| Method Summary | |
|---|---|
Task |
delete()
Delete Media . |
static Task |
delete(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
Delete Media . |
Task |
deleteMedia()
1. |
static Task |
deleteMedia(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
1. |
void |
downloadMedia(String downloadLocation)
Download the media as an ISO or Floppy file at the specified location. |
void |
downloadMedia(String downloadLocation,
String mediaName)
Download the media as an ISO or Floppy file at the specified location with the specified name. |
Task |
enableDownload()
Enable download for the media |
static Task |
enableDownload(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
Enable download for the media |
com.vmware.vcloud.api.rest.schema.ReferenceType |
getCatalogItemReference()
Returns the CatalogItem reference which contains this media. |
static Media |
getMediaById(VcloudClient client,
String vCloudId)
Get Media helper using the vCloud ID |
static Media |
getMediaByReference(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
Get Media for the given media reference |
com.vmware.vcloud.api.rest.schema.ReferenceType |
getOwner()
Returns the owner of the media. |
Set<String> |
getUploadedFileNames()
Get the uploaded file names for thie media |
Set<String> |
getUploadFileNames()
Get the upload file names for this Media. |
com.vmware.vcloud.api.rest.schema.ReferenceType |
getVdcReference()
Returns the Parent Vdc ReferenceType. |
boolean |
isPartOfCatalogItem()
Returns true if VappTemplate is in Catalog, otherwise false. |
HashMap<String,com.vmware.vcloud.api.rest.schema.FileType> |
monitorUpload()
Monitor the file upload status. |
Task |
updateMedia(com.vmware.vcloud.api.rest.schema.MediaType mediaType)
Updates name and description of Media .Any other attributes/elements will be ignored. |
void |
uploadFile(String fileName,
InputStream is,
long size)
Upload the Media file. |
void |
uploadFile(String fileName,
InputStream is,
long startByte,
long endByte)
Partial Upload the Media file. |
| 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 |
|---|
public Media(VcloudClient client,
com.vmware.vcloud.api.rest.schema.MediaType mediaResource_v1_5)
client - The VcloudClient used to communicate with the vCloud| Method Detail |
|---|
public static Media getMediaByReference(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
throws VCloudException
client - mediaRef -
Media
VCloudException
public static Media getMediaById(VcloudClient client,
String vCloudId)
throws VCloudException
client - VcloudClientvCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example:
"urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Media
VCloudException
public Task updateMedia(com.vmware.vcloud.api.rest.schema.MediaType mediaType)
throws VCloudException
mediaType - MediaType
Task
VCloudException
public Task delete()
throws VCloudException
Task
VCloudException
public static Task delete(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
throws VCloudException
client - vCloud Client VcloudClientmediaRef - Media Ref
Task
VCloudException
public Task deleteMedia()
throws VCloudException
Task
VCloudException
public static Task deleteMedia(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
throws VCloudException
client - VcloudClientmediaRef -
Task
VCloudExceptionpublic Set<String> getUploadFileNames()
Setpublic Set<String> getUploadedFileNames()
Set
public void uploadFile(String fileName,
InputStream is,
long size)
throws VCloudException
fileName - Media File nameis - Input stream for the file contentssize - The size of the media file to upload
VCloudException
public void uploadFile(String fileName,
InputStream is,
long startByte,
long endByte)
throws VCloudException
fileName - Media File nameis - Input stream for the file contentsstartByte - starting byteendByte - ending byte
VCloudException
public HashMap<String,com.vmware.vcloud.api.rest.schema.FileType> monitorUpload()
throws VCloudException
HashMap<String, FileType>
VCloudException
public com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogItemReference()
throws VCloudException
ReferenceType
VCloudException
public com.vmware.vcloud.api.rest.schema.ReferenceType getVdcReference()
throws VCloudException
ReferenceType
VCloudException
public com.vmware.vcloud.api.rest.schema.ReferenceType getOwner()
throws VCloudException
ReferenceType
VCloudException
public boolean isPartOfCatalogItem()
throws VCloudException
Boolean
VCloudException
public Task enableDownload()
throws VCloudException
Task
VCloudException
public static Task enableDownload(VcloudClient client,
com.vmware.vcloud.api.rest.schema.ReferenceType mediaRef)
throws VCloudException
client - VcloudClientmediaRef - ReferenceType
VCloudException
public void downloadMedia(String downloadLocation)
throws VCloudException
downloadLocation - String
VCloudExceptionmedia#enableDownload()
public void downloadMedia(String downloadLocation,
String mediaName)
throws VCloudException
downloadLocation - StringmediaName - String
VCloudExceptionmedia#enableDownload()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||