class OcdsController extends GenericOCDSController {

    @ApiOperation(value = "Resturns all available releases, filtered by the given criteria.")
    @RequestMapping(value = "/api/ocds/release/all", method = {RequestMethod.POST, RequestMethod.GET},
            produces = "application/json")
    @JsonView(Views.Public.class)
    public List<Release> ocdsReleases(@ModelAttribute @Valid final YearFilterPagingRequest releaseRequest) {

        Pageable pageRequest = new PageRequest(releaseRequest.getPageNumber(), releaseRequest.getPageSize(),
                Direction.ASC, "id"
        );

        Query query = query(getYearDefaultFilterCriteria(
                releaseRequest,
                MongoConstants.FieldNames.TENDER_PERIOD_START_DATE
        ))
                .with(pageRequest);
        return mongoTemplate.find(query, Release.class);

    }

}