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 Object
implements Store, tigase.kernel.beans.config.ConfigurationChangedAware
Created by andrzej on 08.08.2016.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeanConfigurationChanged(Collection<String> collection) longcount()Returns number of elements in storegetContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename) Method to retrieve content of file from slotprotected PathprepareSlotPath(tigase.xmpp.jid.BareJID uploader, String slotId) voidMethod removes content of slotprotected voidremoveWithContent(Path path) voidsetContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename, long size, ReadableByteChannel source) Method to set content of file to slotvoidlongsize()Returns size used by store
-
Constructor Details
-
DirectoryStore
public DirectoryStore()
-
-
Method Details
-
setPath
-
count
Description copied from interface:StoreReturns number of elements in store- Specified by:
countin interfaceStore- Throws:
IOException
-
size
Description copied from interface:StoreReturns size used by store- Specified by:
sizein interfaceStore- Throws:
IOException
-
getContent
public ReadableByteChannel getContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename) throws IOException Description copied from interface:StoreMethod to retrieve content of file from slot- Specified by:
getContentin interfaceStore- Throws:
IOException
-
setContent
public void setContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename, long size, ReadableByteChannel source) throws IOException Description copied from interface:StoreMethod to set content of file to slot- Specified by:
setContentin interfaceStore- Throws:
IOException
-
remove
Description copied from interface:StoreMethod removes content of slot -
beanConfigurationChanged
- Specified by:
beanConfigurationChangedin interfacetigase.kernel.beans.config.ConfigurationChangedAware
-
prepareSlotPath
-
removeWithContent
-