@Bean(name="repositoryPool",
parent=FileUploadComponent.class,
active=true,
exportable=true)
public class FileUploadRepositoryPool<R extends FileUploadRepository<tigase.db.DataSource>>
extends tigase.db.beans.MDRepositoryBean<R>
implements FileUploadRepository
| Modifier and Type | Class and Description |
|---|---|
static class |
FileUploadRepositoryPool.FileUploadRepositoryConfigBean |
tigase.db.beans.MDRepositoryBean.MDRepositoryConfigBean<A extends tigase.db.DataSourceAware>, tigase.db.beans.MDRepositoryBean.SelectorTypeFileUploadRepository.Slot| Constructor and Description |
|---|
FileUploadRepositoryPool() |
| Modifier and Type | Method and Description |
|---|---|
FileUploadRepository.Slot |
allocateSlot(tigase.xmpp.jid.JID sender,
String slotId,
String filename,
long filesize,
String contentType)
Create slot in database for file upload.
|
protected Class |
findClassForDataSource(tigase.db.DataSource dataSource) |
Class<?> |
getDefaultBeanClass() |
FileUploadRepository.Slot |
getSlot(tigase.xmpp.jid.BareJID sender,
String slotId)
Retrieves information from database about slot
|
List<FileUploadRepository.Slot> |
listExpiredSlots(tigase.xmpp.jid.BareJID domain,
LocalDateTime before,
int limit)
Retrieves list of ids of expired slots
|
void |
removeExpiredSlots(tigase.xmpp.jid.BareJID domain,
LocalDateTime before,
int limit)
Removes metadata of expired slots
|
void |
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
|
public FileUploadRepository.Slot allocateSlot(tigase.xmpp.jid.JID sender, String slotId, String filename, long filesize, String contentType) throws tigase.db.TigaseDBException
FileUploadRepositoryallocateSlot in interface FileUploadRepositorytigase.db.TigaseDBExceptionpublic void updateSlot(tigase.xmpp.jid.BareJID sender,
String slotId)
throws tigase.db.TigaseDBException
FileUploadRepositoryupdateSlot in interface FileUploadRepositorytigase.db.TigaseDBExceptionpublic FileUploadRepository.Slot getSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBException
FileUploadRepositorygetSlot in interface FileUploadRepositorytigase.db.TigaseDBExceptionpublic List<FileUploadRepository.Slot> listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException
FileUploadRepositorylistExpiredSlots in interface FileUploadRepositorytigase.db.TigaseDBExceptionpublic void removeExpiredSlots(tigase.xmpp.jid.BareJID domain,
LocalDateTime before,
int limit)
throws tigase.db.TigaseDBException
FileUploadRepositoryremoveExpiredSlots in interface FileUploadRepositorytigase.db.TigaseDBExceptionpublic void setDataSource(tigase.db.DataSource dataSource)
setDataSource in interface tigase.db.DataSourceAwarepublic Class<?> getDefaultBeanClass()
getDefaultBeanClass in interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClassprotected Class findClassForDataSource(tigase.db.DataSource dataSource) throws tigase.db.DBInitException
findClassForDataSource in class tigase.db.beans.MDRepositoryBean<R extends FileUploadRepository<tigase.db.DataSource>>tigase.db.DBInitExceptionCopyright © 2013–2021 Tigase. All rights reserved.