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>
-
Field Summary
Fields inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcount()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, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) Set<de.digitalcollections.model.legal.License>getAll()org.springframework.http.ResponseEntity<de.digitalcollections.model.legal.License>org.springframework.http.ResponseEntity<de.digitalcollections.model.legal.License>protected UniqueObjectService<de.digitalcollections.model.legal.License>voidinitBinder(org.springframework.web.bind.WebDataBinder binder) de.digitalcollections.model.legal.Licensesave(de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors) de.digitalcollections.model.legal.Licenseupdate(UUID uuid, de.digitalcollections.model.legal.License license, org.springframework.validation.BindingResult errors) Methods inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
buildExamplesWithUuids, buildExampleWithUuid, delete, delete, getByUuidAndLocale, getByUuidsMethods inherited from class de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
createPageRequest, getFieldType, mergeFilters
-
Constructor Details
-
LicenseController
-
-
Method Details
-
count
@GetMapping(value={"/v6/licenses/count","/v5/licenses/count"}, produces="application/json") public long count() throws ServiceException- Overrides:
countin classAbstractUniqueObjectController<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:
ConflictExceptionServiceException
-
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:
ConflictExceptionServiceException
-
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:
findin classAbstractUniqueObjectController<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 -
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:
getByUuidin classAbstractUniqueObjectController<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
- Specified by:
getServicein classAbstractUniqueObjectController<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:
savein classAbstractUniqueObjectController<de.digitalcollections.model.legal.License>- Throws:
ServiceExceptionValidationException
-
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:
updatein classAbstractUniqueObjectController<de.digitalcollections.model.legal.License>- Throws:
ServiceExceptionValidationException
-