indexing description: "User request friendship reply message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_USER_REQUEST_FRIENDSHIP_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_requestee_mail_address: like requestee_mail_address; a_requester_username: like requester_username; a_requester_name: like requester_name) is -- Create. require a_requestee_mail_address_ok: a_requestee_mail_address /= Void and then not a_requestee_mail_address.is_empty a_requester_username_ok: a_requester_username /= Void and then not a_requester_username.is_empty a_requester_name_ok: a_requester_name /= Void do make_message requestee_mail_address := a_requestee_mail_address requester_username := a_requester_username requester_name := a_requester_name ensure requestee_mail_address_set: requestee_mail_address = a_requestee_mail_address requester_username_set: requester_username = a_requester_username requester_name_set: requester_name = a_requester_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 requestee_mail_address := l_args.item (requestee_mail_address_argument) requester_username := l_args.item (requester_username_argument) requester_name := l_args.item (requester_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_request_friendship_reply_type end requestee_mail_address: STRING -- Mail address of requestee. requester_username: STRING -- Username of requester. requester_name: STRING -- Name of requester. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (3) Result.force (requestee_mail_address.out, requestee_mail_address_argument) Result.force (requester_username.out, requester_username_argument) Result.force (requester_name.out, requester_name_argument) end feature {NONE} -- Implementation requestee_mail_address_argument: STRING is "requestee_mail_address" requester_username_argument: STRING is "requester_username" requester_name_argument: STRING is "requester_name" invariant requestee_mail_address_ok: requestee_mail_address /= Void and then not requestee_mail_address.is_empty requester_username_ok: requester_username /= Void and then not requester_username.is_empty requester_name_ok: requester_name /= Void end