microsoft.exchange.webservices.data
Class TimeWindow

java.lang.Object
  extended by microsoft.exchange.webservices.data.TimeWindow

public class TimeWindow
extends java.lang.Object

Represents a time period.


Constructor Summary
protected TimeWindow()
          Initializes a new instance of the "TimeWindow" class.
  TimeWindow(java.util.Date startTime, java.util.Date endTime)
          Initializes a new instance of the "TimeWindow" class.
 
Method Summary
protected  long getDuration()
          Gets the duration.
 java.util.Date getEndTime()
          Gets the end time.
 java.util.Date getStartTime()
          Gets the start time.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Loads from XML.
 void setEndTime(java.util.Date endTime)
          Sets the end time.
 void setStartTime(java.util.Date startTime)
          Sets the start time.
 void validate()
          Validates this instance.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName)
          Writes to XML.
protected  void writeToXmlUnscopedDatesOnly(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName)
          Writes to XML without scoping the dates and without emitting times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeWindow

protected TimeWindow()
Initializes a new instance of the "TimeWindow" class.


TimeWindow

public TimeWindow(java.util.Date startTime,
                  java.util.Date endTime)
Initializes a new instance of the "TimeWindow" class.

Parameters:
startTime - the start time
endTime - the end time
Method Detail

getStartTime

public java.util.Date getStartTime()
Gets the start time.

Returns:
the start time

setStartTime

public void setStartTime(java.util.Date startTime)
Sets the start time.

Parameters:
startTime - the new start time

getEndTime

public java.util.Date getEndTime()
Gets the end time.

Returns:
the end time

setEndTime

public void setEndTime(java.util.Date endTime)
Sets the end time.

Parameters:
endTime - the new end time

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                    throws java.lang.Exception
Loads from XML.

Parameters:
reader - the reader
Throws:
java.lang.Exception - the exception

writeToXmlUnscopedDatesOnly

protected void writeToXmlUnscopedDatesOnly(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                           java.lang.String xmlElementName)
                                    throws javax.xml.stream.XMLStreamException,
                                           ServiceXmlSerializationException
Writes to XML without scoping the dates and without emitting times.

Parameters:
writer - the writer
xmlElementName - the xml element name
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                          java.lang.String xmlElementName)
                   throws javax.xml.stream.XMLStreamException,
                          ServiceXmlSerializationException
Writes to XML.

Parameters:
writer - the writer
xmlElementName - the xml element name
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception

getDuration

protected long getDuration()
Gets the duration.

Returns:
the duration

validate

public void validate()
Validates this instance.