cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r591200 - /incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Date Fri, 02 Nov 2007 02:54:32 GMT
Author: bimargulies
Date: Thu Nov  1 19:54:32 2007
New Revision: 591200

URL: http://svn.apache.org/viewvc?rev=591200&view=rev
Log:
 turn off PMD problem.

Modified:
    incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java

Modified: incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java?rev=591200&r1=591199&r2=591200&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Thu Nov  1 19:54:32 2007
@@ -24,6 +24,7 @@
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.javascript.BasicNameManager;
 import org.apache.cxf.javascript.JavascriptUtils;
 import org.apache.cxf.javascript.NameManager;
 import org.apache.cxf.javascript.UnsupportedSchemaConstruct;
@@ -37,7 +38,6 @@
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.wsdl.WSDLConstants;
 
-@SuppressWarnings("unused")
 public class ServiceJavascriptBuilder extends ServiceModelVisitor {
     private static final Logger LOG = LogUtils.getL7dLogger(ServiceJavascriptBuilder.class);
 
@@ -46,9 +46,13 @@
     private SoapBindingInfo soapBindingInfo;
     private JavascriptUtils utils;
     private NameManager nameManager;
+    private StringBuffer code;
 
     public ServiceJavascriptBuilder(ServiceInfo serviceInfo) {
         super(serviceInfo);
+        code = new StringBuffer();
+        utils = new JavascriptUtils(code);
+        nameManager = new BasicNameManager(serviceInfo);
     }
 
     @Override
@@ -57,6 +61,9 @@
 
     @Override
     public void begin(InterfaceInfo intf) {
+        utils.appendLine("function " 
+                         + nameManager.getJavascriptName(intf.getName())
+                         + " () {");
     }
 
     @Override
@@ -118,5 +125,37 @@
     private void unsupportedConstruct(String messageKey, Object... args) {
         Message message = new Message(messageKey, LOG, args);
         throw new UnsupportedSchemaConstruct(message);
+    }
+
+    public boolean isRPC() {
+        return isRPC;
+    }
+
+    public void setRPC(boolean rpc) {
+        this.isRPC = rpc;
+    }
+
+    public boolean isWrapped() {
+        return isWrapped;
+    }
+
+    public void setWrapped(boolean wrapped) {
+        this.isWrapped = wrapped;
+    }
+
+    public JavascriptUtils getUtils() {
+        return utils;
+    }
+
+    public void setUtils(JavascriptUtils utils) {
+        this.utils = utils;
+    }
+
+    public NameManager getNameManager() {
+        return nameManager;
+    }
+
+    public void setNameManager(NameManager nameManager) {
+        this.nameManager = nameManager;
     }
 }



Mime
View raw message