View Javadoc

1   package org.kuali.student.lum.course.service.impl;
2   
3   import org.kuali.student.r2.common.dto.ContextInfo;
4   import org.kuali.student.r2.common.exceptions.*;
5   import org.kuali.student.r2.core.search.dto.SearchRequestInfo;
6   import org.kuali.student.r2.core.search.dto.SearchResultCellInfo;
7   import org.kuali.student.r2.core.search.dto.SearchResultInfo;
8   import org.kuali.student.r2.core.search.dto.SearchResultRowInfo;
9   import org.kuali.student.r2.core.search.service.SearchService;
10  import org.kuali.student.r2.core.class1.type.dto.TypeInfo;
11  
12  import javax.jws.WebParam;
13  import java.util.ArrayList;
14  import java.util.List;
15  
16  public class MockSearchDispatcher implements SearchService {
17  
18      @Override
19      public List<TypeInfo> getSearchTypes(@WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException {
20          return null;  //To change body of implemented methods use File | Settings | File Templates.
21      }
22  
23      @Override
24      public TypeInfo getSearchType(@WebParam(name = "searchTypeKey") String searchTypeKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
25          return null;  //To change body of implemented methods use File | Settings | File Templates.
26      }
27  
28      @Override
29      public SearchResultInfo search(SearchRequestInfo searchRequestInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws MissingParameterException, OperationFailedException, PermissionDeniedException {
30          SearchResultInfo result = new SearchResultInfo();
31          List<SearchResultRowInfo> rows = new ArrayList();
32          SearchResultRowInfo row = new SearchResultRowInfo();
33          rows.add(row);
34          SearchResultCellInfo cell = new SearchResultCellInfo();
35          cell.setKey("mockKey");
36          cell.setValue("mockValue");
37          List<SearchResultCellInfo> cells = new ArrayList();
38          cells.add(cell);
39          row.setCells(cells);
40          result.setRows(rows);
41  //  System.out.println ("Generating mock search result for " + searchRequest.getSearchKey ());
42          return result;
43      }
44  }