On 27.01.11 15:25, "Bertrand Delacretaz" <[email protected]> wrote:
>>my:property@TypeHint=String[]
>> my:property@Patch=true
>> my:property=+value1
>> my:property=-value1
>
>I like the idea but a (slight) problem is that this is not idempotent,
>if the client repeats the request value1 will be added twice.
No, as I mentioned, this is under the assumption of the mv property being
a set.
The "add" operation would be implemented as (pseudo code):
Values[] v = prop.getValues();
if (v contains "value1") {
v += "value1";
)
And the "remove" operation would be:
Values[] v = prop.getValues();
for each (Value val in v) {
if (val == "value2") {
v.remove(val);
}
)
Regards,
Alex
--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel