1 19 20 package org.netbeans.modules.j2ee.sun.share.config; 21 22 import javax.swing.SwingUtilities ; 23 import javax.enterprise.deploy.model.DDBean ; 24 25 30 public final class Utils { 31 32 static final String SERVER_ID_AS81 = "J2EE"; static final String SERVER_ID_AS90 = "JavaEE5"; static final String SERVER_ID_WS70 = "SUNWebserver7"; 38 41 public static boolean isSunServer(String serverId) { 42 boolean result = false; 43 if(SERVER_ID_AS81.equals(serverId) || SERVER_ID_AS90.equals(serverId) 44 || SERVER_ID_WS70.equals(serverId)) { 45 result = true; 46 } 47 return result; 48 } 49 50 54 public static String getField(DDBean bean, String fieldId) { 55 String result = null; 56 DDBean [] childFields = bean.getChildBean(fieldId); 57 if(childFields.length > 0) { 58 result = childFields[0].getText(); 59 } 60 return result; 61 } 62 } 63 | Popular Tags |