Interface AttachmentRecycleBinContentStore


  • @Role
    public interface AttachmentRecycleBinContentStore
    Store the content of a deleted attachment.
    Since:
    9.10RC1
    Version:
    $Id: 40d47a9126e6e74b8a1afca1e152922b2728ff0e $
    • Method Detail

      • getHint

        String getHint()
        Returns:
        the hint of the component
      • save

        void save​(XWikiAttachment attachment,
                  Date deleteDate,
                  long index,
                  boolean bTransaction)
           throws XWikiException
        Save attachment to recycle bin.
        Parameters:
        attachment - the attachment to save
        deleteDate - the date of the delete
        index - the index of the deleted attachment
        bTransaction - indicate if the store should use old transaction(false) or create new (true)
        Throws:
        XWikiException - if error in saving
      • get

        DeletedAttachmentContent get​(AttachmentReference reference,
                                     Date deleteDate,
                                     long index,
                                     boolean bTransaction)
                              throws XWikiException
        Parameters:
        reference - the reference of the deleted attachment
        deleteDate - the date of the delete
        index - the index of the deleted attachment
        bTransaction - indicate if the store should use old transaction(false) or create new (true)
        Returns:
        specified deleted attachment from recycle bin. null if not found.
        Throws:
        XWikiException - if error while loading
      • delete

        void delete​(AttachmentReference reference,
                    Date deleteDate,
                    long index,
                    boolean bTransaction)
             throws XWikiException
        Permanently delete attachment content from recycle bin.
        Parameters:
        reference - the reference of the deleted attachment
        deleteDate - the date of the delete
        index - the index of the deleted attachment
        bTransaction - indicate if the store should use old transaction(false) or create new (true)
        Throws:
        XWikiException - if any error