Class EntityController<E extends de.digitalcollections.model.identifiable.entity.Entity>


@RestController public class EntityController<E extends de.digitalcollections.model.identifiable.entity.Entity> extends AbstractEntityController<de.digitalcollections.model.identifiable.entity.Entity>
  • Constructor Details

    • EntityController

      public EntityController(EntityToEntityRelationService entityRelationService, @Qualifier("entityService") EntityService<de.digitalcollections.model.identifiable.entity.Entity> entityService)
  • Method Details

    • count

      @GetMapping(value={"/v6/entities/count","/v5/entities/count","/v3/entities/count","/latest/entities/count"}, produces="application/json") public long count() throws ServiceException
      Overrides:
      count in class AbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Entity>
      Throws:
      ServiceException
    • 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="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.identifiable.entity.Entity>
      Throws:
      ServiceException
    • 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 ServiceException, ValidationException
      Overrides:
      getByIdentifier in class AbstractIdentifiableController<de.digitalcollections.model.identifiable.entity.Entity>
      Throws:
      ServiceException
      ValidationException
    • getByRefId

      @GetMapping(value={"/v6/entities/{refId:[0-9]+}","/v5/entities/{refId:[0-9]+}","/latest/entities/{refId:[0-9]+}"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Entity> getByRefId(@PathVariable long refId) throws ServiceException
      Overrides:
      getByRefId in class AbstractEntityController<de.digitalcollections.model.identifiable.entity.Entity>
      Throws:
      ServiceException
    • 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 org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Entity> getByUuid(@PathVariable UUID uuid) throws ServiceException
      Overrides:
      getByUuid in class AbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Entity>
      Throws:
      ServiceException
    • 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) throws ServiceException
      Throws:
      ServiceException
    • findRelatedFileResources

      @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}$}/related/fileresources","/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}$}/related/fileresources","/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}$}/related/fileresources","/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}$}/related/fileresources"}, produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findRelatedFileResources(@PathVariable UUID uuid) throws ServiceException
      Throws:
      ServiceException
    • findRelations

      @GetMapping(value={"/v6/entities/relations/{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/relations/{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/relations/{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/relations/{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.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> findRelations(@PathVariable UUID uuid) throws ServiceException
      Throws:
      ServiceException
    • getService

      protected EntityService<de.digitalcollections.model.identifiable.entity.Entity> getService()
      Specified by:
      getService in class AbstractEntityController<de.digitalcollections.model.identifiable.entity.Entity>