@CrossOrigin
@RequestMapping(value = "/search", produces = { "application/json" }, method = RequestMethod.GET)
@ApiOperation(value = "Find organization by keyWord", notes = " Returns a list of organizations which has the keyword in name / description / country, AND, which has the opportunities open, AND, which is located in the selected country. The search result is sorted by organization name in ascending order.")
public Page<OrganizationDTO> getOrganizations (
@ApiParam(value = "Keyword in Name or description or country of organization to return", required = false) @RequestParam(required = false) String keyWord,
@ApiParam(value = "Countries of organization to return", required = false) @RequestParam(required = false) List<String> countries,
@ApiParam(value = "Opportunities open in the organization", required = false) @RequestParam(required = false) Boolean open,
@ApiParam(value = "Status of the organization to return", required = false) @Pattern(regexp="[ADPNC]") @RequestParam(required = false) String status,
@ApiParam(value = "Category of the organization to return", required = false) @ListEntry @RequestParam(required = false) List<String> category,
@ApiParam(value = "Results page you want to retrieve (0..N)",required=false) @RequestParam(required=false) Integer page,
@ApiParam(value = "Number of records per page", required=false) @RequestParam(required=false) Integer size) {
System.out.println("************** OrganizationController.getOrganizations()"
+ ": keyWord=" + keyWord
+ "; countries=" + countries
+ "; open=" + open
+ "; status=" + status
+ "; category=" + category
+ "; page=" + page
+ "; size=" + size
+ " **************");
try {
return organizationService.findByCriteria(keyWord, countries, open, status, category,page,size);
} catch (Exception e) {
throw new BadRequestException(e.getMessage());
}
}
OrganizationController.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:c4sg-services
作者:
评论列表
文章目录