Added first steps toward Taxonomy module.
This commit is contained in:
81
modules/taxonomy/handler/taxonomy_handler.e
Normal file
81
modules/taxonomy/handler/taxonomy_handler.e
Normal file
@@ -0,0 +1,81 @@
|
||||
note
|
||||
description: "[
|
||||
Request handler related to
|
||||
/taxonomy
|
||||
/taxonomy/{vocabulary}
|
||||
/taxonomy/{vocabulary}/{term}
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$revision$"
|
||||
|
||||
class
|
||||
TAXONOMY_HANDLER
|
||||
|
||||
inherit
|
||||
CMS_MODULE_HANDLER [CMS_TAXONOMY_API]
|
||||
rename
|
||||
module_api as taxonomy_api
|
||||
end
|
||||
|
||||
WSF_URI_HANDLER
|
||||
rename
|
||||
execute as uri_execute,
|
||||
new_mapping as new_uri_mapping
|
||||
end
|
||||
|
||||
WSF_URI_TEMPLATE_HANDLER
|
||||
rename
|
||||
execute as uri_template_execute,
|
||||
new_mapping as new_uri_template_mapping
|
||||
select
|
||||
new_uri_template_mapping
|
||||
end
|
||||
|
||||
WSF_RESOURCE_HANDLER_HELPER
|
||||
redefine
|
||||
do_get
|
||||
end
|
||||
|
||||
REFACTORING_HELPER
|
||||
|
||||
CMS_API_ACCESS
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature -- execute
|
||||
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute request handler for any kind of mapping.
|
||||
do
|
||||
execute_methods (req, res)
|
||||
end
|
||||
|
||||
uri_execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute request handler for URI mapping.
|
||||
do
|
||||
execute (req, res)
|
||||
end
|
||||
|
||||
uri_template_execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute request handler for URI-template mapping.
|
||||
do
|
||||
execute (req, res)
|
||||
end
|
||||
|
||||
feature -- HTTP Methods
|
||||
|
||||
do_get (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- <Precursor>
|
||||
local
|
||||
l_page: CMS_RESPONSE
|
||||
do
|
||||
-- Read page number from path parameter.
|
||||
|
||||
-- Responding with `main_content_html (l_page)'.
|
||||
create {GENERIC_VIEW_CMS_RESPONSE} l_page.make (req, res, api)
|
||||
l_page.set_main_content ("Not Yet Implemented -- In Progress")
|
||||
l_page.execute
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user