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