KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > core > jaxws > actions > JaxWsInvokeOperation


1 /*
2  * JaxWsAddOperation.java
3  *
4  * Created on December 12, 2006, 4:36 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.websvc.core.jaxws.actions;
11
12 import org.netbeans.api.project.Project;
13 import org.netbeans.modules.websvc.core.InvokeOperationCookie;
14 import org.openide.loaders.DataObject;
15 import org.openide.nodes.Node;
16
17 /**
18  *
19  * @author mkuchtiak
20  */

21 public class JaxWsInvokeOperation implements InvokeOperationCookie {
22     
23     private Project project;
24     /** Creates a new instance of JaxWsAddOperation */
25     public JaxWsInvokeOperation(Project project) {
26         this.project=project;
27     }
28     
29     /*
30      * Adds a WS invocation to the class
31      */

32     public void invokeOperation(int targetSourceType, Node targetNode, Node serviceOperationNode) {
33         JaxWsCodeGenerator.insertMethodCall(targetSourceType, getCurrentDataObject(targetNode), targetNode, serviceOperationNode);
34     }
35     
36     private DataObject getCurrentDataObject(Node n) {
37         return (DataObject) n.getCookie(DataObject.class);
38     }
39 }
40
Popular Tags