Search in sources :

Example 1 with ImportDataRequest

use of com.zimbra.soap.mail.message.ImportDataRequest in project zm-mailbox by Zimbra.

the class TestPurgeDataSource method refreshPop3Data.

private void refreshPop3Data() throws ServiceException, InterruptedException {
    ImportDataRequest req = new ImportDataRequest();
    DataSourceNameOrId popDs = new Pop3DataSourceNameOrId();
    popDs.setId(pop3DsId);
    List<DataSourceNameOrId> dsList = new LinkedList<DataSourceNameOrId>();
    dsList.add(popDs);
    req.setDataSources(dsList);
    mbox.invokeJaxb(req);
    waitUntilImportsFinish();
}
Also used : DataSourceNameOrId(com.zimbra.soap.mail.type.DataSourceNameOrId) Pop3DataSourceNameOrId(com.zimbra.soap.mail.type.Pop3DataSourceNameOrId) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) Pop3DataSourceNameOrId(com.zimbra.soap.mail.type.Pop3DataSourceNameOrId) ImportDataRequest(com.zimbra.soap.mail.message.ImportDataRequest) LinkedList(java.util.LinkedList)

Example 2 with ImportDataRequest

use of com.zimbra.soap.mail.message.ImportDataRequest in project zm-mailbox by Zimbra.

the class TestPurgeDataSource method refreshImapData.

private void refreshImapData() throws ServiceException, InterruptedException {
    ImportDataRequest req = new ImportDataRequest();
    DataSourceNameOrId imapDs1 = new ImapDataSourceNameOrId();
    imapDs1.setId(imapDsId1);
    DataSourceNameOrId imapDs2 = new ImapDataSourceNameOrId();
    imapDs2.setId(imapDsId2);
    List<DataSourceNameOrId> dsList = new LinkedList<DataSourceNameOrId>();
    dsList.add(imapDs1);
    dsList.add(imapDs2);
    req.setDataSources(dsList);
    mbox.invokeJaxb(req);
    waitUntilImportsFinish();
}
Also used : DataSourceNameOrId(com.zimbra.soap.mail.type.DataSourceNameOrId) Pop3DataSourceNameOrId(com.zimbra.soap.mail.type.Pop3DataSourceNameOrId) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) ImportDataRequest(com.zimbra.soap.mail.message.ImportDataRequest) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) LinkedList(java.util.LinkedList)

Example 3 with ImportDataRequest

use of com.zimbra.soap.mail.message.ImportDataRequest in project zm-mailbox by Zimbra.

the class TestTrashImapMessage method refreshImapData.

private void refreshImapData() throws ServiceException, InterruptedException {
    ImportDataRequest req = new ImportDataRequest();
    DataSourceNameOrId imapDs1 = new ImapDataSourceNameOrId();
    imapDs1.setId(imapDsId1);
    List<DataSourceNameOrId> dsList = new LinkedList<DataSourceNameOrId>();
    dsList.add(imapDs1);
    req.setDataSources(dsList);
    mbox.invokeJaxb(req);
    TestDataSource.waitUntilImportsFinish(mbox);
}
Also used : DataSourceNameOrId(com.zimbra.soap.mail.type.DataSourceNameOrId) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) ImportDataRequest(com.zimbra.soap.mail.message.ImportDataRequest) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) LinkedList(java.util.LinkedList)

Example 4 with ImportDataRequest

use of com.zimbra.soap.mail.message.ImportDataRequest in project zm-mailbox by Zimbra.

the class TestDataSource method refreshPop3DatasourceData.

public void refreshPop3DatasourceData(ZMailbox mbox, String dsId) throws ServiceException, InterruptedException {
    ImportDataRequest req = new ImportDataRequest();
    req.setDataSources(Lists.newArrayList((DataSourceNameOrId) ImapDataSourceNameOrId.createForId(dsId)));
    mbox.invokeJaxb(req);
    waitUntilImportsFinish(mbox);
}
Also used : DataSourceNameOrId(com.zimbra.soap.mail.type.DataSourceNameOrId) ImapDataSourceNameOrId(com.zimbra.soap.mail.type.ImapDataSourceNameOrId) ImportDataRequest(com.zimbra.soap.mail.message.ImportDataRequest)

Aggregations

ImportDataRequest (com.zimbra.soap.mail.message.ImportDataRequest)4 DataSourceNameOrId (com.zimbra.soap.mail.type.DataSourceNameOrId)4 ImapDataSourceNameOrId (com.zimbra.soap.mail.type.ImapDataSourceNameOrId)4 LinkedList (java.util.LinkedList)3 Pop3DataSourceNameOrId (com.zimbra.soap.mail.type.Pop3DataSourceNameOrId)2