Class EntityController<E extends de.digitalcollections.model.identifiable.entity.Entity>
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.Entity>
-
- de.digitalcollections.cudami.server.controller.identifiable.entity.EntityController<E>
-
@RestController public class EntityController<E extends de.digitalcollections.model.identifiable.entity.Entity> extends AbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.Entity>
-
-
Constructor Summary
Constructors Constructor Description EntityController(EntityRelationService entityRelationService, EntityService<de.digitalcollections.model.identifiable.entity.Entity> entityService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>find(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, String searchTerm, String labelTerm, Locale labelLanguage, de.digitalcollections.model.list.filtering.FilterCriterion<String> entityTypeCriterion)org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Entity>getByIdentifier(javax.servlet.http.HttpServletRequest request)de.digitalcollections.model.identifiable.entity.EntitygetByRefId(long refId)de.digitalcollections.model.identifiable.entity.EntitygetByUuid(UUID uuid)List<de.digitalcollections.model.identifiable.entity.Entity>getRandomEntities(int count)protected IdentifiableService<de.digitalcollections.model.identifiable.entity.Entity>getService()-
Methods inherited from class de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController
addLabelFilter, find
-
-
-
-
Constructor Detail
-
EntityController
public EntityController(EntityRelationService entityRelationService, @Qualifier("entityService") EntityService<de.digitalcollections.model.identifiable.entity.Entity> entityService)
-
-
Method Detail
-
getService
protected IdentifiableService<de.digitalcollections.model.identifiable.entity.Entity> getService()
- Specified by:
getServicein classAbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.Entity>
-
count
@GetMapping(value={"/v6/entities/count","/v5/entities/count","/v3/entities/count","/latest/entities/count"}, produces="application/json") public long count()
-
find
@GetMapping(value="/v6/entities", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> 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) String labelTerm, @RequestParam(name="labelLanguage",required=false) Locale labelLanguage, @RequestParam(name="entityType",required=false) de.digitalcollections.model.list.filtering.FilterCriterion<String> entityTypeCriterion)
-
getByIdentifier
@GetMapping(value={"/v6/entities/identifier/**","/v5/entities/identifier/**","/latest/entities/identifier/**"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Entity> getByIdentifier(javax.servlet.http.HttpServletRequest request) throws IdentifiableServiceException, ValidationException- Overrides:
getByIdentifierin classAbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.Entity>- Throws:
IdentifiableServiceExceptionValidationException
-
getByRefId
@GetMapping(value={"/v6/entities/{refId:[0-9]+}","/v5/entities/{refId:[0-9]+}","/latest/entities/{refId:[0-9]+}"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Entity getByRefId(@PathVariable long refId)
-
getByUuid
@GetMapping(value={"/v6/entities/{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/entities/{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}}","/v2/entities/{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}}","/latest/entities/{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.identifiable.entity.Entity getByUuid(@PathVariable UUID uuid)
-
getRandomEntities
@GetMapping(value={"/v6/entities/random","/v5/entities/random","/v2/entities/random","/latest/entities/random"}, produces="application/json") public List<de.digitalcollections.model.identifiable.entity.Entity> getRandomEntities(@RequestParam(name="count",required=false,defaultValue="5") int count)
-
-