1 package com.ca.directory.jxplorer.search; 2 3 import com.ca.commons.cbutil.*; 4 5 import java.util.*; 6 import java.util.logging.Logger ; 7 8 import javax.naming.*; 9 import javax.naming.directory.*; 10 11 import com.ca.directory.jxplorer.*; 12 import com.ca.directory.jxplorer.tree.*; 13 import com.ca.directory.jxplorer.broker.*; 14 import com.ca.commons.naming.*; 15 16 20 21 public class SearchExecute 22 { 23 private static Logger log = Logger.getLogger(SearchExecute.class.getName()); 24 25 private SearchExecute() {} 27 38 39 public static void run(SmartTree searchTree, DN baseDN, String filter, String [] attribs, int searchLevel, JNDIBroker searchBroker) 40 { 41 switch (searchLevel) { 43 case 0: { log.info( "search: [ " + baseDN + "] [" + filter + "] [baseObject] "); break; } 44 case 1: { log.info( "search: [ " + baseDN + "] [" + filter + "] [singleLevel] "); break; } 45 case 2: { log.info( "search: [ " + baseDN + "] [" + filter + "] [wholeSubtree] "); break; } 46 } 47 48 searchTree.entry=null; searchTree.clearTree(); 50 51 if ((baseDN.isEmpty()==false) && (baseDN.getRootRDN().equals(""))) 52 baseDN.remove(0); 53 54 String baseDNString = baseDN.toString(); 55 56 searchBroker.search(baseDN, filter, searchLevel, attribs); 57 } 58 } | Popular Tags |