| java.lang.Object org.columba.mail.composer.MessageBuilderHelper
MessageBuilderHelper | public class MessageBuilderHelper (Code) | | The MessageBuilderHelper class is responsible for creating the
information for the ComposerModelclass.
It generates appropriate header-information, mimeparts and
quoted bodytext, etc.
These helper class is primarly used by the commands in org.columba.composer.command
author: fdietz, tstich |
addAddressesToAddressbook | public static void addAddressesToAddressbook(Address[] addresses)(Code) | | add automatically every person we'll send a message to the "Collected
Addresses" Addressbook
|
createBodyText | public static String createBodyText(MimePart mimePart) throws IOException(Code) | | create bodytext
Parameters: message - A Message which contains the bodytext of themessage we want reply/forward. |
createForwardSubject | public static String createForwardSubject(String subject)(Code) | | create Subject headerfield in using the senders message subject and
prepending "Fwd:" if not already there
Parameters: header - A ColumbaHeader which contains the headerfieldsof the message we want reply/forward.FIXME (@author fdietz): we need to i18n this! |
createMailingListHeaderItems | public static void createMailingListHeaderItems(Header header, ComposerModel model)(Code) | | Creates In-Reply-To and References headerfields. These are useful for
mailing-list threading.
Parameters: header - A Header which contains the headerfields of themessage we want reply/forward. Parameters: model - The ComposerModel we want to pass theinformation to.TODO (@author fdietz): if the References headerfield contains to manycharacters, we have to remove some of the first References, beforeappending another one. (RFC822 headerfields are not allowed to becomethat long) |
createQuotedBodyText | public static String createQuotedBodyText(CharSequence bodyText, boolean html) throws IOException(Code) | | prepend "> " characters to the bodytext to specify we are quoting
Parameters: message - A Message which contains the bodytext of themessage we want reply/forward. Parameters: html - True for html messages (a different quoting is necessary)TODO (@author fdietz): we should make this configureable |
createReplySubject | public static String createReplySubject(String subject)(Code) | | create subject headerfield in using the senders message subject and
prepending "Re:" if not already there
Parameters: header - A ColumbaHeader which contains the headerfieldsof the message we want reply/forward.FIXME (@author fdietz): we need to i18n this! |
createTo | public static String createTo(Header header)(Code) | | create a To headerfield in using the senders message Reply-To or From
headerfield
Parameters: header - A Header which contains the headerfields of themessage we want reply/forward. |
createToAll | public static String createToAll(Header header)(Code) | | This is for creating the "Reply To All recipients" To headerfield.
It is different from the createTo method in that it also
appends the recipients specified in the To headerfield
Parameters: header - A ColumbaHeader which contains the headerfieldsof the message we want reply/forward. |
createToMailinglist | public static String createToMailinglist(Header header)(Code) | | This method creates a To headerfield for the "Reply To MailingList"
action. It uses the X-BeenThere headerfield and falls back to Reply-To or
From if needed
Parameters: header - A Header which contains the headerfields of themessage we want reply/forward. |
getAccountItem | public static AccountItem getAccountItem(Integer accountUid)(Code) | | Search the correct Identity for replying to someone
|
isAlreadyReply | public static boolean isAlreadyReply(String subject, String pattern)(Code) | | Check if the subject headerfield already starts with a pattern like "Re:"
or "Fwd:"
Parameters: subject - A String containing the subject Parameters: pattern - A String specifying the pattern to search for. |
isHTMLEnabled | public static boolean isHTMLEnabled()(Code) | | Check if HTML support should be enabled in model.
true, if enabled. false, otherwise |
|
|