3 * Copyright (C) 2009 EDIT European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.remote
.controller
;
12 import io
.swagger
.annotations
.Api
;
14 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
15 import org
.springframework
.stereotype
.Controller
;
16 import org
.springframework
.web
.bind
.annotation
.RequestMapping
;
18 import eu
.etaxonomy
.cdm
.api
.service
.IAgentService
;
19 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
20 import eu
.etaxonomy
.cdm
.database
.UpdatableRoutingDataSource
;
21 import eu
.etaxonomy
.cdm
.model
.agent
.AgentBase
;
24 * The AgentListController class is a Spring MVC Controller.
26 * The syntax of the mapped service URIs contains the the {datasource-name} path element.
27 * The available {datasource-name}s are defined in a configuration file which
28 * is loaded by the {@link UpdatableRoutingDataSource}. If the
29 * UpdatableRoutingDataSource is not being used in the actual application
30 * context any arbitrary {datasource-name} may be used.
32 * Methods mapped at type level, inherited from super classes ({@link BaseController}):
34 * URI: <b>/{datasource-name}/agent/</b>
36 * Depending on the URI parameters used this service returns
37 * either a {@link Pager} on or a List of the {@link AgentBase} entities
38 * identified by the <code>{agent-uuid}</code>.
39 * The returned AgentBase instances are initialized by
40 * the following strategy: {@link #DEFAULT_INIT_STRATEGY}
42 * <b>URI Parameters to return a {@link Pager}:</b>
44 * <li><b>pageNumber</b>
45 * the number of the page to be returned, the first page has the
46 * pageNumber = 1 - <i>optional parameter</i>
48 * the maximum number of entities returned per page (can be null
49 * to return all entities in a single page) - <i>optional
52 * Further restricts the type of entities to be returned.
53 * If null the base type <code><T></code> is being used. - <i>optional parameter</i>
56 * <b>URI Parameters to return a {@link List}:</b>
59 * The offset index from the start of the list. The first entity
60 * has the index = 0 - <b><i>required parameter</i></b>
61 * The start parameter is used to distinguish between the List and Pager variants!
63 * The maximum number of entities returned. - <i>optional parameter</i>
65 * Further restricts the type of entities to be returned.
66 * If null the base type <code><T></code> is being used. - <i>optional parameter</i>
70 * @author a.kohlbecker
75 @RequestMapping(value
= {"/agent"})
76 public class AgentListController
extends AbstractIdentifiableListController
<AgentBase
, IAgentService
> {
79 * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
83 public void setService(IAgentService service
) {
84 this.service
= service
;