我在Java中使用EWS API进行Exchange Server通信。我订阅了Exchange服务器,并为Calendar文件夹添加了流订阅。我在创建会议并发送给我时收到通知。我想知道,如果我能在代码中学习此会议的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());
//}
}
答案 0 :(得分:0)
由于您只订阅了Calendar-Folder,因此您可以直接将其绑定到Appointment对象::
Appointment appointment = Appointment.bind(service, itemEvent.getItemId() ,
new PropertySet( AppointmentSchema.Subject, AppointmentSchema.Body,AppointmentSchema.IsRecurring ) );