Class GCPStorageImpl
java.lang.Object
org.webpieces.googlecloud.storage.impl.GCPStorageImpl
- All Implemented Interfaces:
GCPRawStorage,GCPStorage
Since tests mock rawStorage, changes to this class get included in testing.
THIS IS A GOOD THING ^^^^. Do not break people
-
Constructor Summary
ConstructorsConstructorDescriptionGCPStorageImpl(GCPRawStorage rawStorage, org.webpieces.util.context.ClientAssertions clientAssertions, ChannelWrapper channelWrapper) -
Method Summary
Modifier and TypeMethodDescriptioncopy(com.google.cloud.storage.Storage.CopyRequest copyRequest) booleancom.google.cloud.storage.Bucketcom.google.api.gax.paging.Page<GCPBlob>byte[]readAllBytes(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options) writer(com.google.cloud.storage.BlobInfo blobInfo, com.google.cloud.storage.Storage.BlobWriteOption... options)
-
Constructor Details
-
GCPStorageImpl
@Inject public GCPStorageImpl(GCPRawStorage rawStorage, org.webpieces.util.context.ClientAssertions clientAssertions, ChannelWrapper channelWrapper)
-
-
Method Details
-
get
public com.google.cloud.storage.Bucket get(String bucket, com.google.cloud.storage.Storage.BucketGetOption... options) - Specified by:
getin interfaceGCPRawStorage
-
get
public GCPBlob get(String bucket, String blob, com.google.cloud.storage.Storage.BlobGetOption... options) - Specified by:
getin interfaceGCPRawStorage
-
list
public com.google.api.gax.paging.Page<GCPBlob> list(String bucket, com.google.cloud.storage.Storage.BlobListOption... options) - Specified by:
listin interfaceGCPRawStorage
-
delete
public boolean delete(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options) - Specified by:
deletein interfaceGCPRawStorage
-
readAllBytes
public byte[] readAllBytes(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options) - Specified by:
readAllBytesin interfaceGCPRawStorage
-
reader
public ReadableByteChannel reader(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options) - Specified by:
readerin interfaceGCPRawStorage
-
writer
public WritableByteChannel writer(com.google.cloud.storage.BlobInfo blobInfo, com.google.cloud.storage.Storage.BlobWriteOption... options) - Specified by:
writerin interfaceGCPRawStorage
-
copy
- Specified by:
copyin interfaceGCPRawStorage
-