Search in sources :

Example 6 with BlobInfo

use of com.zimbra.cs.store.file.BlobConsistencyChecker.BlobInfo in project zm-mailbox by Zimbra.

the class BlobConsistencyUtil method exportAndDelete.

private void exportAndDelete(SoapProvisioning prov, BlobConsistencyChecker.Results results) throws ServiceException {
    System.out.format("Deleting %d items from mailbox %d.\n", results.missingBlobs.size(), results.mboxId);
    ExportAndDeleteMailboxSpec mailbox = new ExportAndDeleteMailboxSpec(results.mboxId);
    ExportAndDeleteItemsRequest jaxbRequest = new ExportAndDeleteItemsRequest(exportDir, "mbox" + results.mboxId + "_", mailbox);
    for (BlobInfo blob : results.missingBlobs.values()) {
        mailbox.addItem(ExportAndDeleteItemSpec.createForIdAndVersion(blob.itemId, blob.version));
    }
    prov.invokeJaxb(jaxbRequest);
}
Also used : ExportAndDeleteItemsRequest(com.zimbra.soap.admin.message.ExportAndDeleteItemsRequest) BlobInfo(com.zimbra.cs.store.file.BlobConsistencyChecker.BlobInfo) ExportAndDeleteMailboxSpec(com.zimbra.soap.admin.type.ExportAndDeleteMailboxSpec)

Aggregations

BlobInfo (com.zimbra.cs.store.file.BlobConsistencyChecker.BlobInfo)6 DeliveryOptions (com.zimbra.cs.mailbox.DeliveryOptions)2 Mailbox (com.zimbra.cs.mailbox.Mailbox)2 ParsedMessage (com.zimbra.cs.mime.ParsedMessage)2 BlobConsistencyChecker (com.zimbra.cs.store.file.BlobConsistencyChecker)2 Results (com.zimbra.cs.store.file.BlobConsistencyChecker.Results)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 Element (com.zimbra.common.soap.Element)1 XMLElement (com.zimbra.common.soap.Element.XMLElement)1 Message (com.zimbra.cs.mailbox.Message)1 ExportAndDeleteItemsRequest (com.zimbra.soap.admin.message.ExportAndDeleteItemsRequest)1 ExportAndDeleteMailboxSpec (com.zimbra.soap.admin.type.ExportAndDeleteMailboxSpec)1 File (java.io.File)1