indexing description: "User login message." author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class O_USER_LOGIN_KEY_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_user_key: like user_key; a_app_key: like app_key) is -- Create. require a_user_key_ok: a_user_key /= Void and then not a_user_key.is_empty a_app_key_ok: a_app_key /= Void and then not a_app_key.is_empty do make_message user_key := a_user_key app_key := a_app_key ensure user_key_set: user_key = a_user_key app_key_set: app_key = a_app_key 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 user_key := l_args.item (user_key_argument) app_key := l_args.item (app_key_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_login_key_type end user_key: STRING -- Name of the user app_key: STRING -- Password of the user arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (2) Result.force (user_key, user_key_argument) Result.force (app_key, app_key_argument) end feature {NONE} -- Implementation user_key_argument: STRING is "user_key" app_key_argument: STRING is "app_key" invariant user_key_ok: user_key /= Void and then not user_key.is_empty app_key_ok: app_key /= Void and then not app_key.is_empty end