Java Code Examples for microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion#Exchange2007_SP1

The following examples show how to use microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion#Exchange2007_SP1 . 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: StartTimeZonePropertyDefinition.java    From ews-java-api with MIT License 6 votes vote down vote up
/**
 * Writes to XML.
 *
 * @param writer            the writer
 * @param propertyBag       the property bag
 * @param isUpdateOperation the is update operation
 * @throws Exception the exception
 */
public void writePropertyValueToXml(EwsServiceXmlWriter writer, PropertyBag propertyBag,
    boolean isUpdateOperation)
    throws Exception {
  Object value = propertyBag.getObjectFromPropertyDefinition(this);

  if (value != null) {
    final ExchangeService service = (ExchangeService) writer.getService();
    if (service.getRequestedServerVersion() == ExchangeVersion.Exchange2007_SP1) {
      if (!service.getExchange2007CompatibilityMode()) {
        MeetingTimeZone meetingTimeZone = new MeetingTimeZone((TimeZoneDefinition) value);
        meetingTimeZone.writeToXml(writer, XmlElementNames.MeetingTimeZone);
      }
    } else {
      super.writePropertyValueToXml(writer, propertyBag, isUpdateOperation);
    }
  }
}
 
Example 2
Source File: StartTimeZonePropertyDefinition.java    From ews-java-api with MIT License 5 votes vote down vote up
/**
 * Writes to XML.
 *
 * @param writer the writer
 * @throws XMLStreamException the XML stream exception
 * @throws ServiceXmlSerializationException the service xml serialization exception
 */
public void writeToXml(EwsServiceXmlWriter writer)
    throws XMLStreamException, ServiceXmlSerializationException {
  if (writer.getService().getRequestedServerVersion() == ExchangeVersion.Exchange2007_SP1) {
    AppointmentSchema.MeetingTimeZone.writeToXml(writer);
  } else {
    super.writeToXml(writer);
  }
}
 
Example 3
Source File: ServiceRequestBase.java    From ews-java-api with MIT License 5 votes vote down vote up
/**
 * Gets st ring representation of requested server version. In order to support E12 RTM servers,
 * ExchangeService has another flag indicating that we should use "Exchange2007" as the server version
 * string rather than Exchange2007_SP1.
 *
 * @return String representation of requested server version.
 */
private String getRequestedServiceVersionString() {
  if (this.service.getRequestedServerVersion() == ExchangeVersion.Exchange2007_SP1 && this.service
      .getExchange2007CompatibilityMode()) {
    return "Exchange2007";
  } else {
    return this.service.getRequestedServerVersion().toString();
  }
}
 
Example 4
Source File: TimeZoneDefinition.java    From ews-java-api with MIT License 4 votes vote down vote up
/**
 * Writes elements to XML.
 *
 * @param writer the writer
 * @throws Exception the exception
 */
@Override
public void writeElementsToXml(EwsServiceXmlWriter writer)
    throws Exception {
  // We only emit the full time zone definition against Exchange 2010
  // servers and above.
  if (writer.getService().getRequestedServerVersion() != ExchangeVersion.Exchange2007_SP1) {
    if (this.periods.size() > 0) {
      writer.writeStartElement(XmlNamespace.Types,
          XmlElementNames.Periods);

      Iterator<TimeZonePeriod> it = this.periods.values().iterator();
      while (it.hasNext()) {
        it.next().writeToXml(writer);
      }

      writer.writeEndElement(); // Periods
    }

    if (this.transitionGroups.size() > 0) {
      writer.writeStartElement(XmlNamespace.Types,
          XmlElementNames.TransitionsGroups);
      for (int i = 0; i < this.transitionGroups.size(); i++) {
        Object key[] = this.transitionGroups.keySet().toArray();
        this.transitionGroups.get(key[i]).writeToXml(writer);
      }
      writer.writeEndElement(); // TransitionGroups
    }

    if (this.transitions.size() > 0) {
      writer.writeStartElement(XmlNamespace.Types,
          XmlElementNames.Transitions);

      for (TimeZoneTransition transition : this.transitions) {
        transition.writeToXml(writer);
      }

      writer.writeEndElement(); // Transitions
    }
  }
}
 
Example 5
Source File: SyncFolderHierarchyRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 6
Source File: DeclineMeetingInvitationMessage.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 7
Source File: Contact.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 8
Source File: MeetingMessage.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 9
Source File: SendItemRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 10
Source File: AcceptMeetingInvitationMessage.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 11
Source File: DeleteAttachmentRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 12
Source File: ExpandGroupRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 13
Source File: CreateFolderRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version. Earliest Exchange version in which this request
 * is supported.
 *
 * @return the minimum required server version
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 14
Source File: FindFolderRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 15
Source File: RemoveFromCalendar.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 16
Source File: MeetingCancellation.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum required server version.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 17
Source File: CreateResponseObjectRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 18
Source File: CalendarFolder.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Obtains a list of appointments by searching the contents of this folder
 * and performing recurrence expansion.
 *
 * @return Earliest Exchange version in which this service object type is
 * supported.
 */
@Override public ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 19
Source File: UpdateFolderRequest.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the request version.
 *
 * @return Earliest Exchange version in which this request is supported.
 */
@Override
protected ExchangeVersion getMinimumRequiredServerVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}
 
Example 20
Source File: ServiceObjectPropertyDefinition.java    From ews-java-api with MIT License 2 votes vote down vote up
/**
 * Gets the minimum Exchange version that supports this property.
 *
 * @return The minimum Exchange version that supports this property.
 */
@Override
public ExchangeVersion getVersion() {
  return ExchangeVersion.Exchange2007_SP1;
}