Package tigase.mongodb.http
Class MongoFileUploadRepository
java.lang.Object
tigase.mongodb.http.MongoFileUploadRepository
- All Implemented Interfaces:
tigase.db.DataSourceAware<MongoDataSource>,tigase.http.upload.db.FileUploadRepository<MongoDataSource>
public class MongoFileUploadRepository
extends Object
implements tigase.http.upload.db.FileUploadRepository<MongoDataSource>
Created by andrzej on 14.03.2017.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tigase.http.upload.db.FileUploadRepository
tigase.http.upload.db.FileUploadRepository.Slot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontigase.http.upload.db.FileUploadRepository.SlotallocateSlot(tigase.xmpp.jid.BareJID sender, String slotId, String filename, long filesize, String contentType) tigase.http.upload.db.FileUploadRepository.SlotlonggetUsedSpaceForDomain(String domain) longgetUsedSpaceForUser(tigase.xmpp.jid.BareJID user) List<tigase.http.upload.db.FileUploadRepository.Slot>listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) List<tigase.http.upload.db.FileUploadRepository.Slot>querySlots(String domain, String afterId, int limit) List<tigase.http.upload.db.FileUploadRepository.Slot>querySlots(tigase.xmpp.jid.BareJID user, String afterId, int limit) voidremoveExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) voidremoveSlot(tigase.xmpp.jid.BareJID user, String slotId) voidsetDataSource(MongoDataSource dataSource) voidupdateSlot(tigase.xmpp.jid.BareJID userJid, String slotId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.http.upload.db.FileUploadRepository
allocateSlot
-
Constructor Details
-
MongoFileUploadRepository
public MongoFileUploadRepository()
-
-
Method Details
-
allocateSlot
public tigase.http.upload.db.FileUploadRepository.Slot allocateSlot(tigase.xmpp.jid.BareJID sender, String slotId, String filename, long filesize, String contentType) throws tigase.db.TigaseDBException - Specified by:
allocateSlotin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
getSlot
public tigase.http.upload.db.FileUploadRepository.Slot getSlot(tigase.xmpp.jid.BareJID sender, String slotId) throws tigase.db.TigaseDBException - Specified by:
getSlotin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
listExpiredSlots
public List<tigase.http.upload.db.FileUploadRepository.Slot> listExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException - Specified by:
listExpiredSlotsin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
removeExpiredSlots
public void removeExpiredSlots(tigase.xmpp.jid.BareJID domain, LocalDateTime before, int limit) throws tigase.db.TigaseDBException - Specified by:
removeExpiredSlotsin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
getUsedSpaceForDomain
- Specified by:
getUsedSpaceForDomainin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
getUsedSpaceForUser
public long getUsedSpaceForUser(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBException - Specified by:
getUsedSpaceForUserin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
querySlots
public List<tigase.http.upload.db.FileUploadRepository.Slot> querySlots(tigase.xmpp.jid.BareJID user, String afterId, int limit) throws tigase.db.TigaseDBException - Specified by:
querySlotsin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
querySlots
public List<tigase.http.upload.db.FileUploadRepository.Slot> querySlots(String domain, String afterId, int limit) throws tigase.db.TigaseDBException - Specified by:
querySlotsin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
removeSlot
public void removeSlot(tigase.xmpp.jid.BareJID user, String slotId) throws tigase.db.TigaseDBException - Specified by:
removeSlotin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-
setDataSource
- Specified by:
setDataSourcein interfacetigase.db.DataSourceAware<MongoDataSource>
-
updateSlot
public void updateSlot(tigase.xmpp.jid.BareJID userJid, String slotId) throws tigase.db.TigaseDBException - Specified by:
updateSlotin interfacetigase.http.upload.db.FileUploadRepository<MongoDataSource>- Throws:
tigase.db.TigaseDBException
-