com.moyosoft.connector.ms.outlook.item
Class OutlookItem

java.lang.Object
  |
  +--com.moyosoft.connector.ms.outlook.item.OutlookItem
Direct Known Subclasses:
DefaultOutlookItem, OutlookAppointment, OutlookContact, OutlookDistributionList, OutlookDocument, OutlookJournal, OutlookMail, OutlookMeeting, OutlookNote, OutlookPost, OutlookRemoteItem, OutlookReport, OutlookTask, OutlookTaskRequest

public abstract class OutlookItem
extends java.lang.Object

Base class for any Outlook item, like a mail, contact or appointment.


Constructor Summary
OutlookItem()
           
OutlookItem(com.moyosoft.connector.com.Dispatch dispatch)
           
 
Method Summary
 OutlookItem copy()
          Make a copy of this item.
static OutlookItem create(com.moyosoft.connector.com.Dispatch dispatch)
           
 void delete()
          Delete this item.
 void deleteMapiProperty(byte[] guid, int propertyId)
          Deletes this item's MAPI property corresponding to the specified GUID and property ID.
 void deleteMapiProperty(int propertyTag)
          Deletes this item's MAPI property corresponding to the specified property tag.
 void display()
          Display this item in an Outlook window
 void display(boolean modal)
          Display this item in an Outlook window
 void dispose()
           
 boolean equals(java.lang.Object o)
          Two items are equals if they have the same ID (getItemId).
 java.util.Date getCreationTime()
           
 com.moyosoft.connector.com.Dispatch getDispatch()
           
 java.lang.String getEntryId()
           
 OutlookItemID getItemId()
          Return an unique identifier of this item.
 java.util.Date getLastModificationTime()
           
 LinksCollection getLinks()
          Returns a collection of OutlookLink objects
 java.lang.Object getMapiProperty(byte[] guid, int propertyId)
          Returns the value of this item's MAPI property corresponding to the specified GUID and property ID.
 java.lang.Object getMapiProperty(int propertyTag)
          Returns the value of this item's MAPI property corresponding to the specified property tag.
 OutlookFolder getParentFolder()
           
 PropertyAccessor getPropertyAccessor()
          Returns the PropertyAccessor object for this item.
abstract  OutlookItemType getType()
           
 OutlookItem move(OutlookFolder destinationFolder)
          Move this item to the specified folder.
 void printOut()
          Prints the item to the default printer
 void save()
          Save the changes performed on this item.
 void saveAs(java.io.File file)
          Save this item to the specified file.
 void saveAs(java.io.File file, SaveAsType type)
          Save this item to the specified file in the specified format.
 void saveAs(java.lang.String path)
          Deprecated. Please use the method saveAs(java.io.File) instead.
 void saveAs(java.lang.String path, SaveAsType type)
          Deprecated. Please use the method saveAs(java.io.File, SaveAsType) instead.
 void setMapiProperty(byte[] guid, int propertyId, java.lang.Object value)
          Sets the value of this item's MAPI property corresponding to the specified GUID and property ID.
 void setMapiProperty(int propertyTag, java.lang.Object value)
          Sets the value of this item's MAPI property corresponding to the specified property tag.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutlookItem

public OutlookItem()

OutlookItem

public OutlookItem(com.moyosoft.connector.com.Dispatch dispatch)
Method Detail

create

public static OutlookItem create(com.moyosoft.connector.com.Dispatch dispatch)

getDispatch

public com.moyosoft.connector.com.Dispatch getDispatch()

dispose

public void dispose()

getType

public abstract OutlookItemType getType()

getItemId

public OutlookItemID getItemId()
                        throws com.moyosoft.connector.com.ComponentObjectModelException
Return an unique identifier of this item.

Returns:
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

equals

public boolean equals(java.lang.Object o)
Two items are equals if they have the same ID (getItemId).

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:

getCreationTime

public java.util.Date getCreationTime()

getEntryId

public java.lang.String getEntryId()

getLastModificationTime

public java.util.Date getLastModificationTime()

delete

public void delete()
Delete this item.

Returns:
true if the operation was successful; false otherwise.
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

display

public void display()
Display this item in an Outlook window

Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if any COM error occurs

display

public void display(boolean modal)
Display this item in an Outlook window

Parameters:
modal - if true the window will be modal
Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if any COM error occurs

copy

public OutlookItem copy()
Make a copy of this item.

Returns:
the item's copy
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

move

public OutlookItem move(OutlookFolder destinationFolder)
Move this item to the specified folder.

Parameters:
destinationFolder - folder where to move this item
Returns:
the moved item
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

save

public void save()
Save the changes performed on this item.

Returns:
true if the operation was successful; false otherwise.
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

saveAs

public void saveAs(java.lang.String path)
Deprecated. Please use the method saveAs(java.io.File) instead.

Save this item to the specified file path.

Throws:
com.moyosoft.connector.com.ComponentObjectModelException

saveAs

public void saveAs(java.io.File file)
Save this item to the specified file.

Throws:
com.moyosoft.connector.com.ComponentObjectModelException

saveAs

public void saveAs(java.lang.String path,
                   SaveAsType type)
Deprecated. Please use the method saveAs(java.io.File, SaveAsType) instead.

Save this item to the specified file path in the specified format.

Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if the operation failed.

saveAs

public void saveAs(java.io.File file,
                   SaveAsType type)
Save this item to the specified file in the specified format.

Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if the operation failed.

getLinks

public LinksCollection getLinks()
                         throws com.moyosoft.connector.com.ComponentObjectModelException
Returns a collection of OutlookLink objects

Returns:
the collection of this item's linked items
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

getParentFolder

public OutlookFolder getParentFolder()

printOut

public void printOut()
Prints the item to the default printer

Throws:
com.moyosoft.connector.com.ComponentObjectModelException

getMapiProperty

public java.lang.Object getMapiProperty(byte[] guid,
                                        int propertyId)
Returns the value of this item's MAPI property corresponding to the specified GUID and property ID. Returns null if the property doesn't exist.
This method is only available in the Professional edition of Java Outlook Connector.


getMapiProperty

public java.lang.Object getMapiProperty(int propertyTag)
Returns the value of this item's MAPI property corresponding to the specified property tag. Returns null if the property doesn't exist.
This method is only available in the Professional edition of Java Outlook Connector.


setMapiProperty

public void setMapiProperty(byte[] guid,
                            int propertyId,
                            java.lang.Object value)
Sets the value of this item's MAPI property corresponding to the specified GUID and property ID.
This method is only available in the Professional edition of Java Outlook Connector.


setMapiProperty

public void setMapiProperty(int propertyTag,
                            java.lang.Object value)
Sets the value of this item's MAPI property corresponding to the specified property tag.
This method is only available in the Professional edition of Java Outlook Connector.


deleteMapiProperty

public void deleteMapiProperty(int propertyTag)
Deletes this item's MAPI property corresponding to the specified property tag.
This method is only available in the Professional edition of Java Outlook Connector.


deleteMapiProperty

public void deleteMapiProperty(byte[] guid,
                               int propertyId)
Deletes this item's MAPI property corresponding to the specified GUID and property ID.
This method is only available in the Professional edition of Java Outlook Connector.


getPropertyAccessor

public PropertyAccessor getPropertyAccessor()
Returns the PropertyAccessor object for this item. The PropertyAccessor handles direct access to this item's properties. Only Outlook 2007 or later supports the PropertyAccessor. With older Outlook versions, this method returns null. This method is only available in the Professional edition of Java Outlook Connector.