de.uplanet.lucy.server.businesslogic.exchange.util
Interface IExchangeItemUtil

All Known Implementing Classes:
ExchangeItemUtil

@Scriptable
public interface IExchangeItemUtil

Defines utility methods for working with MS Exchange mailbox items.

Version:
$Revision: 94237 $

Method Summary
 void addAttachmentToItem(java.lang.String p_strItemId, java.io.File p_file, java.lang.String p_strFileName, java.lang.String p_strMimeType, boolean p_bIsContactPhoto, boolean p_bDeleteAfter)
          Adds a file as attachment to an MS Exchange item.
 void addAttachmentToItem(java.lang.String p_strItemId, java.lang.String p_strFile, java.lang.String p_strFileName, java.lang.String p_strMimeType, boolean p_bIsContactPhoto, boolean p_bDeleteAfter)
          Adds a file as attachment to an MS Exchange item.
 void copyAttachmentToItem(java.lang.String p_strSrcAttId, java.lang.String p_strDstItemId, java.lang.String p_strFileName, boolean p_bIsContactPhoto)
          Copies an attachment from an item to another one.
 java.lang.String copyItemToFolder(java.lang.String p_strSourceId, java.lang.String p_strDstFldrHref)
          Copy an item to a folder.
 java.util.List<IAttachmentInfo> getAttachments(java.lang.String p_strItemId)
          Returns a list of AttachmentInfo instances for the item identified by the given ID.
 java.lang.String getMailboxOfItem(java.lang.String p_strItemId)
          Tries to determine the mailbox an item with the given ID/HREF belongs to.
 java.lang.String getPermanentID(java.lang.String p_strTableName, java.lang.String p_strId)
          Returns the permanent ID (e.g. value of field PermanentURL) of an item stored in the given table with the given ID.
 java.lang.String moveItemToFolder(java.lang.String p_strSourceId, java.lang.String p_strDstFldrHref)
          Move an item to a folder.
 void removeAttachmentFromItem(java.lang.String p_strAttachmentId)
          Removes an attachment from an item.
 void saveAttachment(IAttachmentInfo p_attachment, java.io.File p_fileDestination)
          Saves an attachment to the given destination file.
 void saveAttachment(IAttachmentInfo p_attachment, java.lang.String p_strFileDest)
          Saves an attachment to the given destination file.
 void saveAttachment(java.lang.String p_strId, java.io.File p_fileDestination)
          Saves an attachment to the given destination file.
 void saveAttachment(java.lang.String p_strId, java.lang.String p_strFileDest)
          Saves an attachment to the given destination file.
 

Method Detail

getPermanentID

java.lang.String getPermanentID(java.lang.String p_strTableName,
                                java.lang.String p_strId)
                                throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Returns the permanent ID (e.g. value of field PermanentURL) of an item stored in the given table with the given ID.

Parameters:
p_strTableName - The name of the table the item is stored in.
p_strId - The item ID value.
Returns:
The permanent URL or null if item was not found.
Throws:
ExchangeUtilException - If the operation failed.

getMailboxOfItem

java.lang.String getMailboxOfItem(java.lang.String p_strItemId)
                                  throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Tries to determine the mailbox an item with the given ID/HREF belongs to. This method is only available when using MS Exchange 2003-2007.

Parameters:
p_strItemId - The ID of the item.
Returns:
The item's mailbox or an empty string if it could not be determined.
Throws:
ExchangeUtilException - If the operation failed.

copyItemToFolder

java.lang.String copyItemToFolder(java.lang.String p_strSourceId,
                                  java.lang.String p_strDstFldrHref)
                                  throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Copy an item to a folder.

Parameters:
p_strSourceId - The ID of the item to copy.
p_strDstFldrHref - The HREF of the destination folder.
Returns:
The new item HREF or null if the operation failed.
Throws:
ExchangeUtilException - If the operation failed.

moveItemToFolder

java.lang.String moveItemToFolder(java.lang.String p_strSourceId,
                                  java.lang.String p_strDstFldrHref)
                                  throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Move an item to a folder.

Parameters:
p_strSourceId - The ID of the item to move.
p_strDstFldrHref - The HREF of the destination folder.
Returns:
The new item HREF or null if the operation failed.
Throws:
ExchangeUtilException - If the operation failed.

