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 GenericPropertiesSetProperty extends AbstractMethodCall {
19 protected ProtocolProperties _properties;
20 protected int _index;
21 protected ProtocolProperty _property;
22
23 public GenericPropertiesSetProperty(ProtocolProperties properties, int index, ProtocolProperty property) {
24 super(properties.getRoot());
25 _properties = properties;
26 _index = index;
27 _property = property;
28 }
29
30 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException, IndexOutOfBoundsException {
31 encoder.marshalGenericPropertiesSetProperty(serializer, _properties, _index, _property);
32 }
33
34 public Object execute() {
35 _properties.__setProperty(_index, _property);
36 setExecuted();
37 return null;
38 }
39 }