de.uplanet.lucy.server.businesslogic.exchange.util.impl
Class ExchangeMessageUtil

java.lang.Object
  extended by de.uplanet.lucy.server.businesslogic.exchange.util.impl.ExchangeMessageUtil
All Implemented Interfaces:
IExchangeMessageUtil

@Scriptable
public final class ExchangeMessageUtil
extends java.lang.Object
implements IExchangeMessageUtil

Utility class for Exchange messages.

Version:
$Revision: 89488 $

Method Summary
 IExchangeMessage createNewDraft(java.lang.String p_strFrom, java.lang.String p_strTo, java.lang.String p_strSubject, java.lang.String p_strBody)
          Creates a new draft email message.
 IExchangeMessage findById(java.lang.String p_strId)
          Loads a message with the given ID.
 IExchangeMessage findByPermanentUrl(java.lang.String p_strPermUrl)
          Loads a message with the given permanent URL.
static IExchangeMessageUtil getInstance()
          Returns an instance initialized with a Exchange connection for the currently logged in user.
static IExchangeMessageUtil getInstance(java.sql.Connection p_conn)
          Returns an instance initialized with the given Exchange connection.
 void saveMessageAsEML(java.lang.String p_strMsgId, java.io.File p_fileDst)
          Saves an MS Exchange message item in the EML format to the given file.
 void saveMessageAsMSG(java.lang.String p_strMsgId, java.io.File p_fileDst)
          Saves an MS Exchange message item in the MSG format to the given file.
 void sendMessage(java.lang.String p_strItemId)
          Sends a message identified by the given ID.
 void setMessageRead(java.lang.String p_strItemId)
          Marks a message as read by setting the 'Read' flag to true.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IExchangeMessageUtil getInstance()
Returns an instance initialized with a Exchange connection for the currently logged in user.

Returns:
the instance

getInstance

public static IExchangeMessageUtil getInstance(java.sql.Connection p_conn)
Returns an instance initialized with the given Exchange connection.

Parameters:
p_conn - the MS Exchange connection
Returns:
the instance

createNewDraft

public IExchangeMessage createNewDraft(java.lang.String p_strFrom,
                                       java.lang.String p_strTo,
                                       java.lang.String p_strSubject,
                                       java.lang.String p_strBody)
                                throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Creates a new draft email message.

Specified by:
createNewDraft in interface IExchangeMessageUtil
Parameters:
p_strFrom - The sender email address.
p_strTo - The receiver email address.
p_strSubject - The message subject.
p_strBody - The message body.
Returns:
The IExchangeMessage instance.
Throws:
ExchangeUtilException - If message could not be created.

findById

public IExchangeMessage findById(java.lang.String p_strId)
                          throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Loads a message with the given ID.

Specified by:
findById in interface IExchangeMessageUtil
Parameters:
p_strId - The message ID.
Returns:
The IExchangeMessage instance.
Throws:
ExchangeUtilException

findByPermanentUrl

public IExchangeMessage findByPermanentUrl(java.lang.String p_strPermUrl)
                                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Loads a message with the given permanent URL.

Specified by:
findByPermanentUrl in interface IExchangeMessageUtil
Parameters:
p_strPermUrl - The permanent URL.
Returns:
The IExchangeMessage instance.
Throws:
ExchangeUtilException

saveMessageAsEML

public void saveMessageAsEML(java.lang.String p_strMsgId,
                             java.io.File p_fileDst)
                      throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Saves an MS Exchange message item in the EML format to the given file.

Specified by:
saveMessageAsEML in interface IExchangeMessageUtil
Parameters:
p_strMsgId - The ID identifying the message.
p_fileDst - The destination file.
Throws:
ExchangeUtilException - If the operation failed.

saveMessageAsMSG

public void saveMessageAsMSG(java.lang.String p_strMsgId,
                             java.io.File p_fileDst)
                      throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Saves an MS Exchange message item in the MSG format to the given file.

Specified by:
saveMessageAsMSG in interface IExchangeMessageUtil
Parameters:
p_strMsgId - the ID identifying the message
p_fileDst - The destination file.
Throws:
ExchangeUtilException - If the operation failed.

sendMessage

public void sendMessage(java.lang.String p_strItemId)
                 throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Sends a message identified by the given ID.

Specified by:
sendMessage in interface IExchangeMessageUtil
Parameters:
p_strItemId - The ID of the message.
Throws:
ExchangeUtilException - If the operation failed.

setMessageRead

public void setMessageRead(java.lang.String p_strItemId)
                    throws de.uplanet.lucy.server.businesslogic.exchange.util.ExchangeUtilException
Description copied from interface: IExchangeMessageUtil
Marks a message as read by setting the 'Read' flag to true.

Specified by:
setMessageRead in interface IExchangeMessageUtil
Parameters:
p_strItemId - The ID of the message.
Throws:
ExchangeUtilException - If the operation failed.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.