Compoze Software, Inc.

com.compoze.collab
Interface IAttachmentSupport

All Known Subinterfaces:
IDeliveryReport, IExchangeAppointment, IExchangeCalendarItem, IExchangeContact, IExchangeItem, IExchangeMessage, IExchangeNonDeliveryReport, IExchangeTask, IMeetingCancellation, IMeetingNotice, IMeetingNoticeAccepted, IMeetingNoticeDeclined, IMeetingNoticeTentative, IMeetingRequest, ITaskNotice, ITaskRequest

public interface IAttachmentSupport

Classes that implement this interface are items that are capable of having attachments added to and removed from them.


Field Summary
static Key ATTACHMENTS
          Represents the attachments on an item.
static Key HAS_ATTACHMENT
          Represents whether the message has attachments.
static int KEYID_ATTACHMENTS
          The int ID for the ATTACHMENTS key.
static int KEYID_HAS_ATTACHMENT
          The int ID for the HAS_ATTACHMENT key.
 
Method Summary
 IAttachment addAttachment(IAttachmentSource source)
          Adds an attachment to an item.
 IAttachment getAttachment(int iIndex)
          Gets an attachment from the item by its index.
 int getAttachmentCount()
          Gets the number of attachments on the item.
 IAttachment[] getAttachments()
          Gets an array of attachments on the message.
 boolean hasAttachment()
          Determines if the item has at least one attachment.
 

Field Detail

KEYID_ATTACHMENTS

public static final int KEYID_ATTACHMENTS
The int ID for the ATTACHMENTS key.

See Also:
Constant Field Values

KEYID_HAS_ATTACHMENT

public static final int KEYID_HAS_ATTACHMENT
The int ID for the HAS_ATTACHMENT key.

See Also:
Constant Field Values

ATTACHMENTS

public static final Key ATTACHMENTS
Represents the attachments on an item.


HAS_ATTACHMENT

public static final Key HAS_ATTACHMENT
Represents whether the message has attachments. This key is read-only.

Method Detail

addAttachment

public IAttachment addAttachment(IAttachmentSource source)
                          throws CollaborationException
Adds an attachment to an item.

Parameters:
source - the attachment source (not null)
Returns:
the attachment
Throws:
CollaborationException - if the attachment could not be added

getAttachment

public IAttachment getAttachment(int iIndex)
                          throws CollaborationException
Gets an attachment from the item by its index.

Parameters:
iIndex - the index of the attachment (>=0)
Throws:
InvalidArgumentException - if the specified index was out of range
CollaborationException - if the attachment could not be retrieved

getAttachmentCount

public int getAttachmentCount()
                       throws CollaborationException
Gets the number of attachments on the item.

Returns:
the attachment count (>0)
Throws:
CollaborationException - if the attachment count could not be retrieved

getAttachments

public IAttachment[] getAttachments()
                             throws CollaborationException
Gets an array of attachments on the message.

Returns:
the array of attachments (an empty array if there are none)
Throws:
CollaborationException - if the attachments could not be retrieved

hasAttachment

public boolean hasAttachment()
                      throws CollaborationException
Determines if the item has at least one attachment.

Returns:
true if the item has at least one attachment, false otherwise
Throws:
CollaborationException - if the attachment status could not be determined

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.