Package tigase.http.upload.store
Class DirectoryStore
- java.lang.Object
-
- tigase.http.upload.store.DirectoryStore
-
- All Implemented Interfaces:
Store
@Bean(name="store", parent=FileUploadComponent.class, active=true, exportable=true) public class DirectoryStore extends Object implements Store
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 long
count()
Returns number of elements in storeReadableByteChannel
getContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename)
Method to retrieve content of file from slotprotected Path
prepareSlotPath(tigase.xmpp.jid.BareJID uploader, String slotId)
void
remove(tigase.xmpp.jid.BareJID uploader, String slotId)
Method removes content of slotprotected void
removeWithContent(Path path)
void
setContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename, long size, ReadableByteChannel source)
Method to set content of file to slotvoid
setPath(String path)
long
size()
Returns size used by store
-
-
-
Method Detail
-
setPath
public void setPath(String path)
-
count
public long count() throws IOException
Description copied from interface:Store
Returns number of elements in store- Specified by:
count
in interfaceStore
- Throws:
IOException
-
size
public long size() throws IOException
Description copied from interface:Store
Returns size used by store- Specified by:
size
in interfaceStore
- Throws:
IOException
-
getContent
public ReadableByteChannel getContent(tigase.xmpp.jid.BareJID uploader, String slotId, String filename) throws IOException
Description copied from interface:Store
Method to retrieve content of file from slot- Specified by:
getContent
in 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:Store
Method to set content of file to slot- Specified by:
setContent
in interfaceStore
- Throws:
IOException
-
remove
public void remove(tigase.xmpp.jid.BareJID uploader, String slotId)
Description copied from interface:Store
Method removes content of slot
-
removeWithContent
protected void removeWithContent(Path path)
-
-