Class MultiLanguageResource
java.lang.Object
org.odpi.openmetadata.viewservices.multilanguage.server.spring.MultiLanguageResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/{urlMarker}")
public class MultiLanguageResource
extends Object
The MultiLanguageResource provides part of the server-side implementation of the Multi Language OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearTranslation(String serverName, String urlMarker, String elementGUID, String language, String locale) Remove the translation for a particular language/locale for a metadata element.getTranslation(String serverName, String urlMarker, String elementGUID, String language, String locale) Retrieve the translation for the matching language/locale.getTranslations(String serverName, String urlMarker, String elementGUID, int startFrom, int pageSize) Retrieve all translations associated with a metadata element.setTranslation(String serverName, String urlMarker, String elementGUID, NewElementRequestBody requestBody) Create or update the translation for a particular language/locale for a metadata element.
-
Constructor Details
-
MultiLanguageResource
public MultiLanguageResource()Default constructor
-
-
Method Details
-
setTranslation
@PostMapping(path="/elements/{elementGUID}/translations") public VoidResponse setTranslation(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String elementGUID, @RequestBody NewElementRequestBody requestBody) Create or update the translation for a particular language/locale for a metadata element.- Parameters:
serverName- name of the server to route the request tourlMarker- view service URL markerelementGUID- unique identifier of the element that this translation is related torequestBody- properties of the translation- Returns:
- void or InvalidParameterException the unique identifier is null or not known UserNotAuthorizedException the service is not able to access the element PropertyServerException a problem accessing the metadata store
-
clearTranslation
@PostMapping(path="/elements/{elementGUID}/translations/remove") public VoidResponse clearTranslation(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String elementGUID, @RequestParam(required=false) String language, @RequestParam(required=false) String locale) Remove the translation for a particular language/locale for a metadata element.- Parameters:
serverName- name of the server to route the request tourlMarker- view service URL markerelementGUID- unique identifier of the element that this translation is related tolanguage- language requestedlocale- optional locale to qualify which translation if there are multiple translations for the language- Returns:
- void or InvalidParameterException the language is null or not known or not unique (add locale) UserNotAuthorizedException the service is not able to access the element PropertyServerException a problem accessing the metadata store
-
getTranslation
@GetMapping(path="/elements/{elementGUID}/translations/retrieve") public TranslationDetailResponse getTranslation(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String elementGUID, @RequestParam(required=false) String language, @RequestParam(required=false) String locale) Retrieve the translation for the matching language/locale.- Parameters:
serverName- name of the server to route the request tourlMarker- view service URL markerelementGUID- unique identifier of the element that this translation is related tolanguage- language requestedlocale- optional locale to qualify which translation if there are multiple translations for the language- Returns:
- the properties of the translation or null if there is none or InvalidParameterException the unique identifier is null or not known UserNotAuthorizedException the service is not able to access the element PropertyServerException a problem accessing the metadata store
-
getTranslations
@GetMapping(path="/elements/{elementGUID}/translations") public TranslationListResponse getTranslations(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String elementGUID, @RequestParam int startFrom, @RequestParam int pageSize) Retrieve all translations associated with a metadata element.- Parameters:
serverName- name of the server to route the request tourlMarker- view service URL markerelementGUID- unique identifier of the element that this translation is related tostartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return- Returns:
- list of translation properties or null if there are none or InvalidParameterException the unique identifier is null or not known UserNotAuthorizedException the service is not able to access the element PropertyServerException a problem accessing the metadata store
-