use of com.zimbra.cs.account.soap.SoapProvisioning.MailboxInfo in project zm-mailbox by Zimbra.
the class ProvUtil method doGetMailboxInfo.
private void doGetMailboxInfo(String[] args) throws ServiceException {
if (!(prov instanceof SoapProvisioning)) {
throwSoapOnly();
}
SoapProvisioning sp = (SoapProvisioning) prov;
Account acct = lookupAccount(args[1]);
MailboxInfo info = sp.getMailbox(acct);
console.printf("mailboxId: %s\nquotaUsed: %d\n", info.getMailboxId(), info.getUsed());
}
use of com.zimbra.cs.account.soap.SoapProvisioning.MailboxInfo in project zm-mailbox by Zimbra.
the class TestJaxbProvisioning method testMailbox.
@Test
public void testMailbox() throws Exception {
ZimbraLog.test.debug("Starting test %s", testName());
Domain dom = ensureDomainExists(domain2);
assertNotNull("Domain for " + domain2, dom);
Account acct = prov.createAccount(testAcctEmail, TestUtil.DEFAULT_PASSWORD, null);
acct = ensureMailboxExists(testAcctEmail);
assertNotNull("Account for " + testAcctEmail, acct);
MailboxInfo mbx = prov.getMailbox(acct);
assertNotNull("MailboxInfo for Account=" + testAcctEmail, mbx);
prov.deleteAccount(acct.getId());
}
use of com.zimbra.cs.account.soap.SoapProvisioning.MailboxInfo in project zm-mailbox by Zimbra.
the class TestJaxbProvisioning method ensureMailboxExists.
public static Account ensureMailboxExists(String name) throws ServiceException {
SoapProvisioning prov = TestUtil.newSoapProvisioning();
Account acct = ensureAccountExists(name);
if (acct == null) {
ZimbraLog.test.debug("ensureMailboxExists returning null!!!");
} else {
// The act of getting a mailbox is sufficient to create it if the associated account exists.
// Note that prov.getAccount() USED TO implicitly created a mailbox even though it was not really
// supposed to and this routine used to rely on that.
MailboxInfo mboxInfo = prov.getMailbox(acct);
ZimbraLog.test.debug("ensureMailboxExists Returning Mailbox=%s Account=%s Id=%s", mboxInfo.getMailboxId(), acct.getName(), acct.getId());
}
return acct;
}
Aggregations