public Set<String> search(SSOToken token,String objName,String filter,int numOfEntries,int timeLimit,boolean sortResults,boolean ascendingOrder) throws SSOException, SMSException {
  if (objName == null || objName.length() == 0 || filter == null || filter.length() == 0) {
    throw new IllegalArgumentException("SMSFlatFileObject.search: " + "One or more arguments is null or empty.");
  }
  try {
    String filterPattern=SMSEntry.getFilterPatternService();
    MessageFormat format=new MessageFormat(filterPattern);
    Object[] args=format.parse(filter);
    if (args.length != 2 || !(args[0] instanceof String) || !(args[1] instanceof String)) {
      throw new IllegalArgumentException("SMSFlatFile.search: Error parsing filter pattern " + filter);
    }
    String serviceName=(String)args[0];
    String sunservice=(String)args[1];
    String theObjName="ou=" + serviceName + ",ou=services,"+ mRootDN;
    Set<String> subentries=null;
    subentries=getSubEntries(theObjName,"*","ou=" + sunservice,0,false,false);
    return subentries;
  }
 catch (  ParseException e) {
    throw new IllegalArgumentException("SMSFlatFileObject.search: Unexpected filter pattern " + filter);
  }
}

public Set < String > search ( SSOToken token , String objName , String filter , int numOfEntries , int timeLimit , boolean sortResults , boolean ascendingOrder ) throws SSOException , SMSException { if ( objName == null || objName . length ( ) == 0 || filter == null || filter . length ( ) == 0 ) { throw new IllegalArgumentException ( "SMSFlatFileObject.search: " + "One or more arguments is null or empty." ) ; } try { String filterPattern = SMSEntry . getFilterPatternService ( ) ; MessageFormat format = new MessageFormat ( filterPattern ) ; Object [ ] args = format . parse ( filter ) ; if ( args . length != 2 || ! ( args [ 0 ] instanceof String ) || ! ( args [ 1 ] instanceof String ) ) { throw new IllegalArgumentException ( "SMSFlatFile.search: Error parsing filter pattern " + filter ) ; } String serviceName = ( String ) args [ 0 ] ; String sunservice = ( String ) args [ 1 ] ; String theObjName = "ou=" + serviceName + ",ou=services," + mRootDN ; Set < String > subentries = null ; subentries = getSubEntries ( theObjName , "*" , "ou=" + sunservice , 0 , false , false ) ; return subentries ; } catch ( ParseException e ) { throw new IllegalArgumentException ( "SMSFlatFileObject.search: Unexpected filter pattern " + filter ) ; } }
search for a config object with the given filter . do some cheating here - callers of this method only pass service name and version in the filter in a ldap filter format . so return entries matching service name and version in the filter .
