public final class ModuleUploads.Async
extends java.lang.Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMAUpload> |
create(java.lang.String spaceId,
java.io.InputStream stream,
CMACallback<CMAUpload> callback)
Create a new upload, asynchronously.
|
CMACallback<java.lang.Integer> |
delete(java.lang.String spaceId,
java.lang.String uploadId,
CMACallback<java.lang.Integer> callback)
Delete a given upload again, asynchronously.
|
CMACallback<CMAUpload> |
fetchOne(java.lang.String spaceId,
java.lang.String uploadId,
CMACallback<CMAUpload> callback)
Get information about the given upload, asynchronously.
|
public CMACallback<CMAUpload> create(java.lang.String spaceId, java.io.InputStream stream, CMACallback<CMAUpload> callback)
Once an upload is created, you can use it in CMAClient#assets for creating an asset based on a local file.
spaceId - a nonnull id representing the space to add the upload to.stream - the actual binary representation of the upload. Cannot be null.callback - the callback to be informed about success or failure.java.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if file is null.java.lang.IllegalStateException - if something in the transmittal went wrong.public CMACallback<CMAUpload> fetchOne(java.lang.String spaceId, java.lang.String uploadId, CMACallback<CMAUpload> callback)
spaceId - which space is this upload hosted under?uploadId - what id does the upload have?callback - the callback to be informed about success or failure.java.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if uploadId is null.public CMACallback<java.lang.Integer> delete(java.lang.String spaceId, java.lang.String uploadId, CMACallback<java.lang.Integer> callback)
spaceId - space id of the upload.uploadId - id of the uploadcallback - the callback to be informed about success or failure.java.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if uploadId is null.Copyright © 2018 Contentful, GmbH.. All Rights Reserved.