indexing description: "Community retrieve wiki page reply message" author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_COMMUNITY_RETRIEVE_WIKI_PAGE_REPLY_MESSAGE inherit O_MESSAGE rename make as make_message redefine make_from_generic end O_COMMUNITY_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_title: like title; a_text: like text; a_private: like private) is -- Create. require a_title_valid: a_title /= Void and then not a_title.is_empty a_text_valid: a_text /= Void do make_message title := a_title text := a_text private := a_private ensure title_set: title = a_title text_set: text = a_text private_set: private = a_private 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 title := l_args.item (title_argument) text := l_args.item (text_argument) private := l_args.item (private_argument).to_boolean end feature -- Access namespace: STRING is -- Namespace of the message type. once Result := community_namespace end type: STRING is -- Type of the message. once Result := community_retrieve_wiki_page_reply_type end title: STRING -- Wiki title. text: STRING -- Wiki text. private: BOOLEAN -- Is wiki page private? arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (3) Result.force (title, title_argument) Result.force (text, text_argument) Result.force (private.out, private_argument) end feature {NONE} -- Implementation title_argument: STRING is "title" text_argument: STRING is "text" private_argument: STRING is "private" invariant title_valid: title /= Void and then not title.is_empty text_valid: text /= Void end