FileTypes.AddSpec, FileTypes.Info, FileTypes.SourceType, FileTypes.ValidationError, FileTypes.ValidationResult
Constructor and Description |
---|
FileStub(ApiProvider apiProvider,
StubConfigurationBase config) |
FileStub(ApiProvider apiProvider,
com.vmware.vapi.internal.bindings.TypeConverter typeConverter,
StubConfigurationBase config) |
Modifier and Type | Method and Description |
---|---|
FileTypes.Info |
add(java.lang.String updateSessionId,
FileTypes.AddSpec fileSpec)
Requests file content to be changed (either created, or updated).
|
void |
add(java.lang.String updateSessionId,
FileTypes.AddSpec fileSpec,
AsyncCallback<FileTypes.Info> asyncCallback)
Requests file content to be changed (either created, or updated).
|
void |
add(java.lang.String updateSessionId,
FileTypes.AddSpec fileSpec,
AsyncCallback<FileTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Requests file content to be changed (either created, or updated).
|
FileTypes.Info |
add(java.lang.String updateSessionId,
FileTypes.AddSpec fileSpec,
InvocationConfig invocationConfig)
Requests file content to be changed (either created, or updated).
|
FileTypes.Info |
get(java.lang.String updateSessionId,
java.lang.String fileName)
Retrieves information about a specific file in the snapshot of the library item
at the time when the update session was created.
|
void |
get(java.lang.String updateSessionId,
java.lang.String fileName,
AsyncCallback<FileTypes.Info> asyncCallback)
Retrieves information about a specific file in the snapshot of the library item
at the time when the update session was created.
|
void |
get(java.lang.String updateSessionId,
java.lang.String fileName,
AsyncCallback<FileTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Retrieves information about a specific file in the snapshot of the library item
at the time when the update session was created.
|
FileTypes.Info |
get(java.lang.String updateSessionId,
java.lang.String fileName,
InvocationConfig invocationConfig)
Retrieves information about a specific file in the snapshot of the library item
at the time when the update session was created.
|
java.util.List<FileTypes.Info> |
list(java.lang.String updateSessionId)
Lists all files in the library item associated with the update session.
|
void |
list(java.lang.String updateSessionId,
AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback)
Lists all files in the library item associated with the update session.
|
void |
list(java.lang.String updateSessionId,
AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback,
InvocationConfig invocationConfig)
Lists all files in the library item associated with the update session.
|
java.util.List<FileTypes.Info> |
list(java.lang.String updateSessionId,
InvocationConfig invocationConfig)
Lists all files in the library item associated with the update session.
|
void |
remove(java.lang.String updateSessionId,
java.lang.String fileName)
Requests a file to be removed.
|
void |
remove(java.lang.String updateSessionId,
java.lang.String fileName,
AsyncCallback<java.lang.Void> asyncCallback)
Requests a file to be removed.
|
void |
remove(java.lang.String updateSessionId,
java.lang.String fileName,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Requests a file to be removed.
|
void |
remove(java.lang.String updateSessionId,
java.lang.String fileName,
InvocationConfig invocationConfig)
Requests a file to be removed.
|
FileTypes.ValidationResult |
validate(java.lang.String updateSessionId)
Validates the files in the update session with the referenced identifier and
ensures all necessary files are received.
|
void |
validate(java.lang.String updateSessionId,
AsyncCallback<FileTypes.ValidationResult> asyncCallback)
Validates the files in the update session with the referenced identifier and
ensures all necessary files are received.
|
void |
validate(java.lang.String updateSessionId,
AsyncCallback<FileTypes.ValidationResult> asyncCallback,
InvocationConfig invocationConfig)
Validates the files in the update session with the referenced identifier and
ensures all necessary files are received.
|
FileTypes.ValidationResult |
validate(java.lang.String updateSessionId,
InvocationConfig invocationConfig)
Validates the files in the update session with the referenced identifier and
ensures all necessary files are received.
|
public FileStub(ApiProvider apiProvider, com.vmware.vapi.internal.bindings.TypeConverter typeConverter, StubConfigurationBase config)
public FileStub(ApiProvider apiProvider, StubConfigurationBase config)
public FileTypes.ValidationResult validate(java.lang.String updateSessionId)
File
FileTypes.ValidationResult.getMissingFiles()
set. The user can add the missing files and try re-validating. For other type of
errors, FileTypes.ValidationResult.getInvalidFiles()
will contain the list of invalid files.
Synchronous method overload. Result of the invocation will be reported as a method return value.
validate
in interface File
updateSessionId
- Identifier of the update session to validate.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.public FileTypes.ValidationResult validate(java.lang.String updateSessionId, InvocationConfig invocationConfig)
File
FileTypes.ValidationResult.getMissingFiles()
set. The user can add the missing files and try re-validating. For other type of
errors, FileTypes.ValidationResult.getInvalidFiles()
will contain the list of invalid files.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
validate
in interface File
updateSessionId
- Identifier of the update session to validate.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.invocationConfig
- Configuration for the method invocation.public void validate(java.lang.String updateSessionId, AsyncCallback<FileTypes.ValidationResult> asyncCallback)
File
FileTypes.ValidationResult.getMissingFiles()
set. The user can add the missing files and try re-validating. For other type of
errors, FileTypes.ValidationResult.getInvalidFiles()
will contain the list of invalid files.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
A validation result containing missing files or invalid files and the reason why
they are invalid.
Operation Errors:
NotFound
- if no update session with the given identifier exists.
NotAllowedInCurrentState
- if the update session is not in the UpdateSessionModel.State.ACTIVE
state, or if
some of the files that will be uploaded by the client aren't received correctly.
validate
in interface File
updateSessionId
- Identifier of the update session to validate.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void validate(java.lang.String updateSessionId, AsyncCallback<FileTypes.ValidationResult> asyncCallback, InvocationConfig invocationConfig)
File
FileTypes.ValidationResult.getMissingFiles()
set. The user can add the missing files and try re-validating. For other type of
errors, FileTypes.ValidationResult.getInvalidFiles()
will contain the list of invalid files.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
A validation result containing missing files or invalid files and the reason why
they are invalid.
Operation Errors:
NotFound
- if no update session with the given identifier exists.
NotAllowedInCurrentState
- if the update session is not in the UpdateSessionModel.State.ACTIVE
state, or if
some of the files that will be uploaded by the client aren't received correctly.
validate
in interface File
updateSessionId
- Identifier of the update session to validate.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.public FileTypes.Info add(java.lang.String updateSessionId, FileTypes.AddSpec fileSpec)
File
When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
Synchronous method overload. Result of the invocation will be reported as a method return value.
add
in interface File
updateSessionId
- Identifier of the update session to be modified.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileSpec
- Specification for the file that needs to be added or updated. This includes
whether the client wants to push the content or have the server pull it.FileTypes.Info
class
containing upload links as well as server side state tracking the transfer of
the file.public FileTypes.Info add(java.lang.String updateSessionId, FileTypes.AddSpec fileSpec, InvocationConfig invocationConfig)
File
When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
add
in interface File
updateSessionId
- Identifier of the update session to be modified.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileSpec
- Specification for the file that needs to be added or updated. This includes
whether the client wants to push the content or have the server pull it.invocationConfig
- Configuration for the method invocation.FileTypes.Info
class
containing upload links as well as server side state tracking the transfer of
the file.public void add(java.lang.String updateSessionId, FileTypes.AddSpec fileSpec, AsyncCallback<FileTypes.Info> asyncCallback)
File
When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
An FileTypes.Info
class
containing upload links as well as server side state tracking the transfer of
the file.
Operation Errors:
InvalidArgument
- if the fileSpec
is invalid.
NotFound
- if the update session doesn't exist.
Unauthorized
- if the caller doesn't have ContentLibrary.ReadStorage privilege on the library
item of the update session and source type FileTypes.SourceType.PULL
is
requested for a file or datastore source endpoint (that is, not HTTP or HTTPs
based endpoint).
NotAllowedInCurrentState
- if the content of the library item associated with the update session has been
deleted from the storage backings (see LibraryModel#storageBackings
)
associated with it.
NotAllowedInCurrentState
- if metadata files such as manifest and certificate file are added after the OVF
descriptor file. This is applicable to update sessions with library item type
OVF only. This error was added in vSphere 6.8.0.
add
in interface File
updateSessionId
- Identifier of the update session to be modified.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileSpec
- Specification for the file that needs to be added or updated. This includes
whether the client wants to push the content or have the server pull it.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void add(java.lang.String updateSessionId, FileTypes.AddSpec fileSpec, AsyncCallback<FileTypes.Info> asyncCallback, InvocationConfig invocationConfig)
File
When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
An FileTypes.Info
class
containing upload links as well as server side state tracking the transfer of
the file.
Operation Errors:
InvalidArgument
- if the fileSpec
is invalid.
NotFound
- if the update session doesn't exist.
Unauthorized
- if the caller doesn't have ContentLibrary.ReadStorage privilege on the library
item of the update session and source type FileTypes.SourceType.PULL
is
requested for a file or datastore source endpoint (that is, not HTTP or HTTPs
based endpoint).
NotAllowedInCurrentState
- if the content of the library item associated with the update session has been
deleted from the storage backings (see LibraryModel#storageBackings
)
associated with it.
NotAllowedInCurrentState
- if metadata files such as manifest and certificate file are added after the OVF
descriptor file. This is applicable to update sessions with library item type
OVF only. This error was added in vSphere 6.8.0.
add
in interface File
updateSessionId
- Identifier of the update session to be modified.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileSpec
- Specification for the file that needs to be added or updated. This includes
whether the client wants to push the content or have the server pull it.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.public void remove(java.lang.String updateSessionId, java.lang.String fileName)
File
Synchronous method overload. Result of the invocation will be reported as a method return value.
public void remove(java.lang.String updateSessionId, java.lang.String fileName, InvocationConfig invocationConfig)
File
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
remove
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file to be removed.invocationConfig
- Configuration for the method invocation.public void remove(java.lang.String updateSessionId, java.lang.String fileName, AsyncCallback<java.lang.Void> asyncCallback)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
NotFound
- if the update session doesn't exist.
InvalidArgument
- if the file doesn't exist in the library item associated with the update
session.
remove
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file to be removed.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void remove(java.lang.String updateSessionId, java.lang.String fileName, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
NotFound
- if the update session doesn't exist.
InvalidArgument
- if the file doesn't exist in the library item associated with the update
session.
remove
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file to be removed.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.public java.util.List<FileTypes.Info> list(java.lang.String updateSessionId)
File
Synchronous method overload. Result of the invocation will be reported as a method return value.
list
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.List
of the files in the library item associated with the
update session. This List
may be empty if the caller has
removed all the files as part of this session (in which case completing the
update session will result in an empty library item).public java.util.List<FileTypes.Info> list(java.lang.String updateSessionId, InvocationConfig invocationConfig)
File
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
list
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.invocationConfig
- Configuration for the method invocation.List
of the files in the library item associated with the
update session. This List
may be empty if the caller has
removed all the files as part of this session (in which case completing the
update session will result in an empty library item).public void list(java.lang.String updateSessionId, AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
The List
of the files in the library item associated with the
update session. This List
may be empty if the caller has
removed all the files as part of this session (in which case completing the
update session will result in an empty library item).
Operation Errors:
NotFound
- if the update session doesn't exist.
Unauthorized
- if you do not have all of the privileges described as follows:
com.vmware.content.library.Item
referenced by the parameter
libraryItemId
requires System.Read
. public void list(java.lang.String updateSessionId, AsyncCallback<java.util.List<FileTypes.Info>> asyncCallback, InvocationConfig invocationConfig)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
The List
of the files in the library item associated with the
update session. This List
may be empty if the caller has
removed all the files as part of this session (in which case completing the
update session will result in an empty library item).
Operation Errors:
NotFound
- if the update session doesn't exist.
Unauthorized
- if you do not have all of the privileges described as follows:
com.vmware.content.library.Item
referenced by the parameter
libraryItemId
requires System.Read
. list
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.public FileTypes.Info get(java.lang.String updateSessionId, java.lang.String fileName)
File
Synchronous method overload. Result of the invocation will be reported as a method return value.
public FileTypes.Info get(java.lang.String updateSessionId, java.lang.String fileName, InvocationConfig invocationConfig)
File
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
get
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file.invocationConfig
- Configuration for the method invocation.public void get(java.lang.String updateSessionId, java.lang.String fileName, AsyncCallback<FileTypes.Info> asyncCallback)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
Information about the file.
Operation Errors:
NotFound
- if the update session doesn't exist.
InvalidArgument
- if the file doesn't exist in the library item associated with the update
session.
Unauthorized
- if you do not have all of the privileges described as follows:
com.vmware.content.library.Item
referenced by the parameter
libraryItemId
requires System.Read
. get
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void get(java.lang.String updateSessionId, java.lang.String fileName, AsyncCallback<FileTypes.Info> asyncCallback, InvocationConfig invocationConfig)
File
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
Information about the file.
Operation Errors:
NotFound
- if the update session doesn't exist.
InvalidArgument
- if the file doesn't exist in the library item associated with the update
session.
Unauthorized
- if you do not have all of the privileges described as follows:
com.vmware.content.library.Item
referenced by the parameter
libraryItemId
requires System.Read
. get
in interface File
updateSessionId
- Identifier of the update session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.fileName
- Name of the file.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.