davmail.exchange
Class ExchangeSession.Event

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,String>
          extended by davmail.exchange.ExchangeSession.Item
              extended by davmail.exchange.ExchangeSession.Event
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>
Direct Known Subclasses:
DavExchangeSession.Event, EwsExchangeSession.Event
Enclosing class:
ExchangeSession

public abstract class ExchangeSession.Event
extends ExchangeSession.Item

Calendar event object.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
protected static String APPLICATION_ICS
           
protected  String contentClass
           
protected  String subject
           
protected static String TEXT_CALENDAR
           
protected  VCalendar vCalendar
           
 
Fields inherited from class davmail.exchange.ExchangeSession.Item
displayName, etag, folderPath, itemName, noneMatch, permanentUrl
 
Constructor Summary
protected ExchangeSession.Event()
           
  ExchangeSession.Event(String folderPath, String itemName, String contentClass, String itemBody, String etag, String noneMatch)
           
 
Method Summary
protected  org.apache.commons.httpclient.HttpException buildHttpException(Exception e)
           
 byte[] createMimeContent()
          Build Mime body for event or event message.
abstract  ExchangeSession.ItemResult createOrUpdate()
          Create or update item
protected  void dumpICS(String icsBody, boolean fromServer, boolean after)
           
protected  void fixICS(byte[] icsContent, boolean fromServer)
           
 String getBody()
          Retrieve item body from Exchange
protected  javax.mail.internet.MimePart getCalendarMimePart(javax.mail.internet.MimeMultipart multiPart)
           
 String getContentType()
          Return item content type
abstract  byte[] getEventContent()
          Retrieve item body from Exchange
protected  byte[] getICS(InputStream mimeInputStream)
          Load ICS content from MIME message input stream
protected  boolean isCalendarContentType(String contentType)
           
 
Methods inherited from class davmail.exchange.ExchangeSession.Item
getEtag, getHref, getName, setHref
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

contentClass

protected String contentClass

subject

protected String subject

vCalendar

protected VCalendar vCalendar

TEXT_CALENDAR

protected static final String TEXT_CALENDAR
See Also:
Constant Field Values

APPLICATION_ICS

protected static final String APPLICATION_ICS
See Also:
Constant Field Values
Constructor Detail

ExchangeSession.Event

public ExchangeSession.Event(String folderPath,
                             String itemName,
                             String contentClass,
                             String itemBody,
                             String etag,
                             String noneMatch)
                      throws IOException
Throws:
IOException

ExchangeSession.Event

protected ExchangeSession.Event()
Method Detail

getContentType

public String getContentType()
Description copied from class: ExchangeSession.Item
Return item content type

Specified by:
getContentType in class ExchangeSession.Item
Returns:
content type

getBody

public String getBody()
               throws IOException
Description copied from class: ExchangeSession.Item
Retrieve item body from Exchange

Specified by:
getBody in class ExchangeSession.Item
Returns:
item body
Throws:
org.apache.commons.httpclient.HttpException - on error
IOException

buildHttpException

protected org.apache.commons.httpclient.HttpException buildHttpException(Exception e)

getEventContent

public abstract byte[] getEventContent()
                                throws IOException
Retrieve item body from Exchange

Returns:
item content
Throws:
org.apache.commons.httpclient.HttpException - on error
IOException

isCalendarContentType

protected boolean isCalendarContentType(String contentType)

getCalendarMimePart

protected javax.mail.internet.MimePart getCalendarMimePart(javax.mail.internet.MimeMultipart multiPart)
                                                    throws IOException,
                                                           javax.mail.MessagingException
Throws:
IOException
javax.mail.MessagingException

getICS

protected byte[] getICS(InputStream mimeInputStream)
                 throws IOException,
                        javax.mail.MessagingException
Load ICS content from MIME message input stream

Parameters:
mimeInputStream - mime message input stream
Returns:
mime message ics attachment body
Throws:
IOException - on error
javax.mail.MessagingException - on error

fixICS

protected void fixICS(byte[] icsContent,
                      boolean fromServer)
               throws IOException
Throws:
IOException

dumpICS

protected void dumpICS(String icsBody,
                       boolean fromServer,
                       boolean after)

createMimeContent

public byte[] createMimeContent()
                         throws IOException
Build Mime body for event or event message.

Returns:
mimeContent as byte array or null
Throws:
IOException - on error

createOrUpdate

public abstract ExchangeSession.ItemResult createOrUpdate()
                                                   throws IOException
Create or update item

Returns:
action result
Throws:
IOException - on error


Copyright © 2001-2013 MickaĆ«l Guessant. All Rights Reserved.