Package org.dspace.app.rest
Class ContentReportRestController
java.lang.Object
org.dspace.app.rest.ContentReportRestController
- All Implemented Interfaces:
InitializingBean
@RestController
@RequestMapping("/api/contentreport")
public class ContentReportRestController
extends Object
implements InitializingBean
This controller receives and dispatches requests related to the
contents reports ported from DSpace 6.x (Filtered Collections
and Filtered Items).
- Author:
- Jean-François Morin (Université Laval)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResponseEntity<org.springframework.hateoas.RepresentationModel<?>>getFilteredCollections(List<String> filters, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) GET-based endpoint for the Filtered Collections contents report.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>getFilteredItems(List<String> collections, List<String> predicates, String pageNumber, String pageLimit, List<String> filters, List<String> additionalFields, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.data.domain.Pageable pageable) Endpoint for the Filtered Items contents report.
-
Constructor Details
-
ContentReportRestController
public ContentReportRestController()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
Exception
-
getContentReportSupport
-
getFilteredCollections
@PreAuthorize("hasAuthority(\'ADMIN\')") @GetMapping("/filteredcollections") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> getFilteredCollections(@RequestParam(name="filters",required=false) List<String> filters, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException GET-based endpoint for the Filtered Collections contents report. This method also serves as a feed for the HAL Browser infrastructure.- Parameters:
filters- querying filters received as a comma-separated string or as a multivalued parameterrequest- HTTP requestresponse- HTTP response- Returns:
- the list of collections with their respective statistics
- Throws:
IOException
-
getFilteredItems
@PreAuthorize("hasAuthority(\'ADMIN\')") @GetMapping("/filtereditems") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> getFilteredItems(@RequestParam(name="collections",required=false) List<String> collections, @RequestParam(name="queryPredicates",required=false) List<String> predicates, @RequestParam(name="pageNumber",defaultValue="0") String pageNumber, @RequestParam(name="pageLimit",defaultValue="10") String pageLimit, @RequestParam(name="filters",required=false) List<String> filters, @RequestParam(name="additionalFields",required=false) List<String> additionalFields, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.data.domain.Pageable pageable) throws IOException Endpoint for the Filtered Items contents report. All parameters received as comma-separated lists can also be repeated instead (e.g., filters=a&filters=b&...).- Parameters:
collections- comma-separated list UUIDs of collections to include in the reportpredicates- predicates to filter the requested items. A given predicate has the form field:operator:value (if value is required by the operator), or field:operator (if no value is required by the operator). The colon is used here as a separator to avoid conflicts with the comma, which is already used by Spring as a multi-value separator. Predicates are actually retrieved directly through the request to prevent comma-containing predicate values from being split by the Spring infrastructure.pageNumber- page number (starting at 0)pageLimit- maximum number of items per pagefilters- querying filters received as a comma-separated stringadditionalFields- comma-separated list of extra fields to add to the reportrequest- HTTP requestresponse- HTTP responsepageable- paging parameters- Returns:
- the list of items with their respective statistics
- Throws:
IOException
-