Class LicenseController

java.lang.Object
de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
de.digitalcollections.cudami.server.controller.legal.LicenseController

@RestController public class LicenseController extends AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
  • Constructor Details

    • LicenseController

      public LicenseController(LicenseService service)
  • Method Details

    • count

      @GetMapping(value={"/v6/licenses/count","/v5/licenses/count"}, produces="application/json") public long count() throws ServiceException
      Overrides:
      count in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
      Throws:
      ServiceException
    • 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) throws ServiceException
      Throws:
      ServiceException
    • 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) throws ConflictException, ServiceException
      Throws:
      ConflictException
      ServiceException
    • deleteByUuids

      @DeleteMapping(value={"/v6/licenses","/v5/licenses"}, produces="application/json") public org.springframework.http.ResponseEntity<Void> deleteByUuids(@RequestBody List<UUID> uuids) throws ConflictException, ServiceException
      Throws:
      ConflictException
      ServiceException
    • 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="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException
      Overrides:
      find in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
      Throws:
      ServiceException
    • getAll

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

      @GetMapping(value={"/v6/licenses","/v5/licenses"}, params="url", produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.legal.License> getByUrl(@RequestParam(name="url",required=true) URL url) throws MalformedURLException, ServiceException
      Throws:
      MalformedURLException
      ServiceException
    • 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 org.springframework.http.ResponseEntity<de.digitalcollections.model.legal.License> getByUuid(@PathVariable UUID uuid) throws ServiceException
      Overrides:
      getByUuid in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
      Throws:
      ServiceException
    • getLanguages

      @GetMapping(value="/v6/licenses/languages", produces="application/json") public List<Locale> getLanguages() throws ServiceException
      Throws:
      ServiceException
    • getService

      protected UniqueObjectService<de.digitalcollections.model.legal.License> getService()
      Specified by:
      getService in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
    • initBinder

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

      @PostMapping(value={"/v6/licenses","/v5/licenses"}, produces="application/json") public de.digitalcollections.model.legal.License save(@RequestBody de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException
      Overrides:
      save in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
      Throws:
      ServiceException
      ValidationException
    • update

      @PutMapping(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 update(@PathVariable("uuid") UUID uuid, @RequestBody de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException
      Overrides:
      update in class AbstractUniqueObjectController<de.digitalcollections.model.legal.License>
      Throws:
      ServiceException
      ValidationException