Search in sources :

Example 1 with ZStatus

use of com.zimbra.client.ZInvite.ZStatus in project zm-mailbox by Zimbra.

the class ZAppointmentHit method modifyNotification.

@Override
public void modifyNotification(ZModifyEvent event) throws ServiceException {
    if (event instanceof ZModifyAppointmentEvent) {
        ZModifyAppointmentEvent mevent = (ZModifyAppointmentEvent) event;
        ZAppointment appt = (ZAppointment) mevent.getItem();
        mFlags = getStr(appt.getFlags(), mFlags);
        mTags = getStr(appt.getTagIds(), mTags);
        mFolderId = getStr(appt.getFolderId(), mFolderId);
        List<ZInvite> invites = appt.getInvites();
        if (invites.size() > 0) {
            ZInvite inv = invites.get(0);
            ZComponent comp = inv.getComponent();
            if (comp != null) {
                // just do task-related ones for now, as appts are handled differently
                ZStatus stat = comp.getStatus();
                if (stat != null)
                    mStatus = stat.name();
                mPercentComplete = getStr(comp.getPercentCompleted(), mPercentComplete);
                mPriority = getStr(comp.getPriority(), mPriority);
                mName = getStr(comp.getName(), mName);
                mLocation = getStr(comp.getLocation(), mLocation);
                if (comp.getCategories() != null)
                    mCategories = comp.getCategories();
                if (comp.getGeo() != null)
                    mGeo = comp.getGeo();
            }
        }
    }
}
Also used : ZComponent(com.zimbra.client.ZInvite.ZComponent) ZModifyAppointmentEvent(com.zimbra.client.event.ZModifyAppointmentEvent) ZStatus(com.zimbra.client.ZInvite.ZStatus)

Aggregations

ZComponent (com.zimbra.client.ZInvite.ZComponent)1 ZStatus (com.zimbra.client.ZInvite.ZStatus)1 ZModifyAppointmentEvent (com.zimbra.client.event.ZModifyAppointmentEvent)1