Interface FileUploadRepository<DS extends tigase.db.DataSource>

    • 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.TigaseDBException
        Looks 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.TigaseDBException
        Removes metadata of expired slots
        Throws:
        tigase.db.TigaseDBException