1 7 package com.bull.eclipse.jonas.utils; 8 9 import java.util.Iterator ; 10 import java.util.Vector ; 11 12 import com.bull.eclipse.jonas.JonasProject; 13 14 20 public class EjbManagement { 21 22 public static Vector getPackageNames(Vector ejbNames, JonasProject prj) { 23 Iterator it = ejbNames.iterator(); 24 Vector ejbNameInProject = prj.getJarEjbName(); 25 Vector pkgName = prj.getPackageProjectFolder(); 26 Vector vec = new Vector (); 27 while (it.hasNext()) { 28 String ejbName = (String ) it.next(); 29 for (int i=0;i<ejbNameInProject.size();i++) { 30 if (ejbName.equals(ejbNameInProject.elementAt(i))) { 31 vec.add(pkgName.elementAt(i)); 32 continue; 33 } 34 } 35 } 36 return vec; 37 } 38 39 40 public static String getEjbName(String packEjb, JonasProject prj) { 41 Vector vec = prj.getPackageProjectFolder(); 42 Vector ejbNames = prj.getJarEjbName(); 43 for(int i=0;i<vec.size();i++) { 44 if (((String )vec.elementAt(i)).equals(packEjb)) { 45 return ejbNames.elementAt(i).toString(); 46 } 47 } 48 return null; 49 } 50 51 } 52 | Popular Tags |