Class S3Store

java.lang.Object
tigase.extras.http.upload.S3Store
All Implemented Interfaces:
tigase.http.upload.store.Store, tigase.kernel.beans.config.ConfigurationChangedAware

@Bean(name="store", active=true, exportable=true) public class S3Store extends Object implements tigase.http.upload.store.Store, tigase.kernel.beans.config.ConfigurationChangedAware
  • Field Details

    • s3

      protected com.amazonaws.services.s3.AmazonS3 s3
    • bucket

      @ConfigField(desc="S3 bucket") protected String bucket
    • autocreateBucket

      @ConfigField(desc="Autocreate bucket") protected boolean autocreateBucket
    • accessKeyId

      @ConfigField(desc="S3 access key id") protected String accessKeyId
    • secretKey

      @ConfigField(desc="S3 secret key") protected String secretKey
    • endpointUrl

      @ConfigField(desc="S3 endpoint url") protected String endpointUrl
    • pathStyleAccess

      @ConfigField(desc="AWS path style access") protected Boolean pathStyleAccess
    • signerOverride

      @ConfigField(desc="S3 signer override") protected String signerOverride
  • Constructor Details

    • S3Store

      public S3Store()
  • Method Details

    • getRegion

      public String getRegion()
    • setRegion

      public void setRegion(String region)
    • count

      public long count() throws IOException
      Specified by:
      count in interface tigase.http.upload.store.Store
      Throws:
      IOException
    • size

      public long size() throws IOException
      Specified by:
      size in interface tigase.http.upload.store.Store
      Throws:
      IOException
    • getContent

      public ReadableByteChannel getContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename) throws IOException
      Specified by:
      getContent in interface tigase.http.upload.store.Store
      Throws:
      IOException
    • setContent

      public void setContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename, long size, ReadableByteChannel source) throws IOException
      Specified by:
      setContent in interface tigase.http.upload.store.Store
      Throws:
      IOException
    • remove

      public void remove(tigase.xmpp.jid.BareJID uploader, String slotId) throws IOException
      Specified by:
      remove in interface tigase.http.upload.store.Store
      Throws:
      IOException
    • beanConfigurationChanged

      public void beanConfigurationChanged(Collection<String> collection)
      Specified by:
      beanConfigurationChanged in interface tigase.kernel.beans.config.ConfigurationChangedAware
    • createKeyPrefix

      protected String createKeyPrefix(String slotId)
    • createKey

      protected String createKey(String slotId, String filename)