View Javadoc

1   /*
2    * $Id: OperationClassAddOperationCandidate.java 916 2008-07-08 15:47:06Z kwfgrid.bassheide $
3    *
4    * Copyright (c) 2008, Fraunhofer FIRST
5    * Fraunhofer Institute for Computer Architecture and Software Technology
6    * See http://www.first.fraunhofer.de and http://www.gridworkflow.org/gwes for more details.
7    */
8   package net.kwfgrid.gworkflowdl.protocol.calls;
9   
10  import net.kwfgrid.gworkflowdl.protocol.structure.ProtocolOperationClass;
11  import net.kwfgrid.gworkflowdl.protocol.structure.ProtocolOperationCandidate;
12  import org.xmlpull.v1.XmlSerializer;
13  
14  import java.io.IOException;
15  
16  public class OperationClassAddOperationCandidate extends AbstractMethodCall {
17      protected ProtocolOperationClass _operation;
18      protected ProtocolOperationCandidate _oc;
19  
20      public OperationClassAddOperationCandidate(ProtocolOperationClass operation, ProtocolOperationCandidate oc) {
21  	super(operation.getRoot());
22  	_operation = operation;
23  	_oc = oc;
24      }
25  
26      public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
27  	encoder.marshalOperationClassAddOperationCandidate(serializer, _operation, _oc);
28      }
29  
30      public Object execute() {
31  	_operation.__addOperationCandidate(_oc);
32  	setExecuted();
33  	return null;
34      }
35  }