Project

General

Profile

Revision 4642e957

ID4642e9575f7f6b5185b1c4ae4d75b80bf141c5b1
Parent 40812151
Child 2d1fc4f4

Added by Andreas Müller about 4 years ago

Create and rename Identifiable(List)Controllers

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/AbstractIdentifiableController.java
1
// $Id$
2
/**
3
* Copyright (C) 2009 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.remote.controller;
11

  
12
import org.springframework.web.bind.WebDataBinder;
13
import org.springframework.web.bind.annotation.InitBinder;
14

  
15
import eu.etaxonomy.cdm.api.service.IIdentifiableEntityService;
16
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
17
import eu.etaxonomy.cdm.persistence.query.MatchMode;
18
import eu.etaxonomy.cdm.remote.editor.MatchModePropertyEditor;
19

  
20
/**
21
 * @author a.mueller
22
 * @date 06 Oct 2016
23
 *
24
 */
25
public abstract class AbstractIdentifiableController <T extends IdentifiableEntity, SERVICE extends IIdentifiableEntityService<T>> extends BaseController<T,SERVICE>  {
26

  
27

  
28
    @InitBinder
29
    @Override
30
    public void initBinder(WebDataBinder binder) {
31
        super.initBinder(binder);
32
        binder.registerCustomEditor(MatchMode.class, new MatchModePropertyEditor());
33
    }
34

  
35
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/AbstractIdentifiableListController.java
1
// $Id$
2
/**
3
* Copyright (C) 2009 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.remote.controller;
11

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

  
16
import javax.servlet.http.HttpServletRequest;
17
import javax.servlet.http.HttpServletResponse;
18

  
19
import org.apache.commons.lang.StringUtils;
20
import org.springframework.beans.factory.annotation.Autowired;
21
import org.springframework.web.bind.WebDataBinder;
22
import org.springframework.web.bind.annotation.InitBinder;
23
import org.springframework.web.bind.annotation.RequestMapping;
24
import org.springframework.web.bind.annotation.RequestMethod;
25
import org.springframework.web.bind.annotation.RequestParam;
26

  
27
import eu.etaxonomy.cdm.api.service.IIdentifiableEntityService;
28
import eu.etaxonomy.cdm.api.service.ITermService;
29
import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
30
import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
31
import eu.etaxonomy.cdm.api.service.pager.Pager;
32
import eu.etaxonomy.cdm.model.common.CdmBase;
33
import eu.etaxonomy.cdm.model.common.DefinedTerm;
34
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
35
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
36
import eu.etaxonomy.cdm.model.common.MarkerType;
37
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
38
import eu.etaxonomy.cdm.persistence.query.MatchMode;
39
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
40
import eu.etaxonomy.cdm.remote.editor.MatchModePropertyEditor;
41

  
42
/**
43
 * @author l.morris
44
 * @date 27 Mar 2012
45
 *
46
 */
47
public abstract class AbstractIdentifiableListController <T extends IdentifiableEntity, SERVICE extends IIdentifiableEntityService<T>> extends BaseListController<T,SERVICE>  {
48

  
49

  
50
    @InitBinder
51
    @Override
52
    public void initBinder(WebDataBinder binder) {
53
        super.initBinder(binder);
54
        binder.registerCustomEditor(MatchMode.class, new MatchModePropertyEditor());
55
    }
56

  
57
	@Autowired
58
	private ITermService termService;
59

  
60
    /**
61
     * Find IdentifiableEntity objects by name
62
     * <p>
63
     *
64
     * @param query
65
     *            the string to query for. Since the wildcard character '*'
66
     *            internally always is appended to the query string, a search
67
     *            always compares the query string with the beginning of a name.
68
     *            - <i>required parameter</i>
69
     * @param pageNumber
70
     *            the number of the page to be returned, the first page has the
71
     *            pageNumber = 1 - <i>optional parameter</i>
72
     * @param pageSize
73
     *            the maximum number of entities returned per page (can be -1
74
     *            to return all entities in a single page) - <i>optional parameter</i>
75
     * @param matchMode
76
     *           valid values are "EXACT", "BEGINNING", "ANYWHERE", "END" (case sensitive !!!)
77
     * @return a Pager on a list of {@link IdentifiableEntity}s
78
     * @throws IOException
79
     */
80
    @RequestMapping(method = RequestMethod.GET, value={"findByTitle"})
81
    public Pager<T> doFindByTitle(
82
            @RequestParam(value = "query", required = true) String query,
83
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
84
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
85
            @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
86
            HttpServletRequest request,
87
            HttpServletResponse response
88
            )
89
             throws IOException {
90

  
91

  
92

  
93
        logger.info("doFind : " + request.getRequestURI() + "?" + request.getQueryString() );
94

  
95
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
96
        pagerParams.normalizeAndValidate(response);
97

  
98
        matchMode = matchMode != null ? matchMode : MatchMode.BEGINNING;
99

  
100
        return service.findByTitle(null, query, matchMode, null, pagerParams.getPageSize(), pagerParams.getPageIndex(), null, initializationStrategy);
101

  
102
    }
103

  
104
    /**
105
     * list IdentifiableEntity objects by identifiers
106
     *
107
     * @param type
108
     * @param identifierType
109
     * @param identifier
110
     * @param pageNumber
111
     * @param pageSize
112
     * @param matchMode
113
     * @param request
114
     * @param response
115
     * @param includeEntity
116
     * @return
117
     * @throws IOException
118
     */
119
    @RequestMapping(method = RequestMethod.GET, value={"findByIdentifier"})
120
    public  Pager<IdentifiedEntityDTO<T>> doFindByIdentifier(
121
    		@RequestParam(value = "class", required = false) Class<T> type,
122
    		@RequestParam(value = "identifierType", required = false) String identifierType,
123
            @RequestParam(value = "identifier", required = false) String identifier,
124
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
125
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
126
            @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
127
            @RequestParam(value = "includeEntity", required = false) Boolean includeEntity,
128
            HttpServletRequest request,
129
            HttpServletResponse response
130
            )
131
             throws IOException {
132

  
133
    	DefinedTerm definedTerm = null;
134
    	if(StringUtils.isNotBlank(identifierType)){
135
    		identifierType = StringUtils.trim(identifierType);
136
    		UUID identifierTypeUUID = UUID.fromString(identifierType);
137
    		definedTerm = CdmBase.deproxy(termService.find(identifierTypeUUID), DefinedTerm.class);
138
    	}
139

  
140
        logger.info("doFind : " + request.getRequestURI() + "?" + request.getQueryString() );
141

  
142
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber).normalizeAndValidate(response);
143

  
144
        matchMode = matchMode != null ? matchMode : MatchMode.EXACT;
145
        boolean includeCdmEntity = includeEntity == null ||  includeEntity == true ? true : false;
146
        return service.findByIdentifier(type, identifier, definedTerm , matchMode, includeCdmEntity, pagerParams.getPageSize(), pagerParams.getPageIndex(), initializationStrategy);
147
    }
148

  
149
    /**
150
     * List identifiable entities by markers
151
     *
152
     * @param type
153
     * @param markerType
154
     * @param value
155
     * @param pageNumber
156
     * @param pageSize
157
     * @param request
158
     * @param response
159
     * @return
160
     * @see AbstractIdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
161
     * @throws IOException
162
     */
163
    @RequestMapping(method = RequestMethod.GET, value={"findByMarker"})
164
    public Pager<MarkedEntityDTO<T>> doFindByMarker(
165
            @RequestParam(value = "class", required = false) Class<T> type,
166
            @RequestParam(value = "markerType", required = true) UUID markerTypeUuid,
167
            @RequestParam(value = "value", required = false) Boolean value,
168
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
169
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
170
            @RequestParam(value = "includeEntity", required = false, defaultValue="false") Boolean includeEntity,
171
            HttpServletRequest request,
172
            HttpServletResponse response
173
            )
174
            throws IOException {
175

  
176
        MarkerType markerType = null;
177
        if(markerTypeUuid != null){
178
            DefinedTermBase<?> term = CdmBase.deproxy(termService.find(markerTypeUuid), MarkerType.class);
179
            if (term != null && term.isInstanceOf(MarkerType.class)){
180
                markerType = CdmBase.deproxy(term, MarkerType.class);
181
            }
182
        }
183

  
184
        if (logger.isDebugEnabled()){logger.info("doFindByMarker [subtreeUuid]  : " + request.getRequestURI() + "?" + request.getQueryString() );}
185

  
186
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber).normalizeAndValidate(response);
187

  
188
        return service.findByMarker(type, markerType, value, includeEntity, pagerParams.getPageSize(), pagerParams.getPageIndex(), initializationStrategy);
189
    }
