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 removes a property.
17   */
18  public class GenericPropertiesRemove extends AbstractMethodCall {
19      protected ProtocolProperties _properties;
20      protected String _key;
21  
22      public GenericPropertiesRemove(ProtocolProperties properties, String key) {
23  	super(properties.getRoot());
24  	_properties = properties;
25  	_key = key;
26      }
27      
28      public void marshal(IMethodCallMarshaller encoder, XmlSerializer serializer) throws IOException, IndexOutOfBoundsException {
29  	encoder.marshalGenericPropertiesRemove(serializer, _properties, _key);
30      }
31  
32      public Object execute() {
33  	Object ret = _properties.__remove(_key);
34  	setExecuted();
35  	return ret;
36      }
37  }