1 25 26 package org.objectweb.jonas.webapp.jonasadmin.jonasserver; 27 28 import java.util.ArrayList ; 29 import java.util.Collections ; 30 import java.util.List ; 31 32 import javax.servlet.http.HttpServletRequest ; 33 34 import org.apache.struts.action.ActionForm; 35 import org.apache.struts.action.ActionMapping; 36 import org.objectweb.jonas.webapp.jonasadmin.common.BeanComparator; 37 40 public class JndiResourcesForm extends BasicJonasServerForm { 41 42 44 private ArrayList providers = new ArrayList (); 45 private ArrayList listNames = new ArrayList (); 46 47 49 public void reset(ActionMapping mapping, HttpServletRequest request) { 50 providers = new ArrayList (); 51 listNames = new ArrayList (); 52 } 53 54 56 public void addProvider(JndiResourceItem provider) { 57 providers.add(provider); 58 } 59 60 public List getProviders() { 61 return providers; 62 } 63 public ArrayList getListNames() { 64 return listNames; 65 } 66 67 public void setListNames(List p_List) { 68 listNames.clear(); 69 listNames = new ArrayList (p_List); 70 Collections.sort(listNames, new BeanComparator()); 71 } 72 } | Popular Tags |