190

  
191
    /**
192
     * List identifiable entities by markers
193
     *
194
     * @param type
195
     * @param request
196
     * @param response
197
     * @return
198
     * @see AbstractIdentifiableListController#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
    }
215

  
216
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/AgentListController.java
73 73
@Controller
74 74
@Api(value = "agent")
75 75
@RequestMapping(value = {"/agent"})
76
public class AgentListController extends IdentifiableListController<AgentBase, IAgentService> {
76
public class AgentListController extends AbstractIdentifiableListController<AgentBase, IAgentService> {
77 77

  
78 78
    /* (non-Javadoc)
79 79
     * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ClassificationListController.java
29 29
@Controller
30 30
@Api("classification")
31 31
@RequestMapping(value = {"/classification"})
32
public class ClassificationListController extends IdentifiableListController<Classification,IClassificationService> {
32
public class ClassificationListController extends AbstractIdentifiableListController<Classification,IClassificationService> {
33 33

  
34 34
    @SuppressWarnings("unused")
35 35
    private static final Logger logger = Logger
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ClassificationPortalListController.java
46 46
@Controller
47 47
@Api("portal_classification")
48 48
@RequestMapping(value="/portal/classification")
49
public class ClassificationPortalListController extends IdentifiableListController<Classification,IClassificationService> {
49
public class ClassificationPortalListController extends AbstractIdentifiableListController<Classification,IClassificationService> {
50 50

  
51 51

  
52 52
    private static final List<String> CLASSIFICATION_INIT_STRATEGY = Arrays.asList(new String[]{
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionListController.java
77 77
@Controller
78 78
@Api("description")
79 79
@RequestMapping(value = {"/description"})
80
public class DescriptionListController extends IdentifiableListController<DescriptionBase, IDescriptionService> {
80
public class DescriptionListController extends AbstractIdentifiableListController<DescriptionBase, IDescriptionService> {
81 81

  
82 82

  
83 83
    @Autowired
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/FeatureListController.java
33 33
@Controller
34 34
@Api("feature")
35 35
@RequestMapping(value = {"/feature"}) //FIXME refactor type mappings
36
public class FeatureListController extends IdentifiableListController<DescriptionBase, IDescriptionService>
36
public class FeatureListController extends AbstractIdentifiableListController<DescriptionBase, IDescriptionService>
37 37
{
38 38
    @Autowired
39 39
    private ITermService termService;
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/FeatureTreeListController.java
27 27
@Controller
28 28
@Api("featureTree")
29 29
@RequestMapping(value = {"/featureTree"})
30
public class FeatureTreeListController extends IdentifiableListController<FeatureTree, IFeatureTreeService> {
30
public class FeatureTreeListController extends AbstractIdentifiableListController<FeatureTree, IFeatureTreeService> {
31 31

  
32 32
    /* (non-Javadoc)
33 33
     * @see eu.etaxonomy.cdm.remote.controller.BaseController#setService(eu.etaxonomy.cdm.api.service.IService)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/IdentifiableListController.java
1
// $Id$
2
/**
3
* Copyright (C) 2009 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.remote.controller;
11

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

  
16
import javax.servlet.http.HttpServletRequest;
17
import javax.servlet.http.HttpServletResponse;
18

  
19
import org.apache.commons.lang.StringUtils;
20
import org.springframework.beans.factory.annotation.Autowired;
21
import org.springframework.web.bind.WebDataBinder;
22
import org.springframework.web.bind.annotation.InitBinder;
23
import org.springframework.web.bind.annotation.RequestMapping;
24
import org.springframework.web.bind.annotation.RequestMethod;
25
import org.springframework.web.bind.annotation.RequestParam;
26

  
27
import eu.etaxonomy.cdm.api.service.IIdentifiableEntityService;
28
import eu.etaxonomy.cdm.api.service.ITermService;
29
import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
30
import eu.etaxonomy.cdm.api.service.dto.MarkedEntityDTO;
31
import eu.etaxonomy.cdm.api.service.pager.Pager;
32
import eu.etaxonomy.cdm.model.common.CdmBase;
33
import eu.etaxonomy.cdm.model.common.DefinedTerm;
34
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
35
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
36
import eu.etaxonomy.cdm.model.common.MarkerType;
37
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
38
import eu.etaxonomy.cdm.persistence.query.MatchMode;
39
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
40
import eu.etaxonomy.cdm.remote.editor.MatchModePropertyEditor;
41

  
42
/**
43
 * @author l.morris
44
 * @date 27 Mar 2012
45
 *
46
 */
