Java Code Examples for microsoft.exchange.webservices.data.core.ExchangeService#bindToItem()

The following examples show how to use microsoft.exchange.webservices.data.core.ExchangeService#bindToItem() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MeetingResponse.java    From ews-java-api with MIT License 3 votes vote down vote up
/**
 * 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;
  }
}
 
Example 2
Source File: MeetingCancellation.java    From ews-java-api with MIT License 3 votes vote down vote up
/**
 * 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;
  }
}
 
Example 3
Source File: MeetingRequest.java    From ews-java-api with MIT License 3 votes vote down vote up
/**
 * 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;
  }
}
 
Example 4
Source File: MeetingMessage.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 5
Source File: PostItem.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 6
Source File: Item.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 7
Source File: Task.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 8
Source File: Contact.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 9
Source File: EmailMessage.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);

}
 
Example 10
Source File: ContactGroup.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example 11
Source File: Appointment.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * 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);
}