Revision 56636
Added by Antonis Lempesis almost 5 years ago
RepositoryController.java | ||
---|---|---|
14 | 14 |
import org.springframework.security.core.Authentication; |
15 | 15 |
import org.springframework.web.bind.annotation.*; |
16 | 16 |
|
17 |
import javax.ws.rs.Path; |
|
17 | 18 |
import java.io.IOException; |
18 | 19 |
import java.util.List; |
19 | 20 |
import java.util.Map; |
... | ... | |
51 | 52 |
return repositoryService.getRepositoriesOfUser(userEmail, page, size); |
52 | 53 |
} |
53 | 54 |
|
55 |
@RequestMapping(value = "/searchRegisteredRepositories/{page}/{size}",method = RequestMethod.GET, |
|
56 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
57 |
@ResponseBody |
|
58 |
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_PROVIDE_ADMIN')") |
|
59 |
public List<RepositorySnippet> searchRegisteredRepositories(@RequestParam(name="country", required=false) String country, |
|
60 |
@RequestParam(name="typology", required=false) String typology, |
|
61 |
@RequestParam(name="englishName", required=false) String englishName, |
|
62 |
@RequestParam(name="officialName", required=false) String officialName, |
|
63 |
@RequestParam("requestSortBy") String requestSortBy, |
|
64 |
@RequestParam("order") String order, |
|
65 |
@PathVariable("page") int page, |
|
66 |
@PathVariable("size") int pageSize) throws Exception { |
|
67 |
|
|
68 |
return repositoryService.searchRegisteredRepositories(country, typology, englishName, officialName, requestSortBy, order, page, pageSize); |
|
69 |
} |
|
70 |
|
|
54 | 71 |
@RequestMapping(value = "/getRepositoryById/{id}", method = RequestMethod.GET, |
55 | 72 |
produces = MediaType.APPLICATION_JSON_VALUE) |
56 | 73 |
@ResponseBody |
Also available in: Unified diff
Merged dev-api branch to trunk. merge -r54925:HEAD https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/uoa-repository-manager-service/branches/dev-api