Package tigase.http.upload.db
Interface FileUploadRepository<DS extends tigase.db.DataSource>
-
- All Superinterfaces:
tigase.db.DataSourceAware<DS>
- All Known Implementing Classes:
DummyFileUploadRepository,FileUploadRepositoryPool,JDBCFileUploadRepository
public interface FileUploadRepository<DS extends tigase.db.DataSource> extends tigase.db.DataSourceAware<DS>Created by andrzej on 07.08.2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classFileUploadRepository.Slot
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FileUploadRepository.SlotallocateSlot(tigase.xmpp.jid.JID sender, String slotId, String filename, long filesize, String contentType)Create slot in database for file upload.FileUploadRepository.SlotgetSlot(tigase.xmpp.jid.BareJID sender, String slotId)Retrieves information from database about slotList<FileUploadRepository.Slot>listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit)Retrieves list of ids of expired slotsvoidremoveExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit)Removes metadata of expired slotsvoidupdateSlot(tigase.xmpp.jid.BareJID sender, String slotId)Looks for slot for particular sender with exact slot id, file name and file size
-
-
-
Method Detail
-
allocateSlot
FileUploadRepository.Slot allocateSlot(tigase.xmpp.jid.JID sender, String slotId, String filename, long filesize, String contentType) throws tigase.db.TigaseDBException
Create slot in database for file upload.- Parameters:
sender-slotId-filename-filesize-contentType-- Returns:
- slotId - may be changed by repository implementation
- Throws:
tigase.db.TigaseDBException
-
updateSlot
void updateSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBExceptionLooks for slot for particular sender with exact slot id, file name and file size- Parameters:
sender-slotId-- Throws:
tigase.db.TigaseDBException
-
getSlot
FileUploadRepository.Slot getSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBException
Retrieves information from database about slot- Throws:
tigase.db.TigaseDBException
-
listExpiredSlots
List<FileUploadRepository.Slot> listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException
Retrieves list of ids of expired slots- Throws:
tigase.db.TigaseDBException
-
removeExpiredSlots
void removeExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBExceptionRemoves metadata of expired slots- Throws:
tigase.db.TigaseDBException
-
-