indexing description: "User process friendship request message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_USER_PROCESS_FRIENDSHIP_REQUEST_MESSAGE inherit O_SESSION_MESSAGE rename make as make_session redefine make_from_generic, arguments end O_USER_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_session: like session; a_requester: like requester; an_accept: like accept) is -- Create. require a_session_ok: a_session /= Void and then not a_session.is_empty a_requester_ok: a_requester /= Void and then not a_requester.is_empty do make_session (a_session) requester := a_requester accept := an_accept ensure requester_set: requester = a_requester accept_set: accept = an_accept 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 := l_args.item (requester_argument) accept := l_args.item (accept_argument).to_boolean 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_type end requester: STRING -- Initial friendship requester. accept: BOOLEAN -- Status whether to accept request or reject request arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (requester.out, requester_argument) Result.force (accept.out, accept_argument) end feature {NONE} -- Implementation requester_argument: STRING is "requester" accept_argument: STRING is "accept" invariant requester_ok: requester /= Void and then not requester.is_empty end