View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5    */
6   package net.kwfgrid.gworkflowdl.protocol.calls;
7   
8   import net.kwfgrid.gworkflowdl.protocol.structure.*;
9   
10  import java.io.IOException;
11  
12  import org.xmlpull.v1.XmlSerializer;
13  
14  /***
15     Modification that sets the OperationCandidates array of a OperationClass.
16   */
17  public class OperationClassSetOperationCandidates extends AbstractMethodCall {
18      protected ProtocolOperationClass _o;
19      protected ProtocolOperationCandidate[] _ocs;
20  
21      public OperationClassSetOperationCandidates(ProtocolOperationClass operation, ProtocolOperationCandidate[] ocs) {
22  	super(operation.getRoot());
23  	_o = operation;
24  	_ocs = ocs;
25      }
26      
27      public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
28  	encoder.marshalOperationClassSetOperationCandidates(serializer, _o, _ocs);
29      }
30  
31      public Object execute() {
32  	_o.__setOperationCandidates(_ocs);
33  	setExecuted();
34  	return null;
35      }
36  }