Move "rest" library under "draft/..." since it is more an experiment rather than a real REST library

This commit is contained in:
Jocelyn Fiat
2011-11-23 15:18:35 +01:00
parent 03d9c3785c
commit a3f28e3945
50 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
note
description: "Summary description for {DEFAULT_REST_REQUEST_URI_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_REQUEST_URI_HANDLER
inherit
REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT]
;note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,28 @@
note
description: "Summary description for {REQUEST_URI_HANDLER_CONTEXT}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
REST_REQUEST_URI_HANDLER_CONTEXT
inherit
REQUEST_URI_HANDLER_CONTEXT
REST_REQUEST_HANDLER_CONTEXT
create
make
note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,40 @@
note
description: "Summary description for {DEFAULT_REST_REQUEST_URI_ROUTER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
REST_REQUEST_URI_ROUTER
inherit
REST_REQUEST_URI_ROUTER_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT], REST_REQUEST_URI_HANDLER_CONTEXT]
redefine
map_agent_with_request_methods
end
create
make
feature -- Mapping
map_agent_with_request_methods (a_id: READABLE_STRING_8; a_action: PROCEDURE [ANY, TUPLE [ctx: REST_REQUEST_URI_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE]];
rqst_methods: detachable ARRAY [READABLE_STRING_8])
local
h: REST_REQUEST_AGENT_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT]
do
create h.make (a_action)
map_with_request_methods (a_id, h, rqst_methods)
end
note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,36 @@
note
description: "Summary description for {REST_REQUEST_URI_ROUTER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
REST_REQUEST_URI_ROUTER_I [H -> REST_REQUEST_HANDLER [C], C -> REST_REQUEST_URI_HANDLER_CONTEXT create make end]
inherit
REQUEST_URI_ROUTER_I [H, C]
REST_REQUEST_ROUTER [H, C]
create
make
feature -- Mapping
-- map_agent_with_request_methods (a_id: READABLE_STRING_8; a_action: like {REST_REQUEST_AGENT_HANDLER}.action; rqst_methods: detachable ARRAY [READABLE_STRING_8])
-- do
-- Precursor (a_id, a_action, rqst_methods)
-- end
note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,33 @@
note
description: "Summary description for {DEFAULT_REST_REQUEST_URI_ROUTING_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
REST_REQUEST_URI_ROUTING_HANDLER
inherit
REST_REQUEST_URI_ROUTING_HANDLER_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT], REST_REQUEST_URI_HANDLER_CONTEXT]
redefine
router
end
create
make
feature {NONE} -- Routing
router: REST_REQUEST_URI_ROUTER
;note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,64 @@
note
description: "Summary description for {REQUEST_ROUTING_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
REST_REQUEST_URI_ROUTING_HANDLER_I [H -> REST_REQUEST_HANDLER [C],
C -> REST_REQUEST_URI_HANDLER_CONTEXT create make end]
inherit
REQUEST_URI_ROUTING_HANDLER_I [H, C]
redefine
router,
execute
end
REST_REQUEST_HANDLER [C]
undefine
execute
end
create
make
feature -- Status report
authentication_required (req: WSF_REQUEST): BOOLEAN
do
Result := internal_authentication_required
end
feature {NONE} -- Implementation
internal_authentication_required: BOOLEAN
feature -- Execution
execute (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
do
Precursor {REQUEST_URI_ROUTING_HANDLER_I} (ctx, req, res)
end
execute_application (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
do
check should_not_occur: False end
end
feature {NONE} -- Routing
router: REST_REQUEST_URI_ROUTER_I [H, C]
;note
copyright: "Copyright (c) 1984-2011, 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

@@ -0,0 +1,30 @@
note
description: "Summary description for {DEFAULT_REST_URI_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_URI_SERVICE
inherit
REST_SERVICE_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT], REST_REQUEST_URI_HANDLER_CONTEXT]
redefine
router
end
feature -- Router
router: REST_REQUEST_URI_ROUTER
;note
copyright: "Copyright (c) 1984-2011, 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