Class VocabularyEntryController

java.lang.Object
de.uniba.minf.core.rest.controller.BaseRestController
de.uniba.minf.registry.controller.VocabularyEntryController

@RestController @RequestMapping("/api/v1/v") public class VocabularyEntryController extends de.uniba.minf.core.rest.controller.BaseRestController
  • 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.RestItemsResponse
    clearVocabularyEntries(String name, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemResponse
    fetchVocabularyEntry(String name, String key, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    get(jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    de.uniba.minf.registry.model.vocabulary.VocabularyEntry
    get(String id, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    getByDefinition(String name, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    protected com.fasterxml.jackson.databind.node.ObjectNode
    getItem(de.uniba.minf.registry.model.vocabulary.VocabularyEntry item, String requestUrl, boolean suffixUniqueId, de.uniba.minf.registry.model.vocabulary.VocabularyDefinition vd, boolean addViewItems)
     
    protected com.fasterxml.jackson.databind.node.ArrayNode
    getItems(Collection<de.uniba.minf.registry.model.vocabulary.VocabularyEntry> items, String requestUrl, de.uniba.minf.registry.model.vocabulary.VocabularyDefinition vd, boolean addViewItems)
     
    de.uniba.minf.core.rest.model.RestItemResponse
    getVocabularyEntry(String name, String key, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    void
    postJson(String updatedApi, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemResponse
    postVocabularyEntry(String name, com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale)
     
    void
    postYaml(String updatedApi, Locale locale)
     
    de.uniba.minf.core.rest.model.RestItemsResponse
    searchVocabularyEntry(String name, com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, 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

    • VocabularyEntryController

      public VocabularyEntryController()
  • Method Details

    • postYaml

      @PostMapping(consumes={"application/x-yaml","text/yaml"}) public void postYaml(@RequestBody String updatedApi, Locale locale) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
      com.fasterxml.jackson.core.JsonProcessingException
    • postJson

      @PostMapping(consumes="application/json") public void postJson(@RequestBody String updatedApi, Locale locale) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
      com.fasterxml.jackson.core.JsonProcessingException
    • 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.vocabulary.VocabularyEntry get(@PathVariable("id") String id, Locale locale)
    • getByDefinition

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

      @PostMapping("/{name}/fetch") public de.uniba.minf.core.rest.model.RestItemResponse fetchVocabularyEntry(@PathVariable("name") String name, String key, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • clearVocabularyEntries

      @PostMapping("/{name}/clear") public de.uniba.minf.core.rest.model.RestItemsResponse clearVocabularyEntries(@PathVariable("name") String name, jakarta.servlet.http.HttpServletRequest request, Locale locale)
    • searchVocabularyEntry

      @PostMapping("/{name}/search") public de.uniba.minf.core.rest.model.RestItemsResponse searchVocabularyEntry(@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
    • getVocabularyEntry

      @GetMapping("/{name}/e/{key}") public de.uniba.minf.core.rest.model.RestItemResponse getVocabularyEntry(@PathVariable("name") String name, @PathVariable("key") String key, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • postVocabularyEntry

      @PostMapping("/{name}/e") public de.uniba.minf.core.rest.model.RestItemResponse postVocabularyEntry(@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
    • getItems

      protected com.fasterxml.jackson.databind.node.ArrayNode getItems(Collection<de.uniba.minf.registry.model.vocabulary.VocabularyEntry> items, String requestUrl, de.uniba.minf.registry.model.vocabulary.VocabularyDefinition vd, boolean addViewItems)
    • getItem

      protected com.fasterxml.jackson.databind.node.ObjectNode getItem(de.uniba.minf.registry.model.vocabulary.VocabularyEntry item, String requestUrl, boolean suffixUniqueId, de.uniba.minf.registry.model.vocabulary.VocabularyDefinition vd, boolean addViewItems)