indexing description: "Community rename wiki page message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_COMMUNITY_RENAME_WIKI_PAGE_MESSAGE inherit O_SESSION_MESSAGE rename make as make_session redefine make_from_generic, arguments end O_COMMUNITY_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_session: like session; a_community_name: like community_name; an_old_title: like old_title; a_new_title: like new_title) is -- Create. require a_session_ok: a_session /= Void and then not a_session.is_empty a_community_name_ok: a_community_name /= Void and then not a_community_name.is_empty an_old_title_ok: an_old_title /= Void and then not an_old_title.is_empty a_new_title_ok: a_new_title /= Void and then not a_new_title.is_empty do make_session (a_session) community_name := a_community_name old_title := an_old_title new_title := a_new_title ensure community_name_set: community_name = a_community_name old_title_set: old_title = an_old_title new_title_set: new_title = a_new_title 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 community_name := l_args.item (community_name_argument) old_title := l_args.item (old_title_argument) new_title := l_args.item (new_title_argument) 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_rename_wiki_page_type end community_name: STRING -- Community name. old_title: STRING -- Old wiki title. new_title: STRING -- New wiki text. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (community_name, community_name_argument) Result.force (old_title, old_title_argument) Result.force (new_title, new_title_argument) end feature {NONE} -- Implementation community_name_argument: STRING is "community_name" old_title_argument: STRING is "old_title" new_title_argument: STRING is "new_title" invariant community_name_ok: community_name /= Void and then not community_name.is_empty old_title_ok: old_title /= Void and then not old_title.is_empty new_title_ok: new_title /= Void and then not new_title.is_empty end