Search in sources :

Example 1 with ExchangeEWSFreeBusyProvider

use of com.zimbra.cs.fb.ExchangeEWSFreeBusyProvider in project zm-mailbox by Zimbra.

the class GetAllFreeBusyProviders method handle.

public Element handle(Element request, Map<String, Object> context) throws ServiceException {
    ZimbraSoapContext zsc = getZimbraSoapContext(context);
    // allow only system admin for now
    checkRight(zsc, context, null, Admin.R_getAllFreeBusyProviders);
    Element response = zsc.createElement(AdminConstants.GET_ALL_FREE_BUSY_PROVIDERS_RESPONSE);
    for (FreeBusyProvider prov : FreeBusyProvider.getProviders()) {
        if (!(prov instanceof ExchangeEWSFreeBusyProvider)) {
            Element provElem = response.addElement(AdminConstants.E_PROVIDER);
            provElem.addAttribute(AdminConstants.A_NAME, prov.getName());
            provElem.addAttribute(AdminConstants.A_PROPAGATE, prov.registerForMailboxChanges());
            provElem.addAttribute(AdminConstants.A_START, prov.cachedFreeBusyStartTime());
            provElem.addAttribute(AdminConstants.A_END, prov.cachedFreeBusyEndTime());
            provElem.addAttribute(AdminConstants.A_QUEUE, prov.getQueueFilename());
            provElem.addAttribute(AdminConstants.A_PREFIX, prov.foreignPrincipalPrefix());
        }
    }
    return response;
}
Also used : ZimbraSoapContext(com.zimbra.soap.ZimbraSoapContext) ExchangeEWSFreeBusyProvider(com.zimbra.cs.fb.ExchangeEWSFreeBusyProvider) Element(com.zimbra.common.soap.Element) FreeBusyProvider(com.zimbra.cs.fb.FreeBusyProvider) ExchangeEWSFreeBusyProvider(com.zimbra.cs.fb.ExchangeEWSFreeBusyProvider)

Aggregations

Element (com.zimbra.common.soap.Element)1 ExchangeEWSFreeBusyProvider (com.zimbra.cs.fb.ExchangeEWSFreeBusyProvider)1 FreeBusyProvider (com.zimbra.cs.fb.FreeBusyProvider)1 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)1