indexing description: "Project request add message." author: "Peter Wyss " date: "$Date: 2007-07-10 08:08:35 +0200 (Tue, 10 Jul 2007) $" revision: "$Revision: 460 $" class O_PROJECT_REQUEST_ADD_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_name: like name; a_description: like description; a_is_closed_source: like is_closed_source; a_message: like message) is -- Create. require a_session_ok: a_session /= Void and then not a_session.is_empty a_name_ok: a_name /= Void and then not a_name.is_empty a_description_ok: a_description /= Void and then not a_description.is_empty a_message_ok: a_message /= Void do make_session (a_session) name := a_name description := a_description is_closed_source := a_is_closed_source message := a_message ensure name_set: name = a_name description_set: description = a_description is_closed_source_set: is_closed_source = a_is_closed_source message_set: message = a_message 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) description := l_args.item (description_argument) is_closed_source := l_args.item (is_closed_source_argument).to_boolean message := l_args.item (message_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_request_add_type end name: STRING -- Project name description: STRING -- Project description is_closed_source: BOOLEAN -- is this a closed source project? message: STRING -- Project request message arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do Result := Precursor Result.force (name, name_argument) Result.force (description, description_argument) Result.force (is_closed_source.out, is_closed_source_argument) Result.force (message, message_argument) end feature {NONE} -- Implementation name_argument: STRING is "name" description_argument: STRING is "description" is_closed_source_argument: STRING is "is_closed_source" message_argument: STRING is "message" invariant name_ok: name /= Void and then not name.is_empty description_ok: description /= Void and then not description.is_empty end