indexing description: "User remove friendship message." author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_USER_REMOVE_FRIENDSHIP_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_friend: like friend) is -- Create. require a_session_ok: a_session /= Void and then not a_session.is_empty a_friend_ok: a_friend /= Void and then not a_friend.is_empty do make_session (a_session) friend := a_friend ensure friend_set: friend = a_friend 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 friend := l_args.item (friend_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_remove_friendship_type end friend: STRING -- Friend. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (friend.out, friend_argument) end feature {NONE} -- Implementation friend_argument: STRING is "friend" invariant friend_ok: friend /= Void and then not friend.is_empty end