Example usage for com.amazonaws.services.glacier.transfer UploadResult UploadResult

List of usage examples for com.amazonaws.services.glacier.transfer UploadResult UploadResult

Introduction

In this page you can find the example usage for com.amazonaws.services.glacier.transfer UploadResult UploadResult.

Prototype

public UploadResult(String archiveId) 

Source Link

Document

Constructs a new UploadResult with the specified archive ID.

Usage

From source file:com.splunk.shuttl.archiver.filesystem.glacier.FakeArchiveTransferManager.java

License:Apache License

@Override
public UploadResult upload(String accountId, String vaultName, String archiveDescription, File file)
        throws AmazonServiceException, AmazonClientException, FileNotFoundException {
    copyFileToManagedDirectory(file);/* w w w  .ja v  a 2 s  . c  o m*/
    UUID uuid = storeUuidForFile(file);
    return new UploadResult(uuid.toString());
}

From source file:org.finra.herd.dao.impl.MockGlacierOperationsImpl.java

License:Apache License

@Override
public UploadResult upload(String vaultName, String archiveDescription, File file,
        ArchiveTransferManager archiveTransferManager) throws AmazonClientException, FileNotFoundException {
    if (vaultName.equals(MOCK_GLACIER_VAULT_NAME_SERVICE_EXCEPTION)) {
        throw new AmazonServiceException(null);
    }/*from   w ww. j ava  2s .  com*/

    return new UploadResult(MOCK_GLACIER_ARCHIVE_ID);
}