Package tigase.http.upload.db
Class DummyFileUploadRepository
- java.lang.Object
-
- tigase.http.upload.db.DummyFileUploadRepository
-
- All Implemented Interfaces:
tigase.db.DataSourceAware
,FileUploadRepository
@Bean(name="repo", exportable=true, active=true) public class DummyFileUploadRepository extends Object implements FileUploadRepository
Created by andrzej on 08.08.2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DummyFileUploadRepository.Slot
-
Constructor Summary
Constructors Constructor Description DummyFileUploadRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DummyFileUploadRepository.Slot
allocateSlot(tigase.xmpp.jid.JID sender, String slotId, String filename, long filesize, String contentType)
Create slot in database for file upload.DummyFileUploadRepository.Slot
getSlot(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 slotsvoid
removeExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit)
Removes metadata of expired slotsvoid
setDataSource(tigase.db.DataSource dataSource)
void
updateSlot(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
public DummyFileUploadRepository.Slot allocateSlot(tigase.xmpp.jid.JID sender, String slotId, String filename, long filesize, String contentType) throws tigase.db.TigaseDBException
Description copied from interface:FileUploadRepository
Create slot in database for file upload.- Specified by:
allocateSlot
in interfaceFileUploadRepository
- Returns:
- slotId - may be changed by repository implementation
- Throws:
tigase.db.TigaseDBException
-
updateSlot
public void updateSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBException
Description copied from interface:FileUploadRepository
Looks for slot for particular sender with exact slot id, file name and file size- Specified by:
updateSlot
in interfaceFileUploadRepository
- Throws:
tigase.db.TigaseDBException
-
getSlot
public DummyFileUploadRepository.Slot getSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBException
Description copied from interface:FileUploadRepository
Retrieves information from database about slot- Specified by:
getSlot
in interfaceFileUploadRepository
- Throws:
tigase.db.TigaseDBException
-
listExpiredSlots
public List<FileUploadRepository.Slot> listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException
Description copied from interface:FileUploadRepository
Retrieves list of ids of expired slots- Specified by:
listExpiredSlots
in interfaceFileUploadRepository
- Throws:
tigase.db.TigaseDBException
-
removeExpiredSlots
public void removeExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException
Description copied from interface:FileUploadRepository
Removes metadata of expired slots- Specified by:
removeExpiredSlots
in interfaceFileUploadRepository
- Throws:
tigase.db.TigaseDBException
-
setDataSource
public void setDataSource(tigase.db.DataSource dataSource)
- Specified by:
setDataSource
in interfacetigase.db.DataSourceAware
-
-