/** * Loads from XML. * * @param reader the reader * @param propertyBag the property bag * @throws Exception the exception */ protected final void loadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag) throws Exception { MeetingTimeZone meetingTimeZone = new MeetingTimeZone(); meetingTimeZone.loadFromXml(reader, this.getXmlElement()); propertyBag.setObjectFromPropertyDefinition( AppointmentSchema.StartTimeZone, meetingTimeZone.toTimeZoneInfo()); }
/** * Writes to XML. * * @param writer the writer * @param propertyBag the property bag * @param isUpdateOperation the is update operation * @throws Exception the exception */ protected void writePropertyValueToXml( EwsServiceXmlWriter writer, PropertyBag propertyBag, boolean isUpdateOperation) throws Exception { MeetingTimeZone value = (MeetingTimeZone) propertyBag.getObjectFromPropertyDefinition(this); if (value != null) { value.writeToXml(writer, this.getXmlElement()); } }
/** * Writes the property value to XML. * * @param writer accepts EwsServiceXmlWriter * @param propertyBag accepts PropertyBag * @param isUpdateOperation accepts boolean whether the context is an update operation. * @throws Exception throws Exception */ protected void writePropertyValueToXml( EwsServiceXmlWriter writer, PropertyBag propertyBag, boolean isUpdateOperation) throws Exception { Object value = propertyBag.getObjectFromPropertyDefinition(this); if (value != null) { writer.writeStartElement(XmlNamespace.Types, getXmlElement()); // No need of changing the date time zone to UTC as Java takes // default timezone as UTC Date dateTime = (Date) value; writer.writeValue(EwsUtilities.dateTimeToXSDateTime(dateTime), getName()); writer.writeEndElement(); } }
/** * Loads from XML. * * @param reader the reader * @param propertyBag the property bag * @throws Exception the exception */ protected void loadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag) throws Exception { String value = reader.readElementValue(XmlNamespace.Types, getXmlElement()); propertyBag.setObjectFromPropertyDefinition( this, reader.getService().convertUniversalDateTimeStringToDate(value)); }