Package tigase.http.upload.store
Class DirectoryStore
- java.lang.Object
-
- tigase.http.upload.store.DirectoryStore
-
- All Implemented Interfaces:
Store,tigase.kernel.beans.config.ConfigurationChangedAware
@Bean(name="store", parent=FileUploadComponent.class, active=true, exportable=true) public class DirectoryStore extends java.lang.Object implements Store, tigase.kernel.beans.config.ConfigurationChangedAwareCreated by andrzej on 08.08.2016.
-
-
Constructor Summary
Constructors Constructor Description DirectoryStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeanConfigurationChanged(java.util.Collection<java.lang.String> collection)longcount()Returns number of elements in storejava.nio.channels.ReadableByteChannelgetContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename)Method to retrieve content of file from slotprotected java.nio.file.PathprepareSlotPath(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)voidremove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)Method removes content of slotprotected voidremoveWithContent(java.nio.file.Path path)voidsetContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename, long size, java.nio.channels.ReadableByteChannel source)Method to set content of file to slotvoidsetPath(java.lang.String path)longsize()Returns size used by store
-
-
-
Method Detail
-
setPath
public void setPath(java.lang.String path)
-
count
public long count() throws java.io.IOExceptionDescription copied from interface:StoreReturns number of elements in store
-
size
public long size() throws java.io.IOExceptionDescription copied from interface:StoreReturns size used by store
-
getContent
public java.nio.channels.ReadableByteChannel getContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename) throws java.io.IOExceptionDescription copied from interface:StoreMethod to retrieve content of file from slot- Specified by:
getContentin interfaceStore- 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.IOExceptionDescription copied from interface:StoreMethod to set content of file to slot- Specified by:
setContentin interfaceStore- Throws:
java.io.IOException
-
remove
public void remove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)Description copied from interface:StoreMethod removes content of slot
-
beanConfigurationChanged
public void beanConfigurationChanged(java.util.Collection<java.lang.String> collection)
- Specified by:
beanConfigurationChangedin interfacetigase.kernel.beans.config.ConfigurationChangedAware
-
prepareSlotPath
protected java.nio.file.Path prepareSlotPath(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)
-
removeWithContent
protected void removeWithContent(java.nio.file.Path path)
-
-