Package com.backblaze.b2.client
Class B2StorageClientWebifierImpl
- java.lang.Object
-
- com.backblaze.b2.client.B2StorageClientWebifierImpl
-
- All Implemented Interfaces:
B2StorageClientWebifier,java.lang.AutoCloseable
public class B2StorageClientWebifierImpl extends java.lang.Object implements B2StorageClientWebifier
-
-
Constructor Summary
Constructors Constructor Description B2StorageClientWebifierImpl(B2WebApiClient webApiClient, java.lang.String userAgent, java.lang.String masterUrl, B2TestMode testModeOrNull)
-
Method Summary
-
-
-
Constructor Detail
-
B2StorageClientWebifierImpl
public B2StorageClientWebifierImpl(B2WebApiClient webApiClient, java.lang.String userAgent, java.lang.String masterUrl, B2TestMode testModeOrNull)
-
-
Method Detail
-
close
public void close()
Description copied from interface:B2StorageClientWebifierCloses this object and its underlying resources. This is overridden from AutoCloseable to declare that it can't throw any exception.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceB2StorageClientWebifier
-
authorizeAccount
public B2AccountAuthorization authorizeAccount(B2AuthorizeAccountRequest request) throws B2Exception
- Specified by:
authorizeAccountin interfaceB2StorageClientWebifier- Parameters:
request- the account authorization request.- Returns:
- an account authorization.
- Throws:
B2Exception- if there's any trouble. if it's a B2UnauthorizedException, the requestCategory will be set to ACCOUNT_AUTHORIZATION.
-
createBucket
public B2Bucket createBucket(B2AccountAuthorization accountAuth, B2CreateBucketRequestReal request) throws B2Exception
- Specified by:
createBucketin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
createKey
public B2CreatedApplicationKey createKey(B2AccountAuthorization accountAuth, B2CreateKeyRequestReal request) throws B2Exception
- Specified by:
createKeyin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listKeys
public B2ListKeysResponse listKeys(B2AccountAuthorization accountAuth, B2ListKeysRequestReal request) throws B2Exception
- Specified by:
listKeysin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
deleteKey
public B2ApplicationKey deleteKey(B2AccountAuthorization accountAuth, B2DeleteKeyRequest request) throws B2Exception
- Specified by:
deleteKeyin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listBuckets
public B2ListBucketsResponse listBuckets(B2AccountAuthorization accountAuth, B2ListBucketsRequest request) throws B2Exception
- Specified by:
listBucketsin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getUploadUrl
public B2UploadUrlResponse getUploadUrl(B2AccountAuthorization accountAuth, B2GetUploadUrlRequest request) throws B2Exception
- Specified by:
getUploadUrlin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getUploadPartUrl
public B2UploadPartUrlResponse getUploadPartUrl(B2AccountAuthorization accountAuth, B2GetUploadPartUrlRequest request) throws B2Exception
- Specified by:
getUploadPartUrlin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
uploadFile
public B2FileVersion uploadFile(B2UploadUrlResponse uploadUrlResponse, B2UploadFileRequest request) throws B2Exception
- Specified by:
uploadFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
copyFile
public B2FileVersion copyFile(B2AccountAuthorization accountAuth, B2CopyFileRequest request) throws B2Exception
- Specified by:
copyFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
uploadPart
public B2Part uploadPart(B2UploadPartUrlResponse uploadPartUrlResponse, B2UploadPartRequest request) throws B2Exception
- Specified by:
uploadPartin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
copyPart
public B2Part copyPart(B2AccountAuthorization accountAuth, B2CopyPartRequest request) throws B2Exception
- Specified by:
copyPartin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listFileVersions
public B2ListFileVersionsResponse listFileVersions(B2AccountAuthorization accountAuth, B2ListFileVersionsRequest request) throws B2Exception
- Specified by:
listFileVersionsin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listFileNames
public B2ListFileNamesResponse listFileNames(B2AccountAuthorization accountAuth, B2ListFileNamesRequest request) throws B2Exception
- Specified by:
listFileNamesin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listUnfinishedLargeFiles
public B2ListUnfinishedLargeFilesResponse listUnfinishedLargeFiles(B2AccountAuthorization accountAuth, B2ListUnfinishedLargeFilesRequest request) throws B2Exception
- Specified by:
listUnfinishedLargeFilesin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
startLargeFile
public B2FileVersion startLargeFile(B2AccountAuthorization accountAuth, B2StartLargeFileRequest request) throws B2Exception
- Specified by:
startLargeFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
finishLargeFile
public B2FileVersion finishLargeFile(B2AccountAuthorization accountAuth, B2FinishLargeFileRequest request) throws B2Exception
- Specified by:
finishLargeFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
listParts
public B2ListPartsResponse listParts(B2AccountAuthorization accountAuth, B2ListPartsRequest request) throws B2Exception
- Specified by:
listPartsin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
cancelLargeFile
public B2CancelLargeFileResponse cancelLargeFile(B2AccountAuthorization accountAuth, B2CancelLargeFileRequest request) throws B2Exception
- Specified by:
cancelLargeFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
downloadById
public void downloadById(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request, B2ContentSink handler) throws B2Exception
- Specified by:
downloadByIdin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getDownloadByIdUrl
public java.lang.String getDownloadByIdUrl(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request)
- Specified by:
getDownloadByIdUrlin interfaceB2StorageClientWebifier
-
downloadByName
public void downloadByName(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request, B2ContentSink handler) throws B2Exception
- Specified by:
downloadByNamein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getDownloadByNameUrl
public java.lang.String getDownloadByNameUrl(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request)
- Specified by:
getDownloadByNameUrlin interfaceB2StorageClientWebifier
-
deleteFileVersion
public B2DeleteFileVersionResponse deleteFileVersion(B2AccountAuthorization accountAuth, B2DeleteFileVersionRequest request) throws B2Exception
- Specified by:
deleteFileVersionin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getDownloadAuthorization
public B2DownloadAuthorization getDownloadAuthorization(B2AccountAuthorization accountAuth, B2GetDownloadAuthorizationRequest request) throws B2Exception
- Specified by:
getDownloadAuthorizationin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getFileInfo
public B2FileVersion getFileInfo(B2AccountAuthorization accountAuth, B2GetFileInfoRequest request) throws B2Exception
- Specified by:
getFileInfoin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getFileInfoByName
public B2FileVersion getFileInfoByName(B2AccountAuthorization accountAuth, B2GetFileInfoByNameRequest request) throws B2Exception
- Specified by:
getFileInfoByNamein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
hideFile
public B2FileVersion hideFile(B2AccountAuthorization accountAuth, B2HideFileRequest request) throws B2Exception
- Specified by:
hideFilein interfaceB2StorageClientWebifier- Throws:
B2Exception
-
updateBucket
public B2Bucket updateBucket(B2AccountAuthorization accountAuth, B2UpdateBucketRequest request) throws B2Exception
- Specified by:
updateBucketin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
deleteBucket
public B2Bucket deleteBucket(B2AccountAuthorization accountAuth, B2DeleteBucketRequestReal request) throws B2Exception
- Specified by:
deleteBucketin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
updateFileLegalHold
public B2UpdateFileLegalHoldResponse updateFileLegalHold(B2AccountAuthorization accountAuth, B2UpdateFileLegalHoldRequest request) throws B2Exception
- Specified by:
updateFileLegalHoldin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
updateFileRetention
public B2UpdateFileRetentionResponse updateFileRetention(B2AccountAuthorization accountAuth, B2UpdateFileRetentionRequest request) throws B2Exception
- Specified by:
updateFileRetentionin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
setBucketNotificationRules
public B2SetBucketNotificationRulesResponse setBucketNotificationRules(B2AccountAuthorization accountAuth, B2SetBucketNotificationRulesRequest request) throws B2Exception
- Specified by:
setBucketNotificationRulesin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
getBucketNotificationRules
public B2GetBucketNotificationRulesResponse getBucketNotificationRules(B2AccountAuthorization accountAuth, B2GetBucketNotificationRulesRequest request) throws B2Exception
- Specified by:
getBucketNotificationRulesin interfaceB2StorageClientWebifier- Throws:
B2Exception
-
-