Revision 5ccb7fa7
Added by Andreas Müller almost 8 years ago
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/NameController.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.cdm.remote.controller; |
12 | 12 |
|
13 |
import io.swagger.annotations.Api; |
|
14 |
|
|
15 | 13 |
import java.io.IOException; |
16 | 14 |
import java.util.ArrayList; |
17 | 15 |
import java.util.Arrays; |
... | ... | |
33 | 31 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
34 | 32 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
35 | 33 |
import eu.etaxonomy.cdm.model.name.TypeDesignationBase; |
34 |
import io.swagger.annotations.Api; |
|
36 | 35 |
|
37 | 36 |
/** |
38 | 37 |
* TODO write controller documentation |
... | ... | |
65 | 64 |
setInitializationStrategy(Arrays.asList(new String[]{"$"})); //TODO still needed???? |
66 | 65 |
} |
67 | 66 |
|
68 |
/* (non-Javadoc) |
|
69 |
* @see eu.etaxonomy.cdm.remote.controller.GenericController#setService(eu.etaxonomy.cdm.api.service.IService) |
|
70 |
*/ |
|
71 | 67 |
@Autowired |
72 | 68 |
@Override |
73 | 69 |
public void setService(INameService service) { |
... | ... | |
97 | 93 |
if (request != null) { |
98 | 94 |
logger.info("doGetTypeDesignations()" + request.getRequestURI()); |
99 | 95 |
} |
100 |
TaxonNameBase tnb = getCdmBaseInstance(uuid, response, |
|
96 |
TaxonNameBase<?,?> tnb = getCdmBaseInstance(uuid, response,
|
|
101 | 97 |
(List<String>) null); |
102 | 98 |
Pager<TypeDesignationBase> p = service.getTypeDesignations(tnb, null, |
103 | 99 |
null, null, TYPEDESIGNATION_INIT_STRATEGY); |
... | ... | |
111 | 107 |
HttpServletRequest request, HttpServletResponse response)throws IOException { |
112 | 108 |
|
113 | 109 |
logger.info("doGetNameCache()" + request.getRequestURI()); |
114 |
TaxonNameBase tnb = getCdmBaseInstance(uuid, response, NAME_CACHE_INIT_STRATEGY); |
|
115 |
NonViralName nvn = (NonViralName) tnb;
|
|
110 |
TaxonNameBase<?,?> tnb = getCdmBaseInstance(uuid, response, NAME_CACHE_INIT_STRATEGY);
|
|
111 |
NonViralName<?> nvn = (NonViralName<?>) tnb;
|
|
116 | 112 |
String nameCacheString = nvn.getNameCache(); |
117 |
List result = new ArrayList<String>();
|
|
113 |
List<String> result = new ArrayList<>();
|
|
118 | 114 |
result.add(nameCacheString); |
119 | 115 |
return result; |
120 | 116 |
|
Also available in: Unified diff
Cleanup