Search in sources :

Example 1 with CalendarResourceSelector

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

the class SoapProvisioning method get.

@Override
public CalendarResource get(CalendarResourceBy keyType, String key) throws ServiceException {
    try {
        GetCalendarResourceRequest req = new GetCalendarResourceRequest(new CalendarResourceSelector(SoapProvisioning.toJaxb(keyType), key));
        GetCalendarResourceResponse resp = invokeJaxb(req);
        return new SoapCalendarResource(resp.getCalResource(), this);
    } catch (ServiceException e) {
        if (e.getCode().equals(AccountServiceException.NO_SUCH_CALENDAR_RESOURCE))
            return null;
        else
            throw e;
    }
}
Also used : GetCalendarResourceResponse(com.zimbra.soap.admin.message.GetCalendarResourceResponse) GetCalendarResourceRequest(com.zimbra.soap.admin.message.GetCalendarResourceRequest) AccountServiceException(com.zimbra.cs.account.AccountServiceException) ServiceException(com.zimbra.common.service.ServiceException) CalendarResourceSelector(com.zimbra.soap.admin.type.CalendarResourceSelector)

Aggregations

ServiceException (com.zimbra.common.service.ServiceException)1 AccountServiceException (com.zimbra.cs.account.AccountServiceException)1 GetCalendarResourceRequest (com.zimbra.soap.admin.message.GetCalendarResourceRequest)1 GetCalendarResourceResponse (com.zimbra.soap.admin.message.GetCalendarResourceResponse)1 CalendarResourceSelector (com.zimbra.soap.admin.type.CalendarResourceSelector)1