Project

General

Profile

Revision 3b2b4319

ID3b2b43193ee58f3fed2c39d3044dd05bb26ccb9d
Parent c4e0c8dd
Child 73784421

Added by Patrick Plitzner about 4 years ago

#5890 pass classification uuid instead of root node uuid

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/TaxonListController.java
130 130
     *            internally always is appended to the query string, a search
131 131
     *            always compares the query string with the beginning of a name.
132 132
     *            - <i>required parameter</i>
133
     * @param classificationNodeUuid
134
     *            the {@link UUID} of the root node of a {@link Classification} to which the
133
     * @param classificationUuid
134
     *            the {@link UUID} of the {@link Classification} to which the
135 135
     *            search is to be restricted. - <i>optional parameter</i>
136 136
     * @param areas
137 137
     *            restrict the search to a set of geographic {@link NamedArea}s.
......
158 158
    @RequestMapping(method = RequestMethod.GET, value={"search"})
159 159
    public Pager<SearchResult<TaxonBase>> doSearch(
160 160
            @RequestParam(value = "query", required = true) String query,
161
            @RequestParam(value = "classificationNodeUuid", required = false) UUID classificationNodeUuid,
161
            @RequestParam(value = "classificationUuid", required = false) UUID classificationUuid,
162 162
            @RequestParam(value = "area", required = false) DefinedTermBaseList<NamedArea> areaList,
163 163
            @RequestParam(value = "status", required = false) Set<PresenceAbsenceTerm> status,
164 164
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
......
200 200
            searchModes.add(TaxaAndNamesSearchMode.doTaxaByCommonNames);
201 201
        }
202 202

  
203
        Classification classification = null;
204
        if(classificationNodeUuid != null){
205
            TaxonNode rootNode = taxonNodeService.load(classificationNodeUuid);
206
            if(rootNode!=null){
207
                classification = rootNode.getClassification();
208
            }
209
        }
203
        Classification classification = classificationService.load(classificationUuid);
210 204

  
211 205
        return service.findTaxaAndNamesByFullText(searchModes, query,
212 206
                classification, areaSet, status, null,

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)