Class ADTranslationAbleHelper
java.lang.Object
de.mid.innovator.srv2api.icw2meta.ADTranslationAbleHelper
This is a utility class for ADTranslationAble that provides static methods for creation or other purposes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidFor eachELTranslatedValuewithout connection the translated element is calculated and if found the missing connection is created.static ARG_AskgetModifyTranslationLocaleCheck(SrvContext srvCtx, List<K_LOCALE> seq) Checks whether the modification of translation languages deletes translations.Returns the list ofMM2Localevalues which are allowed as translation language.static ARG_GetPropertyTranslationsgetPropertyTranslations(SrvContext srvCtx, List<? extends ADClientAble> seqElem, List<? extends MM2Locale> seqLang) Calculates all properties for the selected elements and all existing translations.static ARG_AskgetSetNotToTranslateAttributeCheck(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr) Checks whether existing translations are deleted, if the specified attributes are marked as not necessary for translation.static ARG_TranslationMatrixgetTranslations(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends ADTranslationAble> seqLang, boolean isExport, boolean withDiaContentText) Returns a list of translatable elements with properties and translations for each specified language.static voidmodifyTranslationLocale(SrvContext srvCtx, List<K_LOCALE> seq) Modify the list of translation languages.static voidresetNotToTranslateAttribute(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr) static voidsetNotToTranslateAttribute(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr)
-
Method Details
-
getPropertyTranslations
public static ARG_GetPropertyTranslations getPropertyTranslations(SrvContext srvCtx, List<? extends ADClientAble> seqElem, List<? extends MM2Locale> seqLang) throws InoNetException, SrvErrorException Calculates all properties for the selected elements and all existing translations.- Parameters:
srvCtx- The context of the related innovator server.seqElem- list of selected elementsseqLang- list of selected languages- Throws:
InoNetExceptionSrvErrorException
-
getTranslations
public static ARG_TranslationMatrix getTranslations(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends ADTranslationAble> seqLang, boolean isExport, boolean withDiaContentText) throws InoNetException, SrvErrorException Returns a list of translatable elements with properties and translations for each specified language.- Parameters:
srvCtx- The context of the related innovator server.seqElem- list of elements to be translatedseqLang- list of translation languagesisExport- true, if the elements are exported for translationwithDiaContentText- true, if text of diagram content should be translated- Throws:
InoNetExceptionSrvErrorException
-
getModifyTranslationLocaleCheck
public static ARG_Ask getModifyTranslationLocaleCheck(SrvContext srvCtx, List<K_LOCALE> seq) throws InoNetException, SrvErrorException Checks whether the modification of translation languages deletes translations.- Parameters:
srvCtx- The context of the related innovator server.seq-- Throws:
InoNetExceptionSrvErrorException
-
getModifyTranslationLocaleInit
public static List<K_LOCALE> getModifyTranslationLocaleInit(SrvContext srvCtx) throws InoNetException, SrvErrorException Returns the list ofMM2Localevalues which are allowed as translation language.- Parameters:
srvCtx- The context of the related innovator server.- Throws:
InoNetExceptionSrvErrorException
-
getSetNotToTranslateAttributeCheck
public static ARG_Ask getSetNotToTranslateAttributeCheck(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr) throws InoNetException, SrvErrorException Checks whether existing translations are deleted, if the specified attributes are marked as not necessary for translation.- Parameters:
srvCtx- The context of the related innovator server.seqElem- list of elements with translatable attributesseqAttr- list of translatable attributes- Throws:
InoNetExceptionSrvErrorException
-
cleanUpUnappropriatedTranslations
public static void cleanUpUnappropriatedTranslations(SrvContext srvCtx) throws InoNetException, SrvErrorException For eachELTranslatedValuewithout connection the translated element is calculated and if found the missing connection is created. Otherwise theELTranslatedValueis deleted.- Parameters:
srvCtx- The context of the related innovator server.- Throws:
InoNetExceptionSrvErrorException
-
modifyTranslationLocale
public static void modifyTranslationLocale(SrvContext srvCtx, List<K_LOCALE> seq) throws InoNetException, SrvErrorException Modify the list of translation languages.- Parameters:
srvCtx- The context of the related innovator server.seq-- Throws:
InoNetExceptionSrvErrorException
-
resetNotToTranslateAttribute
public static void resetNotToTranslateAttribute(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr) throws InoNetException, SrvErrorException For each specified pair of element and attribute the attribute is marked as necessary for translation.- Parameters:
srvCtx- The context of the related innovator server.seqElem- list of elements with translatable attributesseqAttr- list of translatable attributes- Throws:
InoNetExceptionSrvErrorException
-
setNotToTranslateAttribute
public static void setNotToTranslateAttribute(SrvContext srvCtx, List<? extends ELUUIDAble> seqElem, List<? extends MM2Attribute> seqAttr) throws InoNetException, SrvErrorException For each specified pair of element and attribute the attribute is marked as not necessary for translation.- Parameters:
srvCtx- The context of the related innovator server.seqElem- list of elements with translatable attributesseqAttr- list of translatable attributes- Throws:
InoNetExceptionSrvErrorException
-