renamed WSF_(.*)_VALUE as WSF_$1
This commit is contained in:
@@ -50,7 +50,7 @@ feature -- Execution
|
|||||||
create s.make_empty
|
create s.make_empty
|
||||||
|
|
||||||
if
|
if
|
||||||
attached {WSF_STRING_VALUE} ctx.path_parameter ("resource") as l_resource_value and then
|
attached {WSF_STRING} ctx.path_parameter ("resource") as l_resource_value and then
|
||||||
attached l_resource_value.string as l_resource
|
attached l_resource_value.string as l_resource
|
||||||
then
|
then
|
||||||
from
|
from
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ feature -- String query
|
|||||||
|
|
||||||
string_from (a_value: detachable WSF_VALUE): detachable READABLE_STRING_32
|
string_from (a_value: detachable WSF_VALUE): detachable READABLE_STRING_32
|
||||||
do
|
do
|
||||||
if attached {WSF_STRING_VALUE} a_value as val then
|
if attached {WSF_STRING} a_value as val then
|
||||||
Result := val.string
|
Result := val.string
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ feature -- Query
|
|||||||
path_parameter (a_name: READABLE_STRING_8): detachable WSF_VALUE
|
path_parameter (a_name: READABLE_STRING_8): detachable WSF_VALUE
|
||||||
do
|
do
|
||||||
if attached uri_template_match.url_decoded_path_variable (a_name) as s then
|
if attached uri_template_match.url_decoded_path_variable (a_name) as s then
|
||||||
create {WSF_STRING_VALUE} Result.make (a_name, s)
|
create {WSF_STRING} Result.make (a_name, s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
query_parameter (a_name: READABLE_STRING_8): detachable WSF_VALUE
|
query_parameter (a_name: READABLE_STRING_8): detachable WSF_VALUE
|
||||||
do
|
do
|
||||||
if attached uri_template_match.url_decoded_query_variable (a_name) as s then
|
if attached uri_template_match.url_decoded_query_variable (a_name) as s then
|
||||||
create {WSF_STRING_VALUE} Result.make (a_name, s)
|
create {WSF_STRING} Result.make (a_name, s)
|
||||||
else
|
else
|
||||||
Result := request.query_parameter (a_name)
|
Result := request.query_parameter (a_name)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,26 +30,26 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature -- Actions
|
feature -- Actions
|
||||||
|
|
||||||
on_table_actions: ACTION_SEQUENCE [TUPLE [WSF_TABLE_VALUE]]
|
on_table_actions: ACTION_SEQUENCE [TUPLE [WSF_TABLE]]
|
||||||
|
|
||||||
on_string_actions: ACTION_SEQUENCE [TUPLE [WSF_STRING_VALUE]]
|
on_string_actions: ACTION_SEQUENCE [TUPLE [WSF_STRING]]
|
||||||
|
|
||||||
on_multiple_string_actions: ACTION_SEQUENCE [TUPLE [WSF_MULTIPLE_STRING_VALUE]]
|
on_multiple_string_actions: ACTION_SEQUENCE [TUPLE [WSF_MULTIPLE_STRING]]
|
||||||
|
|
||||||
feature -- Visitor
|
feature -- Visitor
|
||||||
|
|
||||||
process_table (v: WSF_TABLE_VALUE)
|
process_table (v: WSF_TABLE)
|
||||||
do
|
do
|
||||||
on_table_actions.call ([v])
|
on_table_actions.call ([v])
|
||||||
process_iterable_of_value (v)
|
process_iterable_of_value (v)
|
||||||
end
|
end
|
||||||
|
|
||||||
process_string (v: WSF_STRING_VALUE)
|
process_string (v: WSF_STRING)
|
||||||
do
|
do
|
||||||
on_string_actions.call ([v])
|
on_string_actions.call ([v])
|
||||||
end
|
end
|
||||||
|
|
||||||
process_multiple_string (v: WSF_MULTIPLE_STRING_VALUE)
|
process_multiple_string (v: WSF_MULTIPLE_STRING)
|
||||||
do
|
do
|
||||||
on_multiple_string_actions.call ([v])
|
on_multiple_string_actions.call ([v])
|
||||||
process_iterable_of_value (v)
|
process_iterable_of_value (v)
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ feature -- Helper
|
|||||||
|
|
||||||
feature -- Visitor
|
feature -- Visitor
|
||||||
|
|
||||||
process_table (v: WSF_TABLE_VALUE)
|
process_table (v: WSF_TABLE)
|
||||||
do
|
do
|
||||||
process_iterable_of_value (v)
|
process_iterable_of_value (v)
|
||||||
end
|
end
|
||||||
|
|
||||||
process_string (v: WSF_STRING_VALUE)
|
process_string (v: WSF_STRING)
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
process_multiple_string (v: WSF_MULTIPLE_STRING_VALUE)
|
process_multiple_string (v: WSF_MULTIPLE_STRING)
|
||||||
do
|
do
|
||||||
process_iterable_of_value (v)
|
process_iterable_of_value (v)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ inherit
|
|||||||
|
|
||||||
feature -- Visitor
|
feature -- Visitor
|
||||||
|
|
||||||
process_table (v: WSF_TABLE_VALUE)
|
process_table (v: WSF_TABLE)
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
process_string (v: WSF_STRING_VALUE)
|
process_string (v: WSF_STRING)
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
process_multiple_string (v: WSF_MULTIPLE_STRING_VALUE)
|
process_multiple_string (v: WSF_MULTIPLE_STRING)
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,26 +10,26 @@ deferred class
|
|||||||
|
|
||||||
feature -- Visitor
|
feature -- Visitor
|
||||||
|
|
||||||
safe_process_value (v: detachable WSF_TABLE_VALUE)
|
safe_process_value (v: detachable WSF_TABLE)
|
||||||
do
|
do
|
||||||
if v /= Void then
|
if v /= Void then
|
||||||
v.process (Current)
|
v.process (Current)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
process_table (v: WSF_TABLE_VALUE)
|
process_table (v: WSF_TABLE)
|
||||||
require
|
require
|
||||||
v_attached: v /= Void
|
v_attached: v /= Void
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
process_string (v: WSF_STRING_VALUE)
|
process_string (v: WSF_STRING)
|
||||||
require
|
require
|
||||||
v_attached: v /= Void
|
v_attached: v /= Void
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
process_multiple_string (v: WSF_MULTIPLE_STRING_VALUE)
|
process_multiple_string (v: WSF_MULTIPLE_STRING)
|
||||||
require
|
require
|
||||||
v_attached: v /= Void
|
v_attached: v /= Void
|
||||||
deferred
|
deferred
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WSF_MULTIPLE_STRING_VALUE}."
|
description: "Summary description for {WSF_MULTIPLE_STRING}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_MULTIPLE_STRING_VALUE
|
WSF_MULTIPLE_STRING
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_VALUE
|
WSF_VALUE
|
||||||
|
|
||||||
ITERABLE [WSF_STRING_VALUE]
|
ITERABLE [WSF_STRING]
|
||||||
|
|
||||||
create
|
create
|
||||||
make_with_value,
|
make_with_value,
|
||||||
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
|
|||||||
make_with_value (a_value: WSF_VALUE)
|
make_with_value (a_value: WSF_VALUE)
|
||||||
do
|
do
|
||||||
name := a_value.name
|
name := a_value.name
|
||||||
create {LINKED_LIST [WSF_STRING_VALUE]} string_values.make
|
create {LINKED_LIST [WSF_STRING]} string_values.make
|
||||||
add_value (a_value)
|
add_value (a_value)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -48,23 +48,23 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
make_with_string (a_name: like name; a_string: READABLE_STRING_32)
|
make_with_string (a_name: like name; a_string: READABLE_STRING_32)
|
||||||
do
|
do
|
||||||
make_with_value (create {WSF_STRING_VALUE}.make (a_name, a_string))
|
make_with_value (create {WSF_STRING}.make (a_name, a_string))
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
name: READABLE_STRING_32
|
name: READABLE_STRING_32
|
||||||
|
|
||||||
string_values: LIST [WSF_STRING_VALUE]
|
string_values: LIST [WSF_STRING]
|
||||||
|
|
||||||
first_string_value: WSF_STRING_VALUE
|
first_string_value: WSF_STRING
|
||||||
do
|
do
|
||||||
Result := string_values.first
|
Result := string_values.first
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Traversing
|
feature -- Traversing
|
||||||
|
|
||||||
new_cursor: ITERATION_CURSOR [WSF_STRING_VALUE]
|
new_cursor: ITERATION_CURSOR [WSF_STRING]
|
||||||
do
|
do
|
||||||
Result := string_values.new_cursor
|
Result := string_values.new_cursor
|
||||||
end
|
end
|
||||||
@@ -111,9 +111,9 @@ feature -- Element change
|
|||||||
require
|
require
|
||||||
same_name: a_value.name.same_string (name)
|
same_name: a_value.name.same_string (name)
|
||||||
do
|
do
|
||||||
if attached {WSF_STRING_VALUE} a_value as sval then
|
if attached {WSF_STRING} a_value as sval then
|
||||||
add_string_value (sval)
|
add_string_value (sval)
|
||||||
elseif attached {WSF_MULTIPLE_STRING_VALUE} a_value as slst then
|
elseif attached {WSF_MULTIPLE_STRING} a_value as slst then
|
||||||
across
|
across
|
||||||
slst as cur
|
slst as cur
|
||||||
loop
|
loop
|
||||||
@@ -122,7 +122,7 @@ feature -- Element change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_string_value (s: WSF_STRING_VALUE)
|
add_string_value (s: WSF_STRING)
|
||||||
do
|
do
|
||||||
string_values.extend (s)
|
string_values.extend (s)
|
||||||
end
|
end
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WSF_STRING_VALUE}."
|
description: "Summary description for {WSF_STRING}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_STRING_VALUE
|
WSF_STRING
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_VALUE
|
WSF_VALUE
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
note
|
note
|
||||||
description: "[
|
description: "[
|
||||||
Table value which can contain value indexed by a key
|
Table which can contain value indexed by a key
|
||||||
]"
|
]"
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_TABLE_VALUE
|
WSF_TABLE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_VALUE
|
WSF_VALUE
|
||||||
@@ -173,7 +173,7 @@ feature -- Access: global variable
|
|||||||
|
|
||||||
string_item (a_name: READABLE_STRING_8): detachable READABLE_STRING_32
|
string_item (a_name: READABLE_STRING_8): detachable READABLE_STRING_32
|
||||||
do
|
do
|
||||||
if attached {WSF_STRING_VALUE} item (a_name) as val then
|
if attached {WSF_STRING} item (a_name) as val then
|
||||||
Result := val.string
|
Result := val.string
|
||||||
else
|
else
|
||||||
check is_string_value: False end
|
check is_string_value: False end
|
||||||
@@ -182,7 +182,7 @@ feature -- Access: global variable
|
|||||||
|
|
||||||
feature -- Access: CGI Meta variables
|
feature -- Access: CGI Meta variables
|
||||||
|
|
||||||
meta_variable (a_name: READABLE_STRING_8): detachable WSF_STRING_VALUE
|
meta_variable (a_name: READABLE_STRING_8): detachable WSF_STRING
|
||||||
-- CGI Meta variable related to `a_name'
|
-- CGI Meta variable related to `a_name'
|
||||||
require
|
require
|
||||||
a_name_valid: a_name /= Void and then not a_name.is_empty
|
a_name_valid: a_name /= Void and then not a_name.is_empty
|
||||||
@@ -200,7 +200,7 @@ feature -- Access: CGI Meta variables
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
meta_variables: ITERABLE [WSF_STRING_VALUE]
|
meta_variables: ITERABLE [WSF_STRING]
|
||||||
-- CGI meta variables values
|
-- CGI meta variables values
|
||||||
|
|
||||||
meta_string_variable_or_default (a_name: READABLE_STRING_8; a_default: READABLE_STRING_32; use_default_when_empty: BOOLEAN): READABLE_STRING_32
|
meta_string_variable_or_default (a_name: READABLE_STRING_8; a_default: READABLE_STRING_32; use_default_when_empty: BOOLEAN): READABLE_STRING_32
|
||||||
@@ -223,7 +223,7 @@ feature -- Access: CGI Meta variables
|
|||||||
do
|
do
|
||||||
meta_variables_table.force (new_string_value (a_name, a_value), a_name)
|
meta_variables_table.force (new_string_value (a_name, a_value), a_name)
|
||||||
ensure
|
ensure
|
||||||
param_set: attached {WSF_STRING_VALUE} meta_variable (a_name) as val and then val ~ a_value
|
param_set: attached {WSF_STRING} meta_variable (a_name) as val and then val ~ a_value
|
||||||
end
|
end
|
||||||
|
|
||||||
unset_meta_variable (a_name: READABLE_STRING_8)
|
unset_meta_variable (a_name: READABLE_STRING_8)
|
||||||
@@ -235,7 +235,7 @@ feature -- Access: CGI Meta variables
|
|||||||
|
|
||||||
feature {NONE} -- Access: CGI meta parameters
|
feature {NONE} -- Access: CGI meta parameters
|
||||||
|
|
||||||
meta_variables_table: HASH_TABLE [WSF_STRING_VALUE, READABLE_STRING_8]
|
meta_variables_table: HASH_TABLE [WSF_STRING, READABLE_STRING_8]
|
||||||
-- CGI Environment parameters
|
-- CGI Environment parameters
|
||||||
|
|
||||||
feature -- Access: CGI meta parameters - 1.1
|
feature -- Access: CGI meta parameters - 1.1
|
||||||
@@ -711,7 +711,7 @@ feature -- Extra CGI environment variables
|
|||||||
-- Request time (UTC)
|
-- Request time (UTC)
|
||||||
do
|
do
|
||||||
if
|
if
|
||||||
attached {WSF_STRING_VALUE} meta_variable ({CGI_META_NAMES}.request_time) as t and then
|
attached {WSF_STRING} meta_variable ({CGI_META_NAMES}.request_time) as t and then
|
||||||
t.string.is_integer_64
|
t.string.is_integer_64
|
||||||
then
|
then
|
||||||
Result := date_time_utilities.unix_time_stamp_to_date_time (t.string.to_integer_64)
|
Result := date_time_utilities.unix_time_stamp_to_date_time (t.string.to_integer_64)
|
||||||
@@ -742,7 +742,7 @@ feature {NONE} -- Cookies
|
|||||||
do
|
do
|
||||||
l_cookies := internal_cookies_table
|
l_cookies := internal_cookies_table
|
||||||
if l_cookies = Void then
|
if l_cookies = Void then
|
||||||
if attached {WSF_STRING_VALUE} meta_variable ({CGI_META_NAMES}.http_cookie) as val then
|
if attached {WSF_STRING} meta_variable ({CGI_META_NAMES}.http_cookie) as val then
|
||||||
s := val.string
|
s := val.string
|
||||||
create l_cookies.make (5)
|
create l_cookies.make (5)
|
||||||
l_cookies.compare_objects
|
l_cookies.compare_objects
|
||||||
@@ -873,7 +873,7 @@ feature {NONE} -- Query parameters: implementation
|
|||||||
n,k,r: STRING_8
|
n,k,r: STRING_8
|
||||||
k32: STRING_32
|
k32: STRING_32
|
||||||
p,q: INTEGER
|
p,q: INTEGER
|
||||||
tb,ptb: detachable WSF_TABLE_VALUE
|
tb,ptb: detachable WSF_TABLE
|
||||||
do
|
do
|
||||||
--| Check if this is a list format such as choice[] or choice[a] or even choice[a][] or choice[a][b][c]...
|
--| Check if this is a list format such as choice[] or choice[a] or even choice[a][] or choice[a][b][c]...
|
||||||
p := a_name.index_of ('[', 1)
|
p := a_name.index_of ('[', 1)
|
||||||
@@ -885,7 +885,7 @@ feature {NONE} -- Query parameters: implementation
|
|||||||
r.left_adjust; r.right_adjust
|
r.left_adjust; r.right_adjust
|
||||||
|
|
||||||
create tb.make (n)
|
create tb.make (n)
|
||||||
if a_table.has_key (tb.name) and then attached {WSF_TABLE_VALUE} a_table.found_item as l_existing_table then
|
if a_table.has_key (tb.name) and then attached {WSF_TABLE} a_table.found_item as l_existing_table then
|
||||||
tb := l_existing_table
|
tb := l_existing_table
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -909,7 +909,7 @@ feature {NONE} -- Query parameters: implementation
|
|||||||
q := r.index_of ({CHARACTER_8} ']', p + 1)
|
q := r.index_of ({CHARACTER_8} ']', p + 1)
|
||||||
if q > p then
|
if q > p then
|
||||||
k32 := url_encoder.decoded_string (k)
|
k32 := url_encoder.decoded_string (k)
|
||||||
if attached {WSF_TABLE_VALUE} ptb.value (k32) as l_tb_value then
|
if attached {WSF_TABLE} ptb.value (k32) as l_tb_value then
|
||||||
tb := l_tb_value
|
tb := l_tb_value
|
||||||
else
|
else
|
||||||
create tb.make (n)
|
create tb.make (n)
|
||||||
@@ -942,10 +942,10 @@ feature {NONE} -- Query parameters: implementation
|
|||||||
if a_table.has_key (v.name) and then attached a_table.found_item as l_existing_value then
|
if a_table.has_key (v.name) and then attached a_table.found_item as l_existing_value then
|
||||||
if tb /= Void then
|
if tb /= Void then
|
||||||
--| Already done in previous part
|
--| Already done in previous part
|
||||||
elseif attached {WSF_MULTIPLE_STRING_VALUE} l_existing_value as l_multi then
|
elseif attached {WSF_MULTIPLE_STRING} l_existing_value as l_multi then
|
||||||
l_multi.add_value (v)
|
l_multi.add_value (v)
|
||||||
else
|
else
|
||||||
a_table.force (create {WSF_MULTIPLE_STRING_VALUE}.make_with_array (<<l_existing_value, v>>), v.name)
|
a_table.force (create {WSF_MULTIPLE_STRING}.make_with_array (<<l_existing_value, v>>), v.name)
|
||||||
check replaced: a_table.found and then a_table.found_item ~ l_existing_value end
|
check replaced: a_table.found and then a_table.found_item ~ l_existing_value end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -1605,7 +1605,7 @@ feature {NONE} -- Implementation: utilities
|
|||||||
one_starting_slash: Result[1] = '/' and (Result.count = 1 or else Result[2] /= '/')
|
one_starting_slash: Result[1] = '/' and (Result.count = 1 or else Result[2] /= '/')
|
||||||
end
|
end
|
||||||
|
|
||||||
new_string_value (a_name: READABLE_STRING_8; a_value: READABLE_STRING_8): WSF_STRING_VALUE
|
new_string_value (a_name: READABLE_STRING_8; a_value: READABLE_STRING_8): WSF_STRING
|
||||||
do
|
do
|
||||||
create Result.make (a_name, a_value)
|
create Result.make (a_name, a_value)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ feature {NONE} -- Events
|
|||||||
|
|
||||||
test_table
|
test_table
|
||||||
local
|
local
|
||||||
tb: WSF_TABLE_VALUE
|
tb: WSF_TABLE
|
||||||
do
|
do
|
||||||
create tb.make ("table")
|
create tb.make ("table")
|
||||||
assert ("Ok", True)
|
assert ("Ok", True)
|
||||||
|
|||||||
Reference in New Issue
Block a user