You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/02/09 10:26:52 UTC

svn commit: r153043 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis: addressing/ clientapi/ deployment/ deployment/listener/ deployment/repository/utill/ impl/description/ impl/handlers/ impl/llom/builder/

Author: chinthaka
Date: Wed Feb  9 01:26:48 2005
New Revision: 153043

URL: http://svn.apache.org/viewcvs?view=rev&rev=153043
Log:
Changing some code after analysing using IDEA

Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Correlator.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/WSInfoList.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/description/FlowImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/handlers/AbstractHandler.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/AddressingConstants.java Wed Feb  9 01:26:48 2005
@@ -17,7 +17,7 @@
  *
  * This will hold all the constants related WS-Addressing
  */
-public class AddressingConstants {
+public interface AddressingConstants {
     public static final String WSA_MESSAGE_ID = "MessageID";
     public static final String WSA_RELATES_TO = "RelatesTo";
     public static final String WSA_RELATES_TO_RELATIONSHIP_TYPE = "RelationshipType";

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Correlator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Correlator.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Correlator.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Correlator.java Wed Feb  9 01:26:48 2005
@@ -1,6 +1,7 @@
 package org.apache.axis.clientapi;
 
 import java.util.Hashtable;
+import java.util.HashMap;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation. <p/>Licensed under the
@@ -17,12 +18,12 @@
 public class Correlator {
     private static Correlator instance = null;
 
-    private static Hashtable correlationHash = null;
+    private static HashMap correlationHash = null;
 
     private Correlator() {
         // Exists only to defeat instantiation.
 
-        correlationHash = new Hashtable();
+        correlationHash = new HashMap();
     }
 
     public static Correlator getInstance() {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java Wed Feb  9 01:26:48 2005
@@ -29,6 +29,8 @@
 import java.net.URLClassLoader;
 import java.util.Iterator;
 import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -52,11 +54,11 @@
     /**
      * This will store all the web Services to deploye
      */
-    private Vector wsToDeploy = new Vector();
+    private List wsToDeploy = new ArrayList();
     /**
      * this will store all the web Services to undeploye
      */
-    private Vector wsToUnDeploy = new Vector();
+    private List wsToUnDeploy = new ArrayList();
 
     /**
      * to keep a ref to engine register
@@ -362,32 +364,22 @@
         wsToUnDeploy.add(file);
     }
 
-    public void doDeploye() {
+    public void doDeploy() {
         //todo complete this
         if (wsToDeploy.size() > 0) {
             for (int i = 0; i < wsToDeploy.size(); i++) {
-                currentFileItem = (HDFileItem) wsToDeploy.elementAt(i);
+                currentFileItem = (HDFileItem) wsToDeploy.get(i);
                 int type = currentFileItem.getType();
                 UnZipJAR unZipJAR = new UnZipJAR();
                 switch (type) {
                     case SERVICE:
                         {
                             try {
-//                            	String serviceName = currentFileItem.getName();
-//                            	int endIndex = serviceName.lastIndexOf('.');
-//                            	int startIndex =  serviceName.lastIndexOf('/');
-//                            	if(startIndex == -1){
-//									startIndex =  serviceName.lastIndexOf('\\');
-//                            	}
-                            	
-	//							AxisService service = new AxisService(new QName(serviceName.substring(startIndex +1,endIndex -1)));
-                            	
+//
                                 AxisService service = new AxisService();
                                 unZipJAR.unzipService(currentFileItem.getAbsolutePath(), this, service);
                                 addnewService(service);
                                 log.info("Deployement WS Name  " + currentFileItem.getName());
-                                // currentFileItem = null;
-                                //  break;
                             }catch (DeploymentException de){
                                 throw new RuntimeException(de.getMessage());
                             }catch (AxisFault axisFault) {
@@ -406,8 +398,6 @@
                                 unZipJAR.unzipModule(currentFileItem.getAbsolutePath(), this,metaData);
                                 addNewModule(metaData);
                                 log.info("Moduel WS Name  " + currentFileItem.getName() + " modulename :" + metaData.getName());
-                                // currentFileItem = null;
-                                //  break;
                             } catch (DeploymentException e) {
                                    throw new RuntimeException(e.getMessage());
                             } catch (AxisFault axisFault) {
@@ -417,22 +407,23 @@
                             }
                             break;
                         }
+
                 }
             }
         }
-        wsToDeploy.removeAllElements();
+        wsToDeploy.clear();
     }
 
     public void doUnDeploye() {
         //todo complete this
         if (wsToUnDeploy.size() > 0) {
             for (int i = 0; i < wsToUnDeploy.size(); i++) {
-                WSInfo wsInfo = (WSInfo) wsToUnDeploy.elementAt(i);
+                WSInfo wsInfo = (WSInfo) wsToUnDeploy.get(i);
                 log.info("UnDeployement WS Name  " + wsInfo.getFilename());
             }
 
         }
-        wsToUnDeploy.removeAllElements();
+        wsToUnDeploy.clear();
     }
 
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/listener/RepositoryListenerImpl.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/listener/RepositoryListenerImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/listener/RepositoryListenerImpl.java Wed Feb  9 01:26:48 2005
@@ -6,6 +6,8 @@
 
 import java.io.File;
 import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -27,7 +29,7 @@
     /**
      * to store curreently checking jars
      */
-    private Vector current_jars;
+    private List current_jars;
     /**
      * Referance to a WSInfoList
      */
@@ -108,13 +110,13 @@
      */
     private void searchWS(String folderName, int type) {
         String files[];
-        current_jars = new Vector();
+        current_jars = new ArrayList();
         File root = new File(folderName);
         // adding the root folder to the vector
-        current_jars.addElement(root);
+        current_jars.add(root);
 
         while (current_jars.size() > 0) {         // loop until empty
-            File dir = (File) current_jars.elementAt(0); // get first dir
+            File dir = (File) current_jars.get(0); // get first dir
             current_jars.remove(0);       // remove it
             files = dir.list();              // get list of files
             if (files == null) {
@@ -123,7 +125,7 @@
             for (int i = 0; i < files.length; i++) { // iterate
                 File f = new File(dir, files[i]);
                 if (f.isDirectory()) {        // see if it's a directory
-                    current_jars.insertElementAt(f, 0);
+                    current_jars.add(0, f);
                 } // add dir to start of agenda
                 else if (isJarFile(f.getName())) {
                     wsinfoList.addWSInfoItem(f, type);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/WSInfoList.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/WSInfoList.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/WSInfoList.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/WSInfoList.java Wed Feb  9 01:26:48 2005
@@ -6,6 +6,8 @@
 import java.io.File;
 import java.util.Iterator;
 import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -26,12 +28,12 @@
     /**
      * This is to store all the jar files in a specified folder (WEB_INF)
      */
-    private static Vector jarlist = new Vector();
+    private static List jarlist = new ArrayList();
 
     /**
      * All the curently updated jars
      */
-    public Vector currentjars = new Vector();
+    public List currentjars = new ArrayList();
 
     /**
      * Referance to DeploymentEngine to make update
@@ -46,7 +48,7 @@
      * This method is used to initialize the vector
      */
     public void init() {
-        jarlist.removeAllElements();
+        jarlist.clear();
     }
 
     /**
@@ -84,6 +86,7 @@
 
                         }
                     }
+                    break;
                 }
             case MODULE:
                 {
@@ -103,6 +106,7 @@
 
                         }
                     }
+                    break;
                 }
         }
         String jarname = file.getName();
@@ -119,7 +123,7 @@
     public WSInfo getFileItem(String filename) {
         int sise = jarlist.size();
         for (int i = 0; i < sise; i++) {
-            WSInfo wsInfo = (WSInfo) jarlist.elementAt(i);
+            WSInfo wsInfo = (WSInfo) jarlist.get(i);
             if (wsInfo.getFilename().equals(filename)) {
                 return wsInfo;
             }
@@ -165,15 +169,15 @@
     public void checkForUndeploye() {
         Iterator iter = jarlist.listIterator();
         int size = currentjars.size();
-        Vector tempvector = new Vector();
-        tempvector.removeAllElements();
+        List tempvector = new ArrayList();
+        tempvector.clear();
         String filename = "";
         boolean exist = false;
         while (iter.hasNext()) {
             WSInfo fileitem = (WSInfo) iter.next();
             exist = false;
             for (int i = 0; i < size; i++) {
-                filename = (String) currentjars.elementAt(i);
+                filename = (String) currentjars.get(i);
                 if (filename.equals(fileitem.getFilename())) {
                     exist = true;
                     break;
@@ -189,11 +193,11 @@
         }
 
         for (int i = 0; i < tempvector.size(); i++) {
-            WSInfo fileItem = (WSInfo) tempvector.elementAt(i);
-            jarlist.removeElement(fileItem);
+            WSInfo fileItem = (WSInfo) tempvector.get(i);
+            jarlist.remove(fileItem);
         }
-        tempvector.removeAllElements();
-        currentjars.removeAllElements();
+        tempvector.clear();
+        currentjars.clear();
     }
 
 
@@ -203,7 +207,7 @@
     public void update() {
         checkForUndeploye();
         deplorer.doUnDeploye();
-        deplorer.doDeploye();
+        deplorer.doDeploy();
 
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/description/FlowImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/description/FlowImpl.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/description/FlowImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/description/FlowImpl.java Wed Feb  9 01:26:48 2005
@@ -20,11 +20,13 @@
 import org.apache.axis.description.HandlerMetaData;
 
 import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
 
 public class FlowImpl implements Flow {
-   protected Vector list = null; 
+   protected List list = null;
    public FlowImpl(){
-        list = new Vector();
+        list = new ArrayList();
    }
    public void addHandler(HandlerMetaData handler) {
        list.add(handler);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/handlers/AbstractHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/handlers/AbstractHandler.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/handlers/AbstractHandler.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/handlers/AbstractHandler.java Wed Feb  9 01:26:48 2005
@@ -34,8 +34,6 @@
         return handlerDesc.getName();
     }
 
-    public abstract void invoke(MessageContext msgContext) throws AxisFault;
-
     public void revoke(MessageContext msgContext) {
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java?view=diff&r1=153042&r2=153043
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java Wed Feb  9 01:26:48 2005
@@ -1,6 +1,8 @@
 package org.apache.axis.impl.llom.builder;
 
 import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.axis.encoding.Encoder;
 import org.apache.axis.om.OMConstants;
@@ -45,7 +47,7 @@
 
     // ============= For content handler ============
     private OMNode lastNode = null;
-    private Vector nameSpaces = new Vector();
+    private List nameSpaces = new ArrayList();
     // ==============================================
 
 
@@ -197,7 +199,7 @@
         addNewNode(element, lastNode);
 
         for (int i = 0; i < nameSpaces.size(); i++) {
-            OMNamespace ns = (OMNamespace) nameSpaces.elementAt(i);
+            OMNamespace ns = (OMNamespace) nameSpaces.get(i);
             element.declareNamespace(ns);
         }
         nameSpaces.clear();