Class LicenseController


  • @RestController
    public class LicenseController
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count()  
      org.springframework.http.ResponseEntity<Void> deleteByUrl​(URL url)  
      org.springframework.http.ResponseEntity<Void> deleteByUuid​(UUID uuid)  
      org.springframework.http.ResponseEntity<Void> deleteByUuids​(List<UUID> uuids)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License> find​(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm, de.digitalcollections.model.list.filtering.FilterCriterion<String> labelCriterion, de.digitalcollections.model.list.filtering.FilterCriterion<String> localeCriterion)  
      List<de.digitalcollections.model.legal.License> getAll()  
      de.digitalcollections.model.legal.License getByUrl​(URL url)  
      de.digitalcollections.model.legal.License getByUuid​(UUID uuid)  
      void initBinder​(org.springframework.web.bind.WebDataBinder binder)  
      de.digitalcollections.model.legal.License save​(de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.legal.License update​(UUID uuid, de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors)  
    • Constructor Detail

      • LicenseController

        public LicenseController​(LicenseService service)
    • Method Detail

      • count

        @GetMapping(value={"/v6/licenses/count","/v5/licenses/count"},
                    produces="application/json")
        public long count()
      • deleteByUrl

        @DeleteMapping(value={"/v6/licenses","/v5/licenses"},
                       params="url",
                       produces="application/json")
        public org.springframework.http.ResponseEntity<Void> deleteByUrl​(@RequestParam(name="url",required=true)
                                                                         URL url)
      • deleteByUuid

        @DeleteMapping(value={"/v6/licenses/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}","/v5/licenses/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}"},
                       produces="application/json")
        public org.springframework.http.ResponseEntity<Void> deleteByUuid​(@PathVariable("uuid")
                                                                          UUID uuid)
      • deleteByUuids

        @DeleteMapping(value={"/v6/licenses","/v5/licenses"},
                       produces="application/json")
        public org.springframework.http.ResponseEntity<Void> deleteByUuids​(@RequestBody
                                                                           List<UUID> uuids)
      • find

        @GetMapping(value="/v6/licenses",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License> find​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                    int pageNumber,
                                                                                                                    @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                    int pageSize,
                                                                                                                    @RequestParam(name="sortBy",required=false)
                                                                                                                    List<de.digitalcollections.model.list.sorting.Order> sortBy,
                                                                                                                    @RequestParam(name="searchTerm",required=false)
                                                                                                                    String searchTerm,
                                                                                                                    @RequestParam(name="label",required=false)
                                                                                                                    de.digitalcollections.model.list.filtering.FilterCriterion<String> labelCriterion,
                                                                                                                    @RequestParam(name="locale",required=false)
                                                                                                                    de.digitalcollections.model.list.filtering.FilterCriterion<String> localeCriterion)
      • getAll

        @GetMapping(value={"/v6/licenses/all","/v5/licenses/all"},
                    produces="application/json")
        public List<de.digitalcollections.model.legal.License> getAll()
      • getByUrl

        @GetMapping(value={"/v6/licenses","/v5/licenses"},
                    params="url",
                    produces="application/json")
        public de.digitalcollections.model.legal.License getByUrl​(@RequestParam(name="url",required=true)
                                                                  URL url)
                                                           throws MalformedURLException
        Throws:
        MalformedURLException
      • getByUuid

        @GetMapping(value={"/v6/licenses/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}","/v5/licenses/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}"},
                    produces="application/json")
        public de.digitalcollections.model.legal.License getByUuid​(@PathVariable
                                                                   UUID uuid)
      • initBinder

        @InitBinder
        public void initBinder​(org.springframework.web.bind.WebDataBinder binder)