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 adds a property.
17 */
18 public class GenericPropertiesAddProperty extends AbstractMethodCall {
19 protected ProtocolProperties _properties;
20 protected ProtocolProperty _property;
21
22 public GenericPropertiesAddProperty(ProtocolProperties properties, ProtocolProperty property) {
23 super(properties.getRoot());
24 _properties = properties;
25 _property = property;
26 }
27
28 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException, IndexOutOfBoundsException {
29 encoder.marshalGenericPropertiesPut(serializer, _properties, _property.getKey(), _property.getValue());
30 }
31
32 public Object execute() {
33 _properties.__addProperty(_property);
34 setExecuted();
35 return null;
36 }
37 }