47
public abstract class IdentifiableListController <T extends IdentifiableEntity, SERVICE extends IIdentifiableEntityService<T>> extends BaseListController<T,SERVICE>  {
48

  
49

  
50
    @InitBinder
51
    @Override
52
    public void initBinder(WebDataBinder binder) {
53
        super.initBinder(binder);
54
        binder.registerCustomEditor(MatchMode.class, new MatchModePropertyEditor());
55
    }
56

  
57
	@Autowired
58
	private ITermService termService;
59

  
60
    /**
61
     * Find IdentifiableEntity objects by name
62
     * <p>
63
     *
64
     * @param query
65
     *            the string to query for. Since the wildcard character '*'
66
     *            internally always is appended to the query string, a search
67
     *            always compares the query string with the beginning of a name.
68
     *            - <i>required parameter</i>
69
     * @param pageNumber
70
     *            the number of the page to be returned, the first page has the
71
     *            pageNumber = 1 - <i>optional parameter</i>
72
     * @param pageSize
73
     *            the maximum number of entities returned per page (can be -1
74
     *            to return all entities in a single page) - <i>optional parameter</i>
75
     * @param matchMode
76
     *           valid values are "EXACT", "BEGINNING", "ANYWHERE", "END" (case sensitive !!!)
77
     * @return a Pager on a list of {@link IdentifiableEntity}s
78
     * @throws IOException
79
     */
80
    @RequestMapping(method = RequestMethod.GET, value={"findByTitle"})
81
    public Pager<T> doFindByTitle(
82
            @RequestParam(value = "query", required = true) String query,
83
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
84
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
85
            @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
86
            HttpServletRequest request,
87
            HttpServletResponse response
88
            )
89
             throws IOException {
90

  
91

  
92

  
93
        logger.info("doFind : " + request.getRequestURI() + "?" + request.getQueryString() );
94

  
95
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
96
        pagerParams.normalizeAndValidate(response);
97

  
98
        matchMode = matchMode != null ? matchMode : MatchMode.BEGINNING;
99

  
100
        return service.findByTitle(null, query, matchMode, null, pagerParams.getPageSize(), pagerParams.getPageIndex(), null, initializationStrategy);
101

  
102
    }
103

  
104
    /**
105
     * list IdentifiableEntity objects by identifiers
106
     *
107
     * @param type
108
     * @param identifierType
109
     * @param identifier
110
     * @param pageNumber
111
     * @param pageSize
112
     * @param matchMode
113
     * @param request
114
     * @param response
115
     * @param includeEntity
116
     * @return
117
     * @throws IOException
118
     */
119
    @RequestMapping(method = RequestMethod.GET, value={"findByIdentifier"})
120
    public  Pager<IdentifiedEntityDTO<T>> doFindByIdentifier(
121
    		@RequestParam(value = "class", required = false) Class<T> type,
122
    		@RequestParam(value = "identifierType", required = false) String identifierType,
123
            @RequestParam(value = "identifier", required = false) String identifier,
124
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
125
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
126
            @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
127
            @RequestParam(value = "includeEntity", required = false) Boolean includeEntity,
128
            HttpServletRequest request,
129
            HttpServletResponse response
130
            )
131
             throws IOException {
132

  
133
    	DefinedTerm definedTerm = null;
134
    	if(StringUtils.isNotBlank(identifierType)){
135
    		identifierType = StringUtils.trim(identifierType);
136
    		UUID identifierTypeUUID = UUID.fromString(identifierType);
137
    		definedTerm = CdmBase.deproxy(termService.find(identifierTypeUUID), DefinedTerm.class);
138
    	}
139

  
140
        logger.info("doFind : " + request.getRequestURI() + "?" + request.getQueryString() );
141

  
142
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber).normalizeAndValidate(response);
143

  
144
        matchMode = matchMode != null ? matchMode : MatchMode.EXACT;
145
        boolean includeCdmEntity = includeEntity == null ||  includeEntity == true ? true : false;
146
        return service.findByIdentifier(type, identifier, definedTerm , matchMode, includeCdmEntity, pagerParams.getPageSize(), pagerParams.getPageIndex(), initializationStrategy);
147
    }
