indexing description: "Project list of user message." author: "Rafael Bischof " date: "$Date$" revision: "$Revision$" class O_SYSTEM_MAIL_ALL_MESSAGE inherit O_SESSION_MESSAGE rename make as make_session redefine make_from_generic, arguments end O_SYSTEM_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_session: like session; a_subject: like subject; a_text: like text) is -- Create. require a_session_set: a_session /= Void and then not a_session.is_empty a_subject_set: a_subject /= Void and then not a_subject.is_empty a_text_set: a_text /= Void and then not a_text.is_empty do make_session (a_session) subject := a_subject text := a_text ensure subject_set: subject = a_subject text_set: text = a_text 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 subject := l_args.item (subject_argument) text := l_args.item (text_argument) end feature -- Access namespace: STRING is -- Namespace of the message type. once Result := system_namespace end type: STRING is -- Type of the message. once Result := system_mail_all_type end subject: STRING -- Subject of the mail. text: STRING -- Text of the mail. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (subject, subject_argument) Result.force (text, text_argument) end feature {NONE} -- Implementation subject_argument: STRING is "subject" text_argument: STRING is "text" invariant subject_set: subject /= Void and then not subject.is_empty text_set: text /= Void and then not text.is_empty end