indexing description: "User process friendship request reply message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_USER_PROCESS_FRIENDSHIP_REQUEST_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_requester_mail_address: like requester_mail_address; a_requestee_username: like requestee_username; a_requestee_name: like requestee_name) is -- Create. require a_requester_mail_address_ok: a_requester_mail_address /= Void and then not a_requester_mail_address.is_empty a_requestee_username_ok: a_requestee_username /= Void and then not a_requestee_username.is_empty a_requestee_name_ok: a_requestee_name /= Void do make_message requester_mail_address := a_requester_mail_address requestee_username := a_requestee_username requestee_name := a_requestee_name ensure requester_mail_address_set: requester_mail_address = a_requester_mail_address requestee_username_set: requestee_username = a_requestee_username requestee_name_set: requestee_name = a_requestee_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 requester_mail_address := l_args.item (requester_mail_address_argument) requestee_username := l_args.item (requestee_username_argument) requestee_name := l_args.item (requestee_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_process_friendship_request_reply_type end requester_mail_address: STRING -- Mail address of requester. requestee_username: STRING -- Username of requestee. requestee_name: STRING -- Name of requestee. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (3) Result.force (requester_mail_address.out, requester_mail_address_argument) Result.force (requestee_username.out, requestee_username_argument) Result.force (requestee_name.out, requestee_name_argument) end feature {NONE} -- Implementation requester_mail_address_argument: STRING is "requester_mail_address" requestee_username_argument: STRING is "requestee_username" requestee_name_argument: STRING is "requestee_name" invariant requester_mail_address_ok: requester_mail_address /= Void and then not requester_mail_address.is_empty requestee_username_ok: requestee_username /= Void and then not requestee_username.is_empty requestee_name_ok: requestee_name /= Void end