Class ADTranslationAbleHelper
- java.lang.Object
-
- de.mid.innovator.srv2api.icw2meta.ADTranslationAbleHelper
-
public abstract class ADTranslationAbleHelper extends java.lang.Object
This is a utility class for ADTranslationAble that provides static methods for creation or other purposes.- See Also:
ADTranslationAble
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanUpUnappropriatedTranslations(SrvContext srvCtx)
For eachELTranslatedValue
without connection the translated element is calculated and if found the missing connection is created.static ARG_Ask
getModifyTranslationLocaleCheck(SrvContext srvCtx, java.util.List<K_LOCALE> seq)
Checks whether the modification of translation languages deletes translations.static java.util.List<K_LOCALE>
getModifyTranslationLocaleInit(SrvContext srvCtx)
Returns the list ofMM2Locale
values which are allowed as translation language.static ARG_GetPropertyTranslations
getPropertyTranslations(SrvContext srvCtx, java.util.List<? extends ADClientAble> seqElem, java.util.List<? extends MM2Locale> seqLang)
Calculates all properties for the selected elements and all existing translations.static ARG_Ask
getSetNotToTranslateAttributeCheck(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.List<? extends MM2Attribute> seqAttr)
Checks whether existing translations are deleted, if the specified attributes are marked as not necessary for translation.static ARG_TranslationMatrix
getTranslations(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.List<? extends ADTranslationAble> seqLang, boolean isExport)
Returns a list of translatable elements with properties and translations for each specified language.static void
modifyTranslationLocale(SrvContext srvCtx, java.util.List<K_LOCALE> seq)
Modify the list of translation languages.static void
resetNotToTranslateAttribute(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.List<? extends MM2Attribute> seqAttr)
static void
setNotToTranslateAttribute(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.List<? extends MM2Attribute> seqAttr)
-
-
-
Method Detail
-
getPropertyTranslations
public static ARG_GetPropertyTranslations getPropertyTranslations(SrvContext srvCtx, java.util.List<? extends ADClientAble> seqElem, java.util.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:
InoNetException
SrvErrorException
-
getTranslations
public static ARG_TranslationMatrix getTranslations(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.List<? extends ADTranslationAble> seqLang, boolean isExport) 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 translation- Throws:
InoNetException
SrvErrorException
-
getModifyTranslationLocaleCheck
public static ARG_Ask getModifyTranslationLocaleCheck(SrvContext srvCtx, java.util.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:
InoNetException
SrvErrorException
-
getModifyTranslationLocaleInit
public static java.util.List<K_LOCALE> getModifyTranslationLocaleInit(SrvContext srvCtx) throws InoNetException, SrvErrorException
Returns the list ofMM2Locale
values which are allowed as translation language.- Parameters:
srvCtx
- The context of the related innovator server.- Throws:
InoNetException
SrvErrorException
-
getSetNotToTranslateAttributeCheck
public static ARG_Ask getSetNotToTranslateAttributeCheck(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.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:
InoNetException
SrvErrorException
-
cleanUpUnappropriatedTranslations
public static void cleanUpUnappropriatedTranslations(SrvContext srvCtx) throws InoNetException, SrvErrorException
For eachELTranslatedValue
without connection the translated element is calculated and if found the missing connection is created. Otherwise theELTranslatedValue
is deleted.- Parameters:
srvCtx
- The context of the related innovator server.- Throws:
InoNetException
SrvErrorException
-
modifyTranslationLocale
public static void modifyTranslationLocale(SrvContext srvCtx, java.util.List<K_LOCALE> seq) throws InoNetException, SrvErrorException
Modify the list of translation languages.- Parameters:
srvCtx
- The context of the related innovator server.seq
-- Throws:
InoNetException
SrvErrorException
-
resetNotToTranslateAttribute
public static void resetNotToTranslateAttribute(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.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:
InoNetException
SrvErrorException
-
setNotToTranslateAttribute
public static void setNotToTranslateAttribute(SrvContext srvCtx, java.util.List<? extends ELUUIDAble> seqElem, java.util.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:
InoNetException
SrvErrorException
-
-