Class EntityController

java.lang.Object
de.uniba.minf.core.rest.controller.BaseRestController
de.uniba.minf.registry.controller.EntityController
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@RestController @RequestMapping("/api/v1/e") public class EntityController extends de.uniba.minf.core.rest.controller.BaseRestController implements org.springframework.context.ApplicationContextAware
  • Field Summary

    Fields inherited from class de.uniba.minf.core.rest.controller.BaseRestController

    authInfoHelper, jsonMapper, linksHelper, messageSource
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    de.uniba.minf.core.rest.model.RestResponse
    deleteEntity(String entityId, jakarta.servlet.http.HttpServletResponse resp, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    get(jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.registry.model.entity.Entity
    get(String id, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    getByDefinition(String name, boolean includeDrafts, boolean ui, String lang, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    getByImportId(String importId, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemResponse
    getEntry(String name, com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.core.rest.model.RestResponse
    importEntities(String name, String body, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale)
     
    de.uniba.minf.core.rest.model.RestResponse
    postEntityForm(String entityId, com.fasterxml.jackson.databind.JsonNode formData, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    searchEntries(String name, com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext appContext)
     
    de.uniba.minf.core.rest.model.RestResponse
    validateEntities(String name, String body, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale)
     

    Methods inherited from class de.uniba.minf.core.rest.controller.BaseRestController

    getActualLimit, getBaseUrl, getControllerBaseUrl, getControllerBaseUrlWithSuffix, getItem, getItemLinks, getItemLinks, getItemResponse, getItems, getLinks, getLinks, handleBindException, handleException, handleRuntimeException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityController

      public EntityController()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext appContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • get

      @GetMapping public de.uniba.minf.core.rest.model.RestItemsResponse get(jakarta.servlet.http.HttpServletRequest request, Locale locale)
    • get

      @GetMapping("/{id}") public de.uniba.minf.registry.model.entity.Entity get(@PathVariable("id") String id, Locale locale)
    • getByDefinition

      @GetMapping("/{name}/") public de.uniba.minf.core.rest.model.RestItemsResponse getByDefinition(@PathVariable("name") String name, @RequestParam(name="includeDrafts",defaultValue="false") boolean includeDrafts, @RequestParam(name="ui",defaultValue="false") boolean ui, @RequestParam(name="lang",required=false) String lang, jakarta.servlet.http.HttpServletRequest request, Locale locale)
    • getByImportId

      @GetMapping("/i/{importId}/") public de.uniba.minf.core.rest.model.RestItemsResponse getByImportId(@PathVariable("importId") String importId, jakarta.servlet.http.HttpServletRequest request, Locale locale)
    • searchEntries

      @PostMapping("/{name}/search") public de.uniba.minf.core.rest.model.RestItemsResponse searchEntries(@PathVariable("name") String name, @RequestBody(required=false) com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiExecutionException
      Throws:
      de.uniba.minf.core.rest.exception.ApiExecutionException
    • getEntry

      @PostMapping("/{name}/get") public de.uniba.minf.core.rest.model.RestItemResponse getEntry(@PathVariable("name") String name, @RequestBody(required=false) com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiItemNotFoundException, de.uniba.minf.core.rest.exception.ApiExecutionException
      Throws:
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      de.uniba.minf.core.rest.exception.ApiExecutionException
    • postEntityForm

      @PostMapping(value={"/","/{entityId}"}, consumes="application/json") public de.uniba.minf.core.rest.model.RestResponse postEntityForm(@PathVariable(required=false,value="entityId") String entityId, @RequestBody com.fasterxml.jackson.databind.JsonNode formData, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale) throws de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException, de.uniba.minf.core.rest.exception.ApiExecutionException
      Throws:
      de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException
      de.uniba.minf.core.rest.exception.ApiExecutionException
    • deleteEntity

      @DeleteMapping("/{entityId}") public de.uniba.minf.core.rest.model.RestResponse deleteEntity(@PathVariable(required=false,value="entityId") String entityId, jakarta.servlet.http.HttpServletResponse resp, Locale locale)
    • validateEntities

      @PostMapping(value="/{name}/validate", consumes="application/json") public de.uniba.minf.core.rest.model.RestResponse validateEntities(@PathVariable("name") String name, @RequestBody String body, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException, de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException, UnsupportedEncodingException, URISyntaxException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
      de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException
      UnsupportedEncodingException
      URISyntaxException
    • importEntities

      @PostMapping(value="/{name}/import", consumes="application/json") public de.uniba.minf.core.rest.model.RestResponse importEntities(@PathVariable("name") String name, @RequestBody String body, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Locale locale) throws de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException, com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException, UnsupportedEncodingException, URISyntaxException
      Throws:
      de.uniba.minf.registry.model.validation.exception.ValidationConfigurationException
      com.fasterxml.jackson.databind.JsonMappingException
      com.fasterxml.jackson.core.JsonProcessingException
      UnsupportedEncodingException
      URISyntaxException