/** * Binds to an existing contact and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A Contact instance representing the contact corresponding to the * specified Id. * @throws Exception the exception */ public static Contact bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Contact.class, id, propertySet); }
/** * Binds to an existing appointment and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An Appointment instance representing the appointment * corresponding to the specified Id. * @throws Exception the exception */ public static Appointment bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Appointment.class, id, propertySet); }
/** * Binds to an existing item, whatever its actual type is, and loads the * specified set of property. Calling this method results in a call to * EWS. * * @param service The service to use to bind to the item. * @param id The Id of the item to bind to. * @param propertySet The set of property to load. * @return An Item instance representing the item corresponding to the * specified Id. * @throws Exception the exception */ public static Item bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Item.class, id, propertySet); }
/** * Binds to an existing meeting message and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service The service to use to bind to the meeting message. * @param id The Id of the meeting message to bind to. * @param propertySet The set of property to load. * @return A MeetingMessage instance representing the meeting message * corresponding to the specified Id. * @throws Exception the exception */ public static MeetingMessage bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return (MeetingMessage) service.bindToItem(id, propertySet); }
/** * Binds to an existing contact group and loads the specified set of * property.Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A ContactGroup instance representing the contact group * corresponding to the specified Id * @throws Exception the exception */ public static ContactGroup bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(ContactGroup.class, id, propertySet); }
/** * Binds to an existing e-mail message and loads the specified set of * property.Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An EmailMessage instance representing the e-mail message * corresponding to the specified Id * @throws Exception the exception */ public static EmailMessage bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(EmailMessage.class, id, propertySet); }
/** * Binds to an existing post item and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An PostItem instance representing the post item corresponding to * the specified Id. * @throws Exception the exception */ public static PostItem bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(PostItem.class, id, propertySet); }
/** * Binds to an existing task and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A Task instance representing the task corresponding to the * specified Id. * @throws Exception the exception */ public static Task bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Task.class, id, propertySet); }
/** * Binds to an existing meeting response and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service The service to use to bind to the meeting response. * @param id The Id of the meeting response to bind to. * @param propertySet The set of property to load. * @return A MeetingResponse instance representing the meeting response * corresponding to the specified Id. */ public static MeetingResponse bind(ExchangeService service, ItemId id, PropertySet propertySet) { try { return service.bindToItem(MeetingResponse.class, id, propertySet); } catch (Exception e) { LOG.error(e); return null; } }
/** * Binds to an existing meeting response and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service The service to use to bind to the meeting request. * @param id The Id of the meeting request to bind to. * @param propertySet The set of property to load. * @return A MeetingResponse instance representing the meeting request * corresponding to the specified Id. */ public static MeetingRequest bind(ExchangeService service, ItemId id, PropertySet propertySet) { try { return service.bindToItem(MeetingRequest.class, id, propertySet); } catch (Exception e) { LOG.error(e); return null; } }
/** * Binds to an existing meeting cancellation message and loads the specified * set of property. Calling this method results in a call to EWS. * * @param service The service to use to bind to the meeting cancellation * message. * @param id The Id of the meeting cancellation message to bind to. * @param propertySet The set of property to load. * @return A MeetingCancellation instance representing the meeting * cancellation message corresponding to the specified Id. */ public static MeetingCancellation bind(ExchangeService service, ItemId id, PropertySet propertySet) { try { return service.bindToItem(MeetingCancellation.class, id, propertySet); } catch (Exception e) { LOG.error(e); return null; } }
/** * Bind to item. * * @param <TItem> The type of the item. * @param c the c * @param itemId the item id * @param propertySet the property set * @return the t item * @throws Exception the exception */ public <TItem extends Item> TItem bindToItem(Class<TItem> c, ItemId itemId, PropertySet propertySet) throws Exception { Item result = this.bindToItem(itemId, propertySet); if (c.isAssignableFrom(result.getClass())) { return (TItem) result; } else { throw new ServiceLocalException(String.format( "The item type returned by the service (%s) isn't compatible with the requested item type (%s).", result.getClass().getName(), c.getName())); } }
/** * Binds to an existing e-mail message and loads the specified set of * property.Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An EmailMessage instance representing the e-mail message * corresponding to the specified Id * @throws Exception the exception */ public static EmailMessage bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(EmailMessage.class, id, propertySet); }
/** * Binds to an existing contact group and loads the specified set of * property.Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A ContactGroup instance representing the contact group * corresponding to the specified Id * @throws Exception the exception */ public static ContactGroup bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(ContactGroup.class, id, propertySet); }
/** * Binds to an existing meeting message and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service The service to use to bind to the meeting message. * @param id The Id of the meeting message to bind to. * @param propertySet The set of property to load. * @return A MeetingMessage instance representing the meeting message * corresponding to the specified Id. * @throws Exception the exception */ public static MeetingMessage bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return (MeetingMessage) service.bindToItem(id, propertySet); }
/** * Binds to an existing item, whatever its actual type is, and loads the * specified set of property. Calling this method results in a call to * EWS. * * @param service The service to use to bind to the item. * @param id The Id of the item to bind to. * @param propertySet The set of property to load. * @return An Item instance representing the item corresponding to the * specified Id. * @throws Exception the exception */ public static Item bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Item.class, id, propertySet); }
/** * Binds to an existing task and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A Task instance representing the task corresponding to the * specified Id. * @throws Exception the exception */ public static Task bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Task.class, id, propertySet); }
/** * Binds to an existing appointment and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An Appointment instance representing the appointment * corresponding to the specified Id. * @throws Exception the exception */ public static Appointment bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Appointment.class, id, propertySet); }
/** * Binds to an existing post item and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return An PostItem instance representing the post item corresponding to * the specified Id. * @throws Exception the exception */ public static PostItem bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(PostItem.class, id, propertySet); }
/** * Binds to an existing contact and loads the specified set of property. * Calling this method results in a call to EWS. * * @param service the service * @param id the id * @param propertySet the property set * @return A Contact instance representing the contact corresponding to the * specified Id. * @throws Exception the exception */ public static Contact bind(ExchangeService service, ItemId id, PropertySet propertySet) throws Exception { return service.bindToItem(Contact.class, id, propertySet); }