Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CopyInterface copy​(com.google.cloud.storage.Storage.CopyRequest copyRequest)  
      boolean delete​(java.lang.String bucket, java.lang.String blob, com.google.cloud.storage.Storage.BlobSourceOption... options)  
      com.google.cloud.storage.Bucket get​(java.lang.String bucket, com.google.cloud.storage.Storage.BucketGetOption... options)  
      GCPBlob get​(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.ReadableByteChannel reader​(java.lang.String bucket, java.lang.String blob, com.google.cloud.storage.Storage.BlobSourceOption... options)  
      java.nio.channels.WritableByteChannel writer​(com.google.cloud.storage.BlobInfo blobInfo, com.google.cloud.storage.Storage.BlobWriteOption... options)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        get in interface GCPRawStorage
      • get

        public GCPBlob get​(java.lang.String bucket,
                           java.lang.String blob,
                           com.google.cloud.storage.Storage.BlobGetOption... options)
        Specified by:
        get in interface GCPRawStorage
      • list

        public com.google.api.gax.paging.Page<GCPBlob> list​(java.lang.String bucket,
                                                            com.google.cloud.storage.Storage.BlobListOption... options)
        Specified by:
        list in interface GCPRawStorage
      • delete

        public boolean delete​(java.lang.String bucket,
                              java.lang.String blob,
                              com.google.cloud.storage.Storage.BlobSourceOption... options)
        Specified by:
        delete in interface GCPRawStorage
      • readAllBytes

        public byte[] readAllBytes​(java.lang.String bucket,
                                   java.lang.String blob,
                                   com.google.cloud.storage.Storage.BlobSourceOption... options)
        Specified by:
        readAllBytes in interface GCPRawStorage
      • reader

        public java.nio.channels.ReadableByteChannel reader​(java.lang.String bucket,
                                                            java.lang.String blob,
                                                            com.google.cloud.storage.Storage.BlobSourceOption... options)
        Specified by:
        reader in interface GCPRawStorage
      • writer

        public java.nio.channels.WritableByteChannel writer​(com.google.cloud.storage.BlobInfo blobInfo,
                                                            com.google.cloud.storage.Storage.BlobWriteOption... options)
        Specified by:
        writer in interface GCPRawStorage