Search in sources :

Example 6 with DomainSelector

use of com.zimbra.soap.admin.type.DomainSelector in project zm-mailbox by Zimbra.

the class SoapProvisioning method getDomainInfo.

public Domain getDomainInfo(DomainBy keyType, String key) throws ServiceException {
    DomainSelector domSel = new DomainSelector(toJaxb(keyType), key);
    try {
        GetDomainInfoResponse resp = invokeJaxb(new GetDomainInfoRequest(domSel, null));
        DomainInfo domainInfo = resp.getDomain();
        return domainInfo == null ? null : new SoapDomain(domainInfo, this);
    } catch (ServiceException e) {
        if (e.getCode().equals(Constants.ERROR_CODE_NO_SUCH_DOMAIN))
            return null;
        else
            throw e;
    }
}
Also used : AccountServiceException(com.zimbra.cs.account.AccountServiceException) ServiceException(com.zimbra.common.service.ServiceException) DomainSelector(com.zimbra.soap.admin.type.DomainSelector) DomainInfo(com.zimbra.soap.admin.type.DomainInfo)

Example 7 with DomainSelector

use of com.zimbra.soap.admin.type.DomainSelector in project zm-mailbox by Zimbra.

the class TestCalendarMailSender method cleanUp.

public void cleanUp() throws Exception {
    TestUtil.deleteAccount(ORGANIZERACCT);
    TestUtil.deleteAccount(ATTENDEEACCT);
    TestUtil.deleteAccount(SYSRESOURCEACCT);
    TestUtil.deleteAccount(DIFFDOMAINACCT);
    Provisioning prov = Provisioning.getInstance();
    DomainSelector domSel = new DomainSelector(DomainBy.name, DIFFDOMAIN);
    Domain diffDomain = prov.get(domSel);
    if (diffDomain != null) {
        prov.deleteDomain(diffDomain.getId());
    }
}
Also used : DomainSelector(com.zimbra.soap.admin.type.DomainSelector) Domain(com.zimbra.cs.account.Domain) Provisioning(com.zimbra.cs.account.Provisioning)

Aggregations

DomainSelector (com.zimbra.soap.admin.type.DomainSelector)7 ServiceException (com.zimbra.common.service.ServiceException)5 SoapTransport (com.zimbra.common.soap.SoapTransport)3 Domain (com.zimbra.cs.account.Domain)3 CountObjectsRequest (com.zimbra.soap.admin.message.CountObjectsRequest)3 CountObjectsResponse (com.zimbra.soap.admin.message.CountObjectsResponse)3 Test (org.junit.Test)3 SoapFaultException (com.zimbra.common.soap.SoapFaultException)2 AccountServiceException (com.zimbra.cs.account.AccountServiceException)2 Provisioning (com.zimbra.cs.account.Provisioning)2 SoapTest (com.zimbra.qa.unittest.prov.soap.SoapTest)2 DomainInfo (com.zimbra.soap.admin.type.DomainInfo)2 UCService (com.zimbra.cs.account.UCService)1 AdminRight (com.zimbra.cs.account.accesscontrol.AdminRight)1 Bug (com.zimbra.qa.QA.Bug)1 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)1 AutoProvAccountRequest (com.zimbra.soap.admin.message.AutoProvAccountRequest)1 AutoProvAccountResponse (com.zimbra.soap.admin.message.AutoProvAccountResponse)1 GetDomainInfoRequest (com.zimbra.soap.admin.message.GetDomainInfoRequest)1 GetDomainInfoResponse (com.zimbra.soap.admin.message.GetDomainInfoResponse)1