getAttachments

java.util.List<IAttachmentInfo> getAttachments(java.lang.String p_strItemId)
                                               throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Returns a list of AttachmentInfo instances for the item identified by the given ID. To get the content of an attachment, use saveAttachment(..).

Parameters:
p_strItemId - The ID of the item.
Returns:
A list of AttachmentInfo instances.
Throws:
ExchangeUtilException - If the operation failed.

saveAttachment

void saveAttachment(java.lang.String p_strId,
                    java.lang.String p_strFileDest)
                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Saves an attachment to the given destination file.

Parameters:
p_strId - The ID identifying the attachment.
p_strFileDest - The destination file to save the attachment.
Throws:
ExchangeUtilException - If the operation failed.

saveAttachment

void saveAttachment(java.lang.String p_strId,
                    java.io.File p_fileDestination)
                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Saves an attachment to the given destination file.

Parameters:
p_strId - The ID identifying the attachment.
p_fileDestination - The destination file to save the attachment.
Throws:
ExchangeUtilException - If the operation failed.

saveAttachment

void saveAttachment(IAttachmentInfo p_attachment,
                    java.lang.String p_strFileDest)
                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Saves an attachment to the given destination file.

Parameters:
p_attachment - The attachment object.
p_strFileDest - The destination file to save the attachment.
Throws:
ExchangeUtilException - If the operation failed.

saveAttachment

void saveAttachment(IAttachmentInfo p_attachment,
                    java.io.File p_fileDestination)
                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Saves an attachment to the given destination file.

Parameters:
p_attachment - The attachment object.
p_fileDestination - The destination file to save the attachment.
Throws:
ExchangeUtilException - If the operation failed.

addAttachmentToItem

void addAttachmentToItem(java.lang.String p_strItemId,
                         java.io.File p_file,
                         java.lang.String p_strFileName,
                         java.lang.String p_strMimeType,
                         boolean p_bIsContactPhoto,
                         boolean p_bDeleteAfter)
                         throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Adds a file as attachment to an MS Exchange item.

Parameters:
p_strItemId - The ID of the item to which the file will be attached.
p_file - The file to add as attachment.
p_strFileName - The name of the attachment.
p_strMimeType - The MIME type of the attachment, if empty application/octet-stream is used.
p_bIsContactPhoto - true if an image file should be attached to a contact, or false otherwise.
p_bDeleteAfter - true if the file should be deleted after it has been attached, or false otherwise.
Throws:
ExchangeUtilException - If the operation failed.

addAttachmentToItem

void addAttachmentToItem(java.lang.String p_strItemId,
                         java.lang.String p_strFile,
                         java.lang.String p_strFileName,
                         java.lang.String p_strMimeType,
                         boolean p_bIsContactPhoto,
                         boolean p_bDeleteAfter)
                         throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Adds a file as attachment to an MS Exchange item.

Parameters:
p_strItemId - The ID of the item to which the file will be attached.
p_strFile - The path of the file to add as attachment.
p_strFileName - The name of the attachment.
p_strMimeType - The MIME type of the attachment, if empty application/octet-stream is used.
p_bIsContactPhoto - true if an image file should be attached to a contact, or false otherwise.
p_bDeleteAfter - true if the file should be deleted after it has been attached, or false otherwise.
Throws:
ExchangeUtilException - If the operation failed.

copyAttachmentToItem

void copyAttachmentToItem(java.lang.String p_strSrcAttId,
                          java.lang.String p_strDstItemId,
                          java.lang.String p_strFileName,
                          boolean p_bIsContactPhoto)
                          throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Copies an attachment from an item to another one.

Parameters:
p_strSrcAttId - The source attachment ID.
p_strDstItemId - The destination item ID.
p_strFileName - The file name.
p_bIsContactPhoto - True, if content is a contact photo.
Throws:
ExchangeUtilException - If the operation failed.

removeAttachmentFromItem

void removeAttachmentFromItem(java.lang.String p_strAttachmentId)
                              throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Removes an attachment from an item.

Parameters:
p_strAttachmentId - The ID identifying the attachment.
Throws:
ExchangeUtilException - If the operation failed.


Last updated: 2012-07-06 09-36
Copyright © 2000-2012 United Planet. All Rights Reserved.