Project

General

Profile

Revision d74d7297

IDd74d729760934189de093f7e2720bf9aac05b579
Parent 8d6c8a12
Child 3dfc49ed

Added by Andreas Müller about 3 years ago

fx #6119 Implement uuidAndTitleCache remote services

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/IdentifiableListController.java
10 10
package eu.etaxonomy.cdm.remote.controller;
11 11

  
12 12
import java.io.IOException;
13
import java.util.List;
13 14
import java.util.UUID;
14 15

  
15 16
import javax.servlet.http.HttpServletRequest;
......
33 34
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
34 35
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
35 36
import eu.etaxonomy.cdm.model.common.MarkerType;
37
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
36 38
import eu.etaxonomy.cdm.persistence.query.MatchMode;
37 39
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
38 40
import eu.etaxonomy.cdm.remote.editor.MatchModePropertyEditor;
......
116 118
     */
117 119
    @RequestMapping(method = RequestMethod.GET, value={"findByIdentifier"})
118 120
    public  Pager<IdentifiedEntityDTO<T>> doFindByIdentifier(
119
    		@RequestParam(value = "class", required = false) Class type,
121
    		@RequestParam(value = "class", required = false) Class<T> type,
120 122
    		@RequestParam(value = "identifierType", required = false) String identifierType,
121 123
            @RequestParam(value = "identifier", required = false) String identifier,
122 124
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
......
186 188
        return service.findByMarker(type, markerType, value, includeEntity, pagerParams.getPageSize(), pagerParams.getPageIndex(), initializationStrategy);
187 189
    }
188 190

  
191
    /**
192
     * List identifiable entities by markers
193
     *
194
     * @param type
195
     * @param request
196
     * @param response
197
     * @return
198
     * @see IdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
199
     * @throws IOException
200
     */
201
    @RequestMapping(method = RequestMethod.GET, value={"uuidAndTitleCache"})
202
    public List<UuidAndTitleCache<T>> doGetUuidAndTitleCache(
203
            @RequestParam(value = "class", required = false) Class<T> type,
204
            @RequestParam(value = "limit", required = false) Integer limit,
205
            @RequestParam(value = "pattern", required = false) String pattern,
206
            HttpServletRequest request,
207
            HttpServletResponse response
208
            )
209
            throws IOException {
210

  
211
        if (logger.isDebugEnabled()){logger.info("doGetUuidAndTitleCache  : " + request.getRequestURI() + "?" + request.getQueryString() );}
212

  
213
        return service.getUuidAndTitleCache(type, limit, pattern);
214
    }
189 215

  
190 216
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)