148

  
149
    /**
150
     * List identifiable entities by markers
151
     *
152
     * @param type
153
     * @param markerType
154
     * @param value
155
     * @param pageNumber
156
     * @param pageSize
157
     * @param request
158
     * @param response
159
     * @return
160
     * @see IdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
161
     * @throws IOException
162
     */
163
    @RequestMapping(method = RequestMethod.GET, value={"findByMarker"})
164
    public Pager<MarkedEntityDTO<T>> doFindByMarker(
165
            @RequestParam(value = "class", required = false) Class<T> type,
166
            @RequestParam(value = "markerType", required = true) UUID markerTypeUuid,
167
            @RequestParam(value = "value", required = false) Boolean value,
168
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
169
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
170
            @RequestParam(value = "includeEntity", required = false, defaultValue="false") Boolean includeEntity,
171
            HttpServletRequest request,
172
            HttpServletResponse response
173
            )
174
            throws IOException {
175

  
176
        MarkerType markerType = null;
177
        if(markerTypeUuid != null){
178
            DefinedTermBase<?> term = CdmBase.deproxy(termService.find(markerTypeUuid), MarkerType.class);
179
            if (term != null && term.isInstanceOf(MarkerType.class)){
180
                markerType = CdmBase.deproxy(term, MarkerType.class);
181
            }
182
        }
183

  
184
        if (logger.isDebugEnabled()){logger.info("doFindByMarker [subtreeUuid]  : " + request.getRequestURI() + "?" + request.getQueryString() );}
185

  
186
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber).normalizeAndValidate(response);
187

  
188
        return service.findByMarker(type, markerType, value, includeEntity, pagerParams.getPageSize(), pagerParams.getPageIndex(), initializationStrategy);
