class PreparationController {

    @RequestMapping(value = "/preparations", method = GET)
    @ApiOperation(value = "List all preparations id",
            notes = "Returns the list of preparations ids the current user is allowed to see. Creation date is always displayed in UTC time zone. See 'preparations/all' to get all details at once.")
    @Timed
    public Stream<String> list(
            @ApiParam(name = "name",
                    value = "Filter preparations by name.") @RequestParam(required = false) String name,
            @ApiParam(name = "folder_path", value = "Filter preparations by folder path.") @RequestParam(
                    required = false, name = "folder_path") String folderPath,
            @ApiParam(name = "path",
                    value = "Filter preparations by full path (<folder path>/<preparation name>).") @RequestParam(
                            required = false, name = "path") String path,
            @ApiParam(value = "Sort key (by name or date).") @RequestParam(
                    defaultValue = "lastModificationDate") Sort sort,
            @ApiParam(value = "Order for sort key (desc or asc).") @RequestParam(defaultValue = "desc") Order order) {
        LOGGER.debug("Get list of preparations (summary).");
        return preparationService.listAll(name, folderPath, path, sort, order).map(PreparationDTO::getId);
    }

}