indexing description: "Add OpenID message. (internal)" author: "Ueli Weiss" date: "$Date: 2007-10-23 15:46:06 +0200 (Tue, 23 Oct 2007) $" revision: "$Revision: 1129 $" class O_USER_ADD_OPENID_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_name: like name; an_openid: like openid) is -- Create. require a_name_ok: a_name /= Void and then not a_name.is_empty a_openid_ok: an_openid /= Void and then not an_openid.is_empty do make_message name := a_name openid := an_openid ensure name_set: name = a_name openid_set: openid = an_openid 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 name := l_args.item (name_argument) openid := l_args.item (openid_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_add_openid_type end name: STRING -- Name of the user openid: STRING -- OpenID to be added to the user arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (1) Result.force (name, name_argument) Result.force (openid, openid_argument) end feature {NONE} -- Implementation name_argument: STRING is "name" openid_argument: STRING is "openid" invariant name_ok: name /= Void and then not name.is_empty openid_ok: openid /= Void and then not openid.is_empty end