@ThreadSafe public class ContentManager extends Object
ContentManager
provides a simple API for uploading and downloading
documents to/from Amazon WorkDocs easily.
ContentManager
, like all the client classes in the AWS SDK for Java, is thread safe.
In order to use ContentManager
:
AWSStaticCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()); AmazonWorkDocs client = AmazonWorkDocsClient.builder().withCredentials(credentialsProvider).withRegion(Regions.REGION).build(); ContentManager contentManager = ContentManagerBuilder.standard().withWorkDocsClient(client).withAuthenticationToken(authenticationToken).build(); GetDocumentStreamRequest request = new GetDocumentStreamRequest(); request.setDocumentId("doc-id"); InputStream inputStream = contentManager.getDocumentStream(request).getStream();
Modifier and Type | Method and Description |
---|---|
GetDocumentStreamResult |
getDocumentStream(GetDocumentStreamRequest getDocumentStreamRequest)
Gets document stream from WorkDocs.
|
UploadDocumentStreamResult |
uploadDocumentStream(UploadDocumentStreamRequest uploadDocumentStreamRequest)
Uploads document stream to WorkDocs.
|
public GetDocumentStreamResult getDocumentStream(GetDocumentStreamRequest getDocumentStreamRequest)
getDocumentStreamRequest
- Request specifying parameters of the operation.public UploadDocumentStreamResult uploadDocumentStream(UploadDocumentStreamRequest uploadDocumentStreamRequest)
uploadDocumentStreamRequest
- Request specifying parameters of the operation.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.