merging from upstream - stage 1

This commit is contained in:
Colin Adams
2013-03-26 17:04:49 +00:00
90 changed files with 1257 additions and 936 deletions

View File

@@ -14,7 +14,7 @@ feature {NONE} -- Initialization
make (m: like mapping)
do
mapping := m
create {STRING_32} description.make_empty
create descriptions.make (0)
end
feature -- Status report
@@ -27,7 +27,7 @@ feature -- Status report
-- Is Current empty?
-- i.e: does not carry any information.
do
Result := description.is_empty
Result := descriptions.is_empty
end
feature -- Access
@@ -35,7 +35,18 @@ feature -- Access
mapping: WSF_ROUTER_MAPPING
-- Associated mapping
descriptions: ARRAYED_LIST [READABLE_STRING_GENERAL]
description: STRING_32
do
create Result.make_empty
across
descriptions as c
loop
Result.append_string_general (c.item)
Result.append ("%N")
end
end
feature -- Change
@@ -46,7 +57,17 @@ feature -- Change
add_description (d: READABLE_STRING_GENERAL)
do
description.append_string_general (d)
descriptions.force (d)
end
note
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -204,6 +204,7 @@ feature {WSF_RESPONSE} -- Output
l_url: detachable STRING_8
l_base_url: detachable READABLE_STRING_8
l_doc: detachable WSF_ROUTER_MAPPING_DOCUMENTATION
l_first: BOOLEAN
do
if attached {WSF_SELF_DOCUMENTED_ROUTER_MAPPING} m as l_doc_mapping then
l_doc := l_doc_mapping.documentation (meths)
@@ -256,7 +257,17 @@ feature {WSF_RESPONSE} -- Output
if l_doc /= Void and then not l_doc.is_empty then
s.append ("%N<ul class=%"handlerdoc%">")
s.append (html_encoder.encoded_string (l_doc.description))
l_first := True
across
l_doc.descriptions as c
loop
if not l_first then
s.append ("<br/>")
else
l_first := False
end
s.append (html_encoder.general_encoded_string (c.item))
end
s.append ("%N</ul>%N")
else
debug

View File

@@ -0,0 +1,44 @@
note
description: "Summary description for {WSF_STARTS_WITH_AGENT_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_STARTS_WITH_AGENT_HANDLER
inherit
WSF_STARTS_WITH_HANDLER
create
make
feature {NONE} -- Initialization
make (a_action: like action)
do
action := a_action
end
feature -- Access
action: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; request: WSF_REQUEST; response: WSF_RESPONSE]]
feature -- Execution
execute (a_start_path: READABLE_STRING_8; req: WSF_REQUEST; res: WSF_RESPONSE)
do
action.call ([a_start_path, req, res])
end
note
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -13,8 +13,11 @@ inherit
execute as execute_starts_with
end
WSF_SELF_DOCUMENTED_HANDLER
create
make
make,
make_hidden
feature {NONE} -- Initialization
@@ -34,6 +37,29 @@ feature {NONE} -- Initialization
not document_root.is_empty and then not document_root.ends_with (operating_environment.directory_separator.out)
end
make_hidden (d: like document_root)
require
valid_d: (d /= Void and then not d.is_empty) implies not d.ends_with (operating_environment.directory_separator.out)
do
make (d)
is_hidden := True
ensure
hidden: is_hidden
end
is_hidden: BOOLEAN
-- Current mapped handler should be hidden from self documentation
feature -- Documentation
mapping_documentation (m: WSF_ROUTER_MAPPING; a_request_methods: detachable WSF_REQUEST_METHODS): WSF_ROUTER_MAPPING_DOCUMENTATION
-- <Precursor>
do
create Result.make (m)
Result.set_is_hidden (is_hidden)
Result.add_description ("File service")
end
feature -- Access
document_root: STRING