Added WSF_ROUTER.has_item_associated_with_resource and item_associated_with_resource
Added WSF_ROUTER_MAPPING.associated_resource Added WSF_ROUTER_SELF_DOCUMENTATION_HANDLER and WSF_ROUTER_SELF_DOCUMENTATION_MESSAGE to provide a self documentation for WSF_ROUTER (for now, only HTML)
This commit is contained in:
@@ -23,10 +23,20 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
associated_resource: READABLE_STRING_8
|
||||
-- Associated resource
|
||||
do
|
||||
Result := uri
|
||||
end
|
||||
|
||||
handler: WSF_STARTS_WITH_HANDLER
|
||||
|
||||
uri: READABLE_STRING_8
|
||||
|
||||
feature -- Documentation
|
||||
|
||||
documentation: STRING_32 = "Starts-With-URI"
|
||||
|
||||
feature -- Status
|
||||
|
||||
routed_handler (req: WSF_REQUEST; res: WSF_RESPONSE; a_router: WSF_ROUTER): detachable WSF_HANDLER
|
||||
|
||||
@@ -10,6 +10,8 @@ class
|
||||
inherit
|
||||
WSF_ROUTER_MAPPING
|
||||
|
||||
WSF_SELF_DOCUMENTED_ROUTER_MAPPING
|
||||
|
||||
create
|
||||
make,
|
||||
make_trailing_slash_ignored
|
||||
@@ -30,12 +32,22 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
associated_resource: READABLE_STRING_8
|
||||
-- Associated resource
|
||||
do
|
||||
Result := uri
|
||||
end
|
||||
|
||||
handler: WSF_URI_HANDLER
|
||||
|
||||
uri: READABLE_STRING_8
|
||||
|
||||
trailing_slash_ignored: BOOLEAN
|
||||
|
||||
feature -- Documentation
|
||||
|
||||
documentation: STRING_32 = "Is-URI"
|
||||
|
||||
feature -- Status
|
||||
|
||||
routed_handler (req: WSF_REQUEST; res: WSF_RESPONSE; a_router: WSF_ROUTER): detachable WSF_HANDLER
|
||||
|
||||
@@ -10,6 +10,10 @@ class
|
||||
inherit
|
||||
WSF_ROUTER_MAPPING
|
||||
|
||||
WSF_SELF_DOCUMENTED_ROUTER_MAPPING
|
||||
|
||||
DEBUG_OUTPUT
|
||||
|
||||
create
|
||||
make,
|
||||
make_from_template
|
||||
@@ -29,10 +33,28 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
associated_resource: READABLE_STRING_8
|
||||
-- Associated resource
|
||||
do
|
||||
Result := template.template
|
||||
end
|
||||
|
||||
handler: WSF_URI_TEMPLATE_HANDLER
|
||||
|
||||
template: URI_TEMPLATE
|
||||
|
||||
feature -- Documentation
|
||||
|
||||
documentation: STRING_32 = "Match-URI-Template"
|
||||
|
||||
feature -- Status report
|
||||
|
||||
debug_output: STRING
|
||||
-- String that should be displayed in debugger to represent `Current'.
|
||||
do
|
||||
Result := "URI-template: " + template.template
|
||||
end
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_handler (h: like handler)
|
||||
|
||||
@@ -10,6 +10,8 @@ class
|
||||
inherit
|
||||
WSF_ROUTER_CONTEXT_MAPPING [C]
|
||||
|
||||
WSF_SELF_DOCUMENTED_ROUTER_MAPPING
|
||||
|
||||
DEBUG_OUTPUT
|
||||
|
||||
create
|
||||
@@ -31,10 +33,20 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
associated_resource: READABLE_STRING_8
|
||||
-- Associated resource
|
||||
do
|
||||
Result := template.template
|
||||
end
|
||||
|
||||
handler: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]
|
||||
|
||||
template: URI_TEMPLATE
|
||||
|
||||
feature -- Documentation
|
||||
|
||||
documentation: STRING_32 = "Is-URI"
|
||||
|
||||
feature -- Status report
|
||||
|
||||
debug_output: STRING
|
||||
|
||||
Reference in New Issue
Block a user