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.ConfigurationChangedAware
Created 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 void
beanConfigurationChanged(java.util.Collection<java.lang.String> collection)
long
count()
Returns number of elements in storejava.nio.channels.ReadableByteChannel
getContent(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId, java.lang.String filename)
Method to retrieve content of file from slotprotected java.nio.file.Path
prepareSlotPath(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)
void
remove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)
Method removes content of slotprotected void
removeWithContent(java.nio.file.Path path)
void
setContent(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 slotvoid
setPath(java.lang.String path)
long
size()
Returns size used by store
-
-
-
Method Detail
-
setPath
public void setPath(java.lang.String path)
-
count
public long count() throws java.io.IOException
Description copied from interface:Store
Returns number of elements in store
-
size
public long size() throws java.io.IOException
Description copied from interface:Store
Returns 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.IOException
Description copied from interface:Store
Method to retrieve content of file from slot- Specified by:
getContent
in 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.IOException
Description copied from interface:Store
Method to set content of file to slot- Specified by:
setContent
in interfaceStore
- Throws:
java.io.IOException
-
remove
public void remove(tigase.xmpp.jid.BareJID uploader, java.lang.String slotId)
Description copied from interface:Store
Method removes content of slot
-
beanConfigurationChanged
public void beanConfigurationChanged(java.util.Collection<java.lang.String> collection)
- Specified by:
beanConfigurationChanged
in 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)
-
-