1
2
3
4
5
6 package net.kwfgrid.gworkflowdl.protocol.calls;
7
8 import net.kwfgrid.gworkflowdl.protocol.*;
9 import net.kwfgrid.gworkflowdl.protocol.structure.*;
10
11 import java.io.IOException;
12
13 import org.xmlpull.v1.XmlSerializer;
14
15 /***
16 Modification that sets a property.
17 */
18 public class GenericPropertiesPut extends AbstractMethodCall {
19 protected ProtocolProperties _properties;
20 protected String _key;
21 protected String _value;
22
23 public GenericPropertiesPut(ProtocolProperties properties, String key, String value) {
24 super(properties.getRoot());
25 _properties = properties;
26 _key = key;
27 _value = value;
28 }
29
30 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
31 encoder.marshalGenericPropertiesPut(serializer, _properties, _key, _value);
32 }
33
34 public Object execute() {
35 Object ret = _properties.__put(_key, _value);
36 setExecuted();
37 return ret;
38 }
39 }