indexing description: "User send message reply message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_USER_SEND_MESSAGE_REPLY_MESSAGE inherit O_MESSAGE rename make as make_message redefine make_from_generic end O_USER_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_recipient_email_address: like recipient_email_address; a_recipient_name: like recipient_name; a_sender_name: like sender_name) is -- Create. require a_recipient_email_address_ok: a_recipient_email_address /= Void and then not a_recipient_email_address.is_empty a_recipient_name_ok: a_recipient_name /= Void and then not a_recipient_name.is_empty a_sender_name_ok: a_sender_name /= Void and then not a_sender_name.is_empty do make_message recipient_email_address := a_recipient_email_address recipient_name := a_recipient_name sender_name := a_sender_name ensure recipient_email_address_set: recipient_email_address = a_recipient_email_address recipient_name_set: recipient_name = a_recipient_name sender_name_set: sender_name = a_sender_name end make_from_generic (a_msg: O_GENERIC_MESSAGE) is -- Create from a generic message. local l_args: HASH_TABLE [STRING, STRING] do Precursor (a_msg) l_args := a_msg.arguments recipient_email_address := l_args.item (recipient_email_address_argument) recipient_name := l_args.item (recipient_name_argument) sender_name := l_args.item (sender_name_argument) end feature -- Access namespace: STRING is -- Namespace of the message type. once Result := user_namespace end type: STRING is -- Type of the message. once Result := user_send_message_reply_type end recipient_email_address: STRING -- Mail address of recipient. recipient_name: STRING -- Name of recipient. sender_name: STRING -- Name of sender. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (3) Result.force (recipient_email_address.out, recipient_email_address_argument) Result.force (recipient_name.out, recipient_name_argument) Result.force (sender_name.out, sender_name_argument) end feature {NONE} -- Implementation recipient_email_address_argument: STRING is "recipient_email_address" recipient_name_argument: STRING is "recipient_name" sender_name_argument: STRING is "sender_name" invariant recipient_email_address_ok: recipient_email_address /= Void and then not recipient_email_address.is_empty recipient_name_ok: recipient_name /= Void and then not recipient_name.is_empty sender_name_ok: sender_name /= Void and then not sender_name.is_empty end