note description: "Provides an interface for exposing system related data." author: "B. Herlig" date: "$Date$" revision: "$Revision$" class SYSTEM_INTERFACE inherit BASE_INTERFACE create make feature -- Commands retrieve_active_projects (a_msg: A_MESSAGE) -- Retrieves a list of project names with work-item activity before or after the given threshold (a cutoff in seconds). require a_msg_ok: a_msg /= Void local l_msg: O_SYSTEM_RETRIEVE_ACTIVE_PROJECTS_MESSAGE l_reply: O_SYSTEM_RETRIEVE_ACTIVE_PROJECTS_REPLY_MESSAGE l_project_name_list: DS_ARRAYED_LIST [STRING] l_reply_list: DS_ARRAYED_LIST [A_STRING_VALUE] do l_msg ?= a_msg check valid_message: l_msg /= Void end workitem_access.retrieve_recent_projects (l_msg.threshold, l_msg.retrieve_older) l_project_name_list := workitem_access.last_project_name_list -- build reply create l_reply_list.make (l_project_name_list.count) l_project_name_list.do_all (agent convert_string_list(?, l_reply_list)) create l_reply.make (create {A_SEQUENCE_VALUE [A_STRING_VALUE]}.make(l_reply_list)) node.send_message_reply (l_reply, a_msg) end feature {NONE} -- Utilities convert_string_list (a_value: STRING; a_list: DS_ARRAYED_LIST [A_STRING_VALUE]) do a_list.force_last (a_value) end end