1

我在 Java 中使用 EWS API 进行 Exchange Server 通信。我已经订阅了带有日历文件夹流订阅的 Exchange 服务器。创建会议并将其发送给我时,我会收到通知。我想知道,我是否可以在代码中学习isRecurring本次会议的数据。当我使用getUserAvailability服务时,它会提供这些数据。我也可以在我的结构中得到它吗?

对于ItemEvents

// Now retrieve the Subject property of all the new mails in one call to EWS
ServiceResponseCollection<GetItemResponse> responses = service.bindToItems(
                       newMailsIds,
                       new PropertySet(ItemSchema.Subject, ItemSchema.MimeContent, ItemSchema.Body));

System.out.println("count=======" + responses.getCount());

for(GetItemResponse response : responses)
{
  System.out.println("count=======" + response.getClass().getName());
  System.out.println("subject=======" + response.getItem().getSubject());
  System.out.println("body=======" + response.getItem().getBody());
  System.out.println("mimecontent=======" + response.getItem().getMimeContent().toString());

  //Iterator itr = response.getItem().getExtendedProperties().iterator();
  //while (itr.hasNext()) 
  //{
  //    System.out.println("ExtendedProperties=======" + itr.next().toString());
  //}
}
4

1 回答 1

0

由于您仅订阅 Calendar-Folder,因此您可以直接将其绑定到 Appointment 对象::

  Appointment appointment = Appointment.bind(service, itemEvent.getItemId() , 
                     new PropertySet( AppointmentSchema.Subject, AppointmentSchema.Body,AppointmentSchema.IsRecurring ) );
于 2013-11-13T08:34:26.607 回答