1 19 20 package org.netbeans.modules.j2ee.ejbcore.api.ui; 21 22 import java.io.IOException ; 23 import org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.AddCmpFieldAction; 24 import org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.AddFinderMethodStrategy; 25 import org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.AddSelectMethodStrategy; 26 import org.netbeans.modules.j2ee.ejbcore.ui.logicalview.entres.CallEjbDialog; 27 import org.openide.ErrorManager; 28 import org.openide.filesystems.FileObject; 29 30 34 public final class CallEjb { 35 36 public static boolean showCallEjbDialog(FileObject fileObject, String className, String title) { 37 try { 38 return new CallEjbDialog().open(fileObject, className, title); 39 } catch (IOException ex) { 40 ErrorManager.getDefault().notify(ex); 41 return false; 42 } 43 } 44 45 public static boolean addCmpField(FileObject fileObject, String className, FileObject ddFile) { 46 return AddCmpFieldAction.addCmpField(fileObject, className, ddFile); 47 } 48 49 public static void addFinderMethod(FileObject fileObject, String beanClass) throws IOException { 50 new AddFinderMethodStrategy().addMethod(fileObject, beanClass); 51 } 52 53 public static void addSelectMethod(FileObject fileObject, String beanClass) throws IOException { 54 new AddSelectMethodStrategy().addMethod(fileObject, beanClass); 55 } 56 } 57 | Popular Tags |