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 Details

    • ContentReportRestController

      public ContentReportRestController()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface InitializingBean
      Throws:
      Exception
    • getContentReportSupport

      @RequestMapping(method=GET) public ContentReportSupportResource 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 parameter
      request - HTTP request
      response - 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 report
      predicates - 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 page
      filters - querying filters received as a comma-separated string
      additionalFields - comma-separated list of extra fields to add to the report
      request - HTTP request
      response - HTTP response
      pageable - paging parameters
      Returns:
      the list of items with their respective statistics
      Throws:
      IOException