indexing description: "Project change logo message" author: "Marco Zietzling " date: "$Date$" revision: "$Revision$" class O_PROJECT_CHANGE_LOGO_MESSAGE inherit O_SESSION_MESSAGE rename make as make_session redefine make_from_generic, arguments end O_PROJECT_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_session: like session; a_project_id: like project_id; a_logo: like logo) is -- Create. require a_session_ok: a_session /= Void and then not a_session.is_empty a_project_id_ok: a_project_id > 0 a_logo_ok: a_logo /= Void and then not a_logo.is_empty do make_session (a_session) project_id := a_project_id logo := a_logo ensure project_id_set: project_id = a_project_id logo_set: logo = a_logo 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 project_id := l_args.item (project_id_argument).to_integer logo := l_args.item (logo_argument) end feature -- Access namespace: STRING is -- Namespace of the message type. once Result := project_namespace end type: STRING is -- Type of the message. once Result := project_change_logo_type end project_id: INTEGER -- Project ID. logo: STRING -- New logo. arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (project_id.out, project_id_argument) Result.force (logo, logo_argument) end feature {NONE} -- Implementation project_id_argument: STRING is "project_id" logo_argument: STRING is "logo" invariant project_id_ok: project_id > 0 logo_ok: logo /= Void and then not logo.is_empty end