Class TranslationHandle


  • public class TranslationHandle
    extends ElementDetailHandle
    Represents a translation message in the design. A translation message is used for the user to save their localized information in the design.
    See Also:
    TranslationTable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.birt.report.model.elements.Translation translation
      The translation message.
    • Constructor Summary

      Constructors 
      Constructor Description
      TranslationHandle​(ModuleHandle moduleHandle, org.eclipse.birt.report.model.elements.Translation trans)
      Constructs a handle for a translation message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLocale()
      Returns the locale of the translation message.
      java.lang.String getResourceKey()
      Returns the resource key of the translation.
      java.lang.String getText()
      Returns translated text for the translation, the text defined for the locale.
      void setLocale​(java.lang.String newLocale)
      Sets the locale of the translation message.
      void setText​(java.lang.String text)
      Sets the translated text for the translation message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • translation

        protected org.eclipse.birt.report.model.elements.Translation translation
        The translation message.
    • Constructor Detail

      • TranslationHandle

        public TranslationHandle​(ModuleHandle moduleHandle,
                                 org.eclipse.birt.report.model.elements.Translation trans)
        Constructs a handle for a translation message.
        Parameters:
        moduleHandle - a handle to a module
        trans - the translation instance to be handled.
    • Method Detail

      • getResourceKey

        public java.lang.String getResourceKey()
        Returns the resource key of the translation.
        Returns:
        the resource key for the translation
      • setLocale

        public void setLocale​(java.lang.String newLocale)
                       throws CustomMsgException
        Sets the locale of the translation message.
        Parameters:
        newLocale - new locale of the translation
        Throws:
        CustomMsgException - if the translation message is not found in the design.
      • getLocale

        public java.lang.String getLocale()
        Returns the locale of the translation message.
        Returns:
        the locale of the translation message
      • setText

        public void setText​(java.lang.String text)
                     throws CustomMsgException
        Sets the translated text for the translation message.
        Parameters:
        text - translated text for the locale.
        Throws:
        CustomMsgException - if the translation message is not found in the design.
      • getText

        public java.lang.String getText()
        Returns translated text for the translation, the text defined for the locale.
        Returns:
        translated text for the translation