public interface File extends Service, FileTypes
File
interface provides methods for accessing files within a
download session.
After a download session is created against a library
item, the File
interface can be used to retrieve all downloadable
content within the library item. Since the content may not be available
immediately in a downloadable form on the server side, the client will have to
prepare the file and wait for the file status to become FileTypes.PrepareStatus.PREPARED
.
See DownloadSession
.
FileTypes.EndpointType, FileTypes.Info, FileTypes.PrepareStatus
_VAPI_SERVICE_ID
Modifier and Type | Method and Description |
---|---|
FileTypes.Info |
get(java.lang.String downloadSessionId,
java.lang.String fileName)
Retrieves file download information for a specific file.
|
void |
get(java.lang.String downloadSessionId,
java.lang.String fileName,
AsyncCallback<FileTypes.Info> asyncCallback)
Retrieves file download information for a specific file.
|
void |
get(java.lang.String downloadSessionId,
java.lang.String fileName,
AsyncCallback<FileTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Retrieves file download information for a specific file.
|
FileTypes.Info |
get(java.lang.String downloadSessionId,
java.lang.String fileName,
InvocationConfig invocationConfig)
Retrieves file download information for a specific file.
|
java.util.List<FileTypes.Info> |
list(java.lang.String downloadSessionId)
Lists the information of all the files in the library item associated with the
download session.
|
void |
list(java.lang.String downloadSessionId,
AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback)
Lists the information of all the files in the library item associated with the
download session.
|
void |
list(java.lang.String downloadSessionId,
AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback,
InvocationConfig invocationConfig)
Lists the information of all the files in the library item associated with the
download session.
|
java.util.List<FileTypes.Info> |
list(java.lang.String downloadSessionId,
InvocationConfig invocationConfig)
Lists the information of all the files in the library item associated with the
download session.
|
FileTypes.Info |
prepare(java.lang.String downloadSessionId,
java.lang.String fileName,
FileTypes.EndpointType endpointType)
Requests a file to be prepared for download.
|
void |
prepare(java.lang.String downloadSessionId,
java.lang.String fileName,
FileTypes.EndpointType endpointType,
AsyncCallback<FileTypes.Info> asyncCallback)
Requests a file to be prepared for download.
|
void |
prepare(java.lang.String downloadSessionId,
java.lang.String fileName,
FileTypes.EndpointType endpointType,
AsyncCallback<FileTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Requests a file to be prepared for download.
|
FileTypes.Info |
prepare(java.lang.String downloadSessionId,
java.lang.String fileName,
FileTypes.EndpointType endpointType,
InvocationConfig invocationConfig)
Requests a file to be prepared for download.
|
java.util.List<FileTypes.Info> list(java.lang.String downloadSessionId)
Synchronous method overload. Result of the invocation will be reported as a method return value.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.List
of FileTypes.Info
instances.NotFound
- if the download session associated with downloadSessionId
doesn't exist.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. java.util.List<FileTypes.Info> list(java.lang.String downloadSessionId, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.invocationConfig
- Configuration for the method invocation.List
of FileTypes.Info
instances.NotFound
- if the download session associated with downloadSessionId
doesn't exist.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. void list(java.lang.String downloadSessionId, AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
The List
of FileTypes.Info
instances.
Operation Errors:
NotFound
- if the download session associated with downloadSessionId
doesn't exist.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void list(java.lang.String downloadSessionId, AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
The List
of FileTypes.Info
instances.
Operation Errors:
NotFound
- if the download session associated with downloadSessionId
doesn't exist.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.FileTypes.Info prepare(java.lang.String downloadSessionId, java.lang.String fileName, FileTypes.EndpointType endpointType)
Synchronous method overload. Result of the invocation will be reported as a method return value.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested for download.endpointType
- Endpoint type request, one of HTTPS, DIRECT. This will determine the type of the
FileTypes.Info.getDownloadEndpoint()
that is generated when the file is prepared. The FileTypes.EndpointType.DIRECT
is only available to users who have the ContentLibrary.ReadStorage privilege.
If not specified the default is FileTypes.EndpointType.HTTPS
.NotFound
- if the download session does not exist.InvalidArgument
- if there is no file with the specified fileName
.Unauthorized
- if the the download session wasn't created with the ContentLibrary.ReadStorage
privilege and the caller requested a FileTypes.EndpointType.DIRECT
endpoint type.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. FileTypes.Info prepare(java.lang.String downloadSessionId, java.lang.String fileName, FileTypes.EndpointType endpointType, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested for download.endpointType
- Endpoint type request, one of HTTPS, DIRECT. This will determine the type of the
FileTypes.Info.getDownloadEndpoint()
that is generated when the file is prepared. The FileTypes.EndpointType.DIRECT
is only available to users who have the ContentLibrary.ReadStorage privilege.
If not specified the default is FileTypes.EndpointType.HTTPS
.invocationConfig
- Configuration for the method invocation.NotFound
- if the download session does not exist.InvalidArgument
- if there is no file with the specified fileName
.Unauthorized
- if the the download session wasn't created with the ContentLibrary.ReadStorage
privilege and the caller requested a FileTypes.EndpointType.DIRECT
endpoint type.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. void prepare(java.lang.String downloadSessionId, java.lang.String fileName, FileTypes.EndpointType endpointType, AsyncCallback<FileTypes.Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
File information containing the status of the request and the download link to
the file.
Operation Errors:
NotFound
- if the download session does not exist.
InvalidArgument
- if there is no file with the specified fileName
.
Unauthorized
- if the the download session wasn't created with the ContentLibrary.ReadStorage
privilege and the caller requested a FileTypes.EndpointType.DIRECT
endpoint type.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested for download.endpointType
- Endpoint type request, one of HTTPS, DIRECT. This will determine the type of the
FileTypes.Info.getDownloadEndpoint()
that is generated when the file is prepared. The FileTypes.EndpointType.DIRECT
is only available to users who have the ContentLibrary.ReadStorage privilege.
If not specified the default is FileTypes.EndpointType.HTTPS
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void prepare(java.lang.String downloadSessionId, java.lang.String fileName, FileTypes.EndpointType endpointType, AsyncCallback<FileTypes.Info> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
File information containing the status of the request and the download link to
the file.
Operation Errors:
NotFound
- if the download session does not exist.
InvalidArgument
- if there is no file with the specified fileName
.
Unauthorized
- if the the download session wasn't created with the ContentLibrary.ReadStorage
privilege and the caller requested a FileTypes.EndpointType.DIRECT
endpoint type.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested for download.endpointType
- Endpoint type request, one of HTTPS, DIRECT. This will determine the type of the
FileTypes.Info.getDownloadEndpoint()
that is generated when the file is prepared. The FileTypes.EndpointType.DIRECT
is only available to users who have the ContentLibrary.ReadStorage privilege.
If not specified the default is FileTypes.EndpointType.HTTPS
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.FileTypes.Info get(java.lang.String downloadSessionId, java.lang.String fileName)
Synchronous method overload. Result of the invocation will be reported as a method return value.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested.FileTypes.Info
instance containing the status of the file and its download link if available.NotFound
- if the download session associated with downloadSessionId
does not
exist.InvalidArgument
- if there is no file with the specified fileName
.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. FileTypes.Info get(java.lang.String downloadSessionId, java.lang.String fileName, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested.invocationConfig
- Configuration for the method invocation.FileTypes.Info
instance containing the status of the file and its download link if available.NotFound
- if the download session associated with downloadSessionId
does not
exist.InvalidArgument
- if there is no file with the specified fileName
.Unauthorized
- if you do not have all of the privileges described as follows: System.Anonymous
. void get(java.lang.String downloadSessionId, java.lang.String fileName, AsyncCallback<FileTypes.Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
The FileTypes.Info
instance containing the status of the file and its download link if available.
Operation Errors:
NotFound
- if the download session associated with downloadSessionId
does not
exist.
InvalidArgument
- if there is no file with the specified fileName
.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String downloadSessionId, java.lang.String fileName, AsyncCallback<FileTypes.Info> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
The FileTypes.Info
instance containing the status of the file and its download link if available.
Operation Errors:
NotFound
- if the download session associated with downloadSessionId
does not
exist.
InvalidArgument
- if there is no file with the specified fileName
.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Anonymous
. downloadSessionId
- Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.fileName
- Name of the file requested.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.