Class MultiLanguageManagement
java.lang.Object
org.odpi.openmetadata.frameworks.integration.context.MultiLanguageManagement
MultiLanguageManagement enables translations of the string properties of a metadata element to be created, maintained and retrieved.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLanguageManagement(org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient openMetadataStore, String userId) The constructor needs an implementation of the open metadata store. -
Method Summary
Modifier and TypeMethodDescriptionvoidclearTranslation(String elementGUID, String language, String locale) Remove the translation for a particular language/locale for a metadata element.org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetailgetTranslation(String elementGUID, String language, String locale) Retrieve the translation for the matching language/locale.List<org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail>getTranslations(String elementGUID, int startFrom, int pageSize) Retrieve all translations associated with a metadata element.voidsetTranslation(String elementGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail translationDetail) Create or update the translation for a particular language/locale for a metadata element.
-
Constructor Details
-
MultiLanguageManagement
public MultiLanguageManagement(org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient openMetadataStore, String userId) The constructor needs an implementation of the open metadata store.- Parameters:
openMetadataStore- client implementationuserId- calling user
-
-
Method Details
-
setTranslation
public void setTranslation(String elementGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail translationDetail) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create or update the translation for a particular language/locale for a metadata element.- Parameters:
elementGUID- unique identifier of the element that this translation is related totranslationDetail- properties of the translation- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- the unique identifier is null or not known.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the service is not able to access the elementorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem accessing the metadata store
-
clearTranslation
public void clearTranslation(String elementGUID, String language, String locale) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Remove the translation for a particular language/locale for a metadata element.- Parameters:
elementGUID- 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.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- the language is null or not known or not unique (add locale)org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the service is not able to access the elementorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem accessing the metadata store
-
getTranslation
public org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail getTranslation(String elementGUID, String language, String locale) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Retrieve the translation for the matching language/locale.- Parameters:
elementGUID- 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
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- the unique identifier is null or not known.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the service is not able to access the elementorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem accessing the metadata store
-
getTranslations
public List<org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail> getTranslations(String elementGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Retrieve all translations associated with a metadata element.- Parameters:
elementGUID- 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
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- the unique identifier is null or not known.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the service is not able to access the elementorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem accessing the metadata store
-