Policy-driven URI template handlers

This commit is contained in:
Colin Adams
2013-08-06 13:57:12 +01:00
parent 0a9d208529
commit 8dbd24afd1
8 changed files with 1084 additions and 26 deletions

View File

@@ -7,11 +7,11 @@ note
date: "$Date$"
revision: "$Revision$"
class WSF_PREVIOUS_POLICY
deferred class WSF_PREVIOUS_POLICY
feature -- Access
resource_previously_existed (req: WSF_REQUEST) : BOOLEAN
resource_previously_existed (req: WSF_REQUEST): BOOLEAN
-- Did `req.path_translated' exist previously?
require
req_attached: req /= Void
@@ -19,7 +19,7 @@ feature -- Access
-- No. Override if this is not want you want.
end
resource_moved_permanently (req: WSF_REQUEST) : BOOLEAN
resource_moved_permanently (req: WSF_REQUEST): BOOLEAN
-- Was `req.path_translated' moved permanently?
require
req_attached: req /= Void
@@ -28,7 +28,7 @@ feature -- Access
-- No. Override if this is not want you want.
end
resource_moved_temporarily (req: WSF_REQUEST) : BOOLEAN
resource_moved_temporarily (req: WSF_REQUEST): BOOLEAN
-- Was `req.path_translated' moved temporarily?
require
req_attached: req /= Void
@@ -37,4 +37,26 @@ feature -- Access
-- No. Override if this is not want you want.
end
previous_location (req: WSF_REQUEST): LIST [URI]
-- Previous location(s) for resource named by `req';
require
req_attached: req /= Void
previously_existed: resource_previously_existed (req)
moved: resource_moved_permanently (req) or resource_moved_temporarily (req)
deferred
ensure
previous_location_attached: Result /= Void
non_empty_list: not Result.empty
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