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 key of a property.
17 */
18 public class PropertySetKey extends AbstractMethodCall {
19 protected ProtocolProperty _property;
20 protected String _newkey;
21
22 public PropertySetKey(ProtocolProperty property, String newkey) {
23 super(property.getRoot());
24 _property = property;
25 _newkey = newkey;
26 }
27
28 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
29 encoder.marshalPropertySetKey(serializer, _property, _newkey);
30 }
31
32 public Object execute() {
33 _property.__setKey(_newkey);
34 setExecuted();
35 return null;
36 }
37 }