Class VocabularyEntryController
java.lang.Object
de.uniba.minf.core.rest.controller.BaseRestController<de.uniba.minf.registry.model.vocabulary.VocabularyEntry>
de.uniba.minf.registry.controller.VocabularyEntryController
@RestController
@RequestMapping("/api/v1/v")
public class VocabularyEntryController
extends de.uniba.minf.core.rest.controller.BaseRestController<de.uniba.minf.registry.model.vocabulary.VocabularyEntry>
-
Field Summary
Fields inherited from class de.uniba.minf.core.rest.controller.BaseRestController
authInfoHelper, linksHelper, messageSource, objectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.uniba.minf.core.rest.model.RestItemsResponseclearVocabularyEntries(String name, jakarta.servlet.http.HttpServletRequest request, Locale locale) de.uniba.minf.core.rest.model.RestItemResponsefetchVocabularyEntry(String name, String key, jakarta.servlet.http.HttpServletRequest request, Locale locale) de.uniba.minf.core.rest.model.RestItemsResponsede.uniba.minf.registry.model.vocabulary.VocabularyEntryde.uniba.minf.core.rest.model.RestItemsResponsegetByDefinition(String name, jakarta.servlet.http.HttpServletRequest request, Locale locale) protected com.fasterxml.jackson.databind.node.ObjectNodegetItem(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.ArrayNodegetItems(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.RestItemResponsegetVocabularyEntry(String name, String key, boolean ui, jakarta.servlet.http.HttpServletRequest request, Locale locale) voidde.uniba.minf.core.rest.model.RestItemResponsepostVocabularyEntry(String name, com.fasterxml.jackson.databind.JsonNode body, jakarta.servlet.http.HttpServletRequest request, Locale locale) voidde.uniba.minf.core.rest.model.RestItemsResponsesearchVocabularyEntry(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, getItem, getItemLinks, getItemLinks, getItemResponse, getItems, getLinks, getLinks, handleBindException, handleException, handleRuntimeException, setLinksOnSubitem, setLinksOnSubitem, setLinksOnSubitems, setLinksOnSubitems
-
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.JsonMappingExceptioncom.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.JsonMappingExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
get
@GetMapping public de.uniba.minf.core.rest.model.RestItemsResponse get(jakarta.servlet.http.HttpServletRequest request, Locale locale) -
get
-
getByDefinition
-
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
-
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}/get/{key}") public de.uniba.minf.core.rest.model.RestItemResponse getVocabularyEntry(@PathVariable("name") String name, @PathVariable String key, @RequestParam(required=false) boolean ui, 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}/get") 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.ApiItemNotFoundExceptionde.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)
-