indexing description: "API interface to internal_commit services." author: "Peter Wyss " date: "$Date$" revision: "$Revision$" class INTERNAL_COMMIT_SERVICE inherit API_SERVICE create make feature -- Basic operations commit_add (a_user: STRING; a_project: STRING; a_revision: INTEGER_REF; a_log: STRING; a_diff: STRING): BOOLEAN_REF is -- Create a new commit workitem with a_user, a_project, a_revision, a_log and a_diff. local l_msg: O_COMMIT_ADD_MESSAGE do -- argument validiation if not is_valid_name (a_user) then last_fault := err_invalid_user elseif not is_valid_project (a_project) then last_fault := err_invalid_project elseif a_revision <= 0 then last_fault := err_invalid_revision elseif a_log = Void then last_fault := err_invalid_log elseif a_diff = Void then last_fault := err_invalid_diff else -- generate and send message create l_msg.make (a_user, a_project, a_revision, a_log, a_diff) send_and_wait_for_reply (l_msg) if is_ok then create Result Result.set_item (True) end end end feature -- Creation new_tuple (a_name: STRING): TUPLE is -- Tuple of default-valued arguments to pass to call `a_name'. do if a_name.is_equal (commit_add_name) then create {TUPLE [STRING, STRING, INTEGER_REF, STRING, STRING]}Result end end feature -- Initialisation self_register is -- Register all actions for this service do register_with_help (agent commit_add, commit_add_name, "Add a commit workitem.") end feature {NONE} -- Implementation commit_add_name: STRING is "add" end