189
    }
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
    }
215

  
216
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/MediaListController.java
27 27
@Controller
28 28
@Api("media")
29 29
@RequestMapping(value = {"/media"})
30
public class MediaListController extends IdentifiableListController<Media, IMediaService> {
30
public class MediaListController extends AbstractIdentifiableListController<Media, IMediaService> {
31 31

  
32 32
    /* (non-Javadoc)
33 33
     * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/NameListController.java
37 37
@Controller
38 38
@Api("name")
39 39
@RequestMapping(value = {"/name"})
40
public class NameListController extends IdentifiableListController<TaxonNameBase, INameService> {
40
public class NameListController extends AbstractIdentifiableListController<TaxonNameBase, INameService> {
41 41

  
42 42
    /* (non-Javadoc)
43 43
     * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/OccurrenceListController.java
54 54
@Controller
55 55
@Api("occurrence")
56 56
@RequestMapping(value = {"/occurrence"})
57
public class OccurrenceListController extends IdentifiableListController<SpecimenOrObservationBase, IOccurrenceService> {
57
public class OccurrenceListController extends AbstractIdentifiableListController<SpecimenOrObservationBase, IOccurrenceService> {
58 58

  
59 59

  
60 60
    @Autowired
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/PolytomousKeyListController.java
39 39
@Controller
40 40
@Api("polytomousKey")
41 41
@RequestMapping(value = {"/polytomousKey"})
42
public class PolytomousKeyListController extends IdentifiableListController<PolytomousKey, IPolytomousKeyService> {
42
public class PolytomousKeyListController extends AbstractIdentifiableListController<PolytomousKey, IPolytomousKeyService> {
43 43

  
44 44
    public static final Logger logger = Logger.getLogger(PolytomousKeyListController.class);
45 45

  
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ReferenceListController.java
27 27
@Controller
28 28
@Api("reference")
29 29
@RequestMapping(value = {"/reference"})
30
public class ReferenceListController extends IdentifiableListController<Reference, IReferenceService> {
30
public class ReferenceListController extends AbstractIdentifiableListController<Reference, IReferenceService> {
31 31

  
32 32
    /* (non-Javadoc)
33 33
     * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/TaxonListController.java
80 80
@Controller
81 81
@Api("taxon")
82 82
@RequestMapping(value = {"/taxon"})
83
public class TaxonListController extends IdentifiableListController<TaxonBase, ITaxonService> {
83
public class TaxonListController extends AbstractIdentifiableListController<TaxonBase, ITaxonService> {
84 84

  
85 85

  
86 86
    private static final List<String> SIMPLE_TAXON_INIT_STRATEGY = DEFAULT_INIT_STRATEGY;
......
465 465
     * @param request
466 466
     * @param response
467 467
     * @return
468
     * @see IdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
468
     * @see AbstractIdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
469 469
     * @throws IOException
470 470
     */
471 471
    @RequestMapping(method = RequestMethod.GET, value={"findByIdentifier"}, params={"subtree"})
......
516 516
     * @param request
517 517
     * @param response
518 518
     * @return
519
     * @see IdentifiableListController#doFindByMarker(Class, UUID, Boolean, Integer, Integer, Boolean, HttpServletRequest, HttpServletResponse)
519
     * @see AbstractIdentifiableListController#doFindByMarker(Class, UUID, Boolean, Integer, Integer, Boolean, HttpServletRequest, HttpServletResponse)
520 520
     * @see TaxonListController#doFindByIdentifier(Class, UUID, String, Integer, Integer, MatchMode, Boolean, UUID, HttpServletRequest, HttpServletResponse)
521
     * @see IdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
521
     * @see AbstractIdentifiableListController#doFindByIdentifier(Class, String, String, Integer, Integer, MatchMode, Boolean, HttpServletRequest, HttpServletResponse)
522 522
     * @throws IOException
523 523
     */
524 524
    @RequestMapping(method = RequestMethod.GET, value={"findByMarker"}, params={"subtree"})
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/TermListController.java
28 28
@Controller
29 29
@Api("term")
30 30
@RequestMapping(value = {"/term"})
31
public class TermListController extends IdentifiableListController<DefinedTermBase, ITermService> {
31
public class TermListController extends AbstractIdentifiableListController<DefinedTermBase, ITermService> {
32 32

  
33 33

  
34 34
    /* (non-Javadoc)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/VocabularyListController.java
27 27
@Controller
28 28
@Api("termVocabulary")
29 29
@RequestMapping(value = {"/termVocabulary"})
30
public class VocabularyListController extends IdentifiableListController<TermVocabulary, IVocabularyService> {
30
public class VocabularyListController extends AbstractIdentifiableListController<TermVocabulary, IVocabularyService> {
31 31

  
32 32
    public static final Logger logger = Logger.getLogger(VocabularyListController.class);
33 33

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)