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 an owl to a set of Owls.
17 */
18 public class OwlsAddOwl extends AbstractMethodCall {
19 protected ProtocolOwls _owls;
20 protected String _owl;
21
22 public OwlsAddOwl(ProtocolOwls owls, String owl) {
23 super(owls.getRoot());
24 _owls = owls;
25 _owl = owl;
26 }
27
28 public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
29 encoder.marshalOwlsAddOwl(serializer, _owls, _owl);
30 }
31
32 public Object execute() {
33 _owls.__addOwl(_owl);
34 setExecuted();
35 return null;
36 }
37 }