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:B2StorageClientWebifier
Closes this object and its underlying resources. This is overridden from AutoCloseable to declare that it can't throw any exception.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceB2StorageClientWebifier
-
authorizeAccount
public B2AccountAuthorization authorizeAccount(B2AuthorizeAccountRequest request) throws B2Exception
- Specified by:
authorizeAccount
in 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:
createBucket
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
createKey
public B2CreatedApplicationKey createKey(B2AccountAuthorization accountAuth, B2CreateKeyRequestReal request) throws B2Exception
- Specified by:
createKey
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listKeys
public B2ListKeysResponse listKeys(B2AccountAuthorization accountAuth, B2ListKeysRequestReal request) throws B2Exception
- Specified by:
listKeys
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
deleteKey
public B2ApplicationKey deleteKey(B2AccountAuthorization accountAuth, B2DeleteKeyRequest request) throws B2Exception
- Specified by:
deleteKey
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listBuckets
public B2ListBucketsResponse listBuckets(B2AccountAuthorization accountAuth, B2ListBucketsRequest request) throws B2Exception
- Specified by:
listBuckets
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getUploadUrl
public B2UploadUrlResponse getUploadUrl(B2AccountAuthorization accountAuth, B2GetUploadUrlRequest request) throws B2Exception
- Specified by:
getUploadUrl
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getUploadPartUrl
public B2UploadPartUrlResponse getUploadPartUrl(B2AccountAuthorization accountAuth, B2GetUploadPartUrlRequest request) throws B2Exception
- Specified by:
getUploadPartUrl
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
uploadFile
public B2FileVersion uploadFile(B2UploadUrlResponse uploadUrlResponse, B2UploadFileRequest request) throws B2Exception
- Specified by:
uploadFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
copyFile
public B2FileVersion copyFile(B2AccountAuthorization accountAuth, B2CopyFileRequest request) throws B2Exception
- Specified by:
copyFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
uploadPart
public B2Part uploadPart(B2UploadPartUrlResponse uploadPartUrlResponse, B2UploadPartRequest request) throws B2Exception
- Specified by:
uploadPart
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
copyPart
public B2Part copyPart(B2AccountAuthorization accountAuth, B2CopyPartRequest request) throws B2Exception
- Specified by:
copyPart
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listFileVersions
public B2ListFileVersionsResponse listFileVersions(B2AccountAuthorization accountAuth, B2ListFileVersionsRequest request) throws B2Exception
- Specified by:
listFileVersions
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listFileNames
public B2ListFileNamesResponse listFileNames(B2AccountAuthorization accountAuth, B2ListFileNamesRequest request) throws B2Exception
- Specified by:
listFileNames
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listUnfinishedLargeFiles
public B2ListUnfinishedLargeFilesResponse listUnfinishedLargeFiles(B2AccountAuthorization accountAuth, B2ListUnfinishedLargeFilesRequest request) throws B2Exception
- Specified by:
listUnfinishedLargeFiles
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
startLargeFile
public B2FileVersion startLargeFile(B2AccountAuthorization accountAuth, B2StartLargeFileRequest request) throws B2Exception
- Specified by:
startLargeFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
finishLargeFile
public B2FileVersion finishLargeFile(B2AccountAuthorization accountAuth, B2FinishLargeFileRequest request) throws B2Exception
- Specified by:
finishLargeFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
listParts
public B2ListPartsResponse listParts(B2AccountAuthorization accountAuth, B2ListPartsRequest request) throws B2Exception
- Specified by:
listParts
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
cancelLargeFile
public B2CancelLargeFileResponse cancelLargeFile(B2AccountAuthorization accountAuth, B2CancelLargeFileRequest request) throws B2Exception
- Specified by:
cancelLargeFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
downloadById
public void downloadById(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request, B2ContentSink handler) throws B2Exception
- Specified by:
downloadById
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getDownloadByIdUrl
public java.lang.String getDownloadByIdUrl(B2AccountAuthorization accountAuth, B2DownloadByIdRequest request)
- Specified by:
getDownloadByIdUrl
in interfaceB2StorageClientWebifier
-
downloadByName
public void downloadByName(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request, B2ContentSink handler) throws B2Exception
- Specified by:
downloadByName
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getDownloadByNameUrl
public java.lang.String getDownloadByNameUrl(B2AccountAuthorization accountAuth, B2DownloadByNameRequest request)
- Specified by:
getDownloadByNameUrl
in interfaceB2StorageClientWebifier
-
deleteFileVersion
public B2DeleteFileVersionResponse deleteFileVersion(B2AccountAuthorization accountAuth, B2DeleteFileVersionRequest request) throws B2Exception
- Specified by:
deleteFileVersion
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getDownloadAuthorization
public B2DownloadAuthorization getDownloadAuthorization(B2AccountAuthorization accountAuth, B2GetDownloadAuthorizationRequest request) throws B2Exception
- Specified by:
getDownloadAuthorization
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getFileInfo
public B2FileVersion getFileInfo(B2AccountAuthorization accountAuth, B2GetFileInfoRequest request) throws B2Exception
- Specified by:
getFileInfo
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getFileInfoByName
public B2FileVersion getFileInfoByName(B2AccountAuthorization accountAuth, B2GetFileInfoByNameRequest request) throws B2Exception
- Specified by:
getFileInfoByName
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
hideFile
public B2FileVersion hideFile(B2AccountAuthorization accountAuth, B2HideFileRequest request) throws B2Exception
- Specified by:
hideFile
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
updateBucket
public B2Bucket updateBucket(B2AccountAuthorization accountAuth, B2UpdateBucketRequest request) throws B2Exception
- Specified by:
updateBucket
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
deleteBucket
public B2Bucket deleteBucket(B2AccountAuthorization accountAuth, B2DeleteBucketRequestReal request) throws B2Exception
- Specified by:
deleteBucket
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
updateFileLegalHold
public B2UpdateFileLegalHoldResponse updateFileLegalHold(B2AccountAuthorization accountAuth, B2UpdateFileLegalHoldRequest request) throws B2Exception
- Specified by:
updateFileLegalHold
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
updateFileRetention
public B2UpdateFileRetentionResponse updateFileRetention(B2AccountAuthorization accountAuth, B2UpdateFileRetentionRequest request) throws B2Exception
- Specified by:
updateFileRetention
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
setBucketNotificationRules
public B2SetBucketNotificationRulesResponse setBucketNotificationRules(B2AccountAuthorization accountAuth, B2SetBucketNotificationRulesRequest request) throws B2Exception
- Specified by:
setBucketNotificationRules
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
getBucketNotificationRules
public B2GetBucketNotificationRulesResponse getBucketNotificationRules(B2AccountAuthorization accountAuth, B2GetBucketNotificationRulesRequest request) throws B2Exception
- Specified by:
getBucketNotificationRules
in interfaceB2StorageClientWebifier
- Throws:
B2Exception
-
-