indexing description: "API interface to internal_wiki services." author: "Peter Wyss " date: "$Date$" revision: "$Revision$" class INTERNAL_WIKI_SERVICE inherit API_SERVICE create make feature -- Basic operations wiki_add (a_session: STRING; a_project: INTEGER_REF; a_title:STRING; a_diff: STRING; a_revision: INTEGER_REF; a_old_revision: INTEGER_REF; a_is_private: BOOLEAN_REF): BOOLEAN_REF is -- Create a new wiki workitem. local l_msg: O_WIKI_ADD_MESSAGE do -- argument validiation check_anonymous_session (a_session) if not is_valid_session (a_session) then last_fault := err_invalid_session elseif a_project <= 0 then last_fault := err_invalid_project elseif a_title = Void or else a_title.is_empty then last_fault := err_invalid_title elseif a_diff = Void or else a_diff.is_empty then last_fault := err_invalid_diff elseif a_revision <= 0 then last_fault := err_invalid_revision elseif a_old_revision < 0 then last_fault := err_invalid_revision else -- generate and send message create l_msg.make (a_session, a_project, a_title, a_diff, a_revision, a_old_revision, a_is_private) 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 (wiki_add_name) then create {TUPLE [STRING, INTEGER_REF, STRING, STRING, INTEGER_REF, INTEGER_REF, BOOLEAN_REF]}Result end end feature -- Initialisation self_register is -- Register all actions for this service do register_with_help (agent wiki_add, wiki_add_name, "Add a wiki workitem.") end feature {NONE} -- Implementation wiki_add_name: STRING is "add" end