1 26 27 package org.nextime.ion.frontoffice.objectSelector; 28 29 import java.util.Collection ; 30 import java.util.Hashtable ; 31 import java.util.Vector ; 32 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 36 import org.nextime.ion.framework.business.Section; 37 import org.nextime.ion.framework.mapping.Mapping; 38 import org.nextime.ion.framework.logger.Logger; 39 40 44 public class ListOnlineSubSections implements ObjectSelector { 45 46 public Collection selectObjects(Hashtable params, HttpServletRequest request, HttpServletResponse response) throws SelectException { 47 try { 48 String rootSection = (String ) params.get("rootSection"); 49 Section root = Section.getInstance(rootSection); 50 Vector v = root.listSubSections(); 51 Vector result = new Vector (); 52 for( int i=0; i<v.size(); i++ ) { 53 Section s = (Section)v.get(i); 54 if( !"offline".equalsIgnoreCase(s.getMetaData("status")+"") ) { 55 result.add(s); 56 } 57 } 58 return result; 59 } catch (Exception e) { 60 Logger.getInstance().error("Erreur du SelectObject", this, e); 61 throw new SelectException(e.getMessage()); 62 } 63 } 64 65 } | Popular Tags |