Package tigase.extras.http.upload
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 java.lang.Object implements tigase.http.upload.store.Store, tigase.kernel.beans.config.ConfigurationChangedAware
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringaccessKeyIdprotected booleanautocreateBucketprotected java.lang.Stringbucketprotected java.lang.StringendpointUrlprotected java.lang.BooleanpathStyleAccessprotected com.amazonaws.services.s3.AmazonS3s3protected java.lang.StringsecretKeyprotected java.lang.StringsignerOverride
-
Constructor Summary
Constructors Constructor Description S3Store()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeanConfigurationChanged(java.util.Collection<java.lang.String> collection)longcount()protected java.lang.StringcreateKey(java.lang.String slotId, java.lang.String filename)protected java.lang.StringcreateKeyPrefix(java.lang.String slotId)java.nio.channels.ReadableByteChannelgetContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename)java.lang.StringgetRegion()voidremove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)voidsetContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename, long size, java.nio.channels.ReadableByteChannel source)voidsetRegion(java.lang.String region)longsize()
-
-
-
Field Detail
-
s3
protected com.amazonaws.services.s3.AmazonS3 s3
-
bucket
@ConfigField(desc="S3 bucket") protected java.lang.String bucket
-
autocreateBucket
@ConfigField(desc="Autocreate bucket") protected boolean autocreateBucket
-
accessKeyId
@ConfigField(desc="S3 access key id") protected java.lang.String accessKeyId
-
secretKey
@ConfigField(desc="S3 secret key") protected java.lang.String secretKey
-
endpointUrl
@ConfigField(desc="S3 endpoint url") protected java.lang.String endpointUrl
-
pathStyleAccess
@ConfigField(desc="AWS path style access") protected java.lang.Boolean pathStyleAccess
-
signerOverride
@ConfigField(desc="S3 signer override") protected java.lang.String signerOverride
-
-
Method Detail
-
getRegion
public java.lang.String getRegion()
-
setRegion
public void setRegion(java.lang.String region)
-
count
public long count() throws java.io.IOException- Specified by:
countin interfacetigase.http.upload.store.Store- Throws:
java.io.IOException
-
size
public long size() throws java.io.IOException- Specified by:
sizein interfacetigase.http.upload.store.Store- Throws:
java.io.IOException
-
getContent
public java.nio.channels.ReadableByteChannel getContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename) throws java.io.IOException- Specified by:
getContentin interfacetigase.http.upload.store.Store- Throws:
java.io.IOException
-
setContent
public void setContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename, long size, java.nio.channels.ReadableByteChannel source) throws java.io.IOException- Specified by:
setContentin interfacetigase.http.upload.store.Store- Throws:
java.io.IOException
-
remove
public void remove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId) throws java.io.IOException- Specified by:
removein interfacetigase.http.upload.store.Store- Throws:
java.io.IOException
-
beanConfigurationChanged
public void beanConfigurationChanged(java.util.Collection<java.lang.String> collection)
- Specified by:
beanConfigurationChangedin interfacetigase.kernel.beans.config.ConfigurationChangedAware
-
createKeyPrefix
protected java.lang.String createKeyPrefix(java.lang.String slotId)
-
createKey
protected java.lang.String createKey(java.lang.String slotId, java.lang.String filename)
-
-