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.*;
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 all properties.
17   */
18  public class GenericPropertiesSetProperties extends AbstractMethodCall {
19      protected ProtocolProperties _properties;
20      protected ProtocolProperty[] _props;
21  
22      public GenericPropertiesSetProperties(ProtocolProperties properties, ProtocolProperty[] props) {
23  	super(properties.getRoot());
24  	_properties = properties;
25  	_props = props;
26      }
27      
28      public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException {
29  	encoder.marshalGenericPropertiesSetProperties(serializer, _properties, _props);
30      }
31  
32      public Object execute() {
33  	_properties.__setProperties(_props);
34  	setExecuted();
35  	return null;
36      }
37  }