Class MMailText

    • Field Detail

      • m_user

        protected MUser m_user
        Parse User
      • m_bpartner

        protected MBPartner m_bpartner
        Parse BPartner
      • m_po

        protected PO m_po
        Parse PO
      • m_MailHeader

        protected String m_MailHeader
        Translated Header
      • m_MailText

        protected String m_MailText
        Translated Text
      • m_MailText2

        protected String m_MailText2
        Translated Text 2
      • m_MailText3

        protected String m_MailText3
        Translated Text 3
      • s_cacheTrl

        protected static CCache<String,​org.compiere.model.MMailText.MMailTextTrl> s_cacheTrl
        Translation Cache
      • m_language

        protected String m_language
    • Constructor Detail

      • MMailText

        public MMailText​(Properties ctx,
                         int R_MailText_ID,
                         String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        R_MailText_ID - id
        trxName - transaction
      • MMailText

        public MMailText​(Properties ctx,
                         ResultSet rs,
                         String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
    • Method Detail

      • getMailText

        public String getMailText​(boolean all)
        Get parsed/translated Mail Text
        Parameters:
        all - concatinate all
        Returns:
        parsed/translated text
      • parse

        protected String parse​(String text)
        Parse Text
        Parameters:
        text - text
        Returns:
        parsed text
      • parse

        protected String parse​(String text,
                               PO po)
        Parse text
        Parameters:
        text - text
        po - object
        Returns:
        parsed text
      • parseVariable

        protected String parseVariable​(String variable,
                                       PO po)
        Parse Variable
        Parameters:
        variable - variable
        po - po
        Returns:
        translated variable or if not found the original tag
      • setUser

        public void setUser​(int AD_User_ID)
        Set User for parse
        Parameters:
        AD_User_ID - user
      • setUser

        public void setUser​(MUser user)
        Set User for parse
        Parameters:
        user - user
      • setBPartner

        public void setBPartner​(int C_BPartner_ID)
        Set BPartner for parse
        Parameters:
        C_BPartner_ID - bp
      • setBPartner

        public void setBPartner​(MBPartner bpartner)
        Set BPartner for parse
        Parameters:
        bpartner - bp
      • setPO

        public void setPO​(PO po)
        Set PO for parse
        Parameters:
        po - po
      • setPO

        public void setPO​(PO po,
                          boolean analyse)
        Set PO for parse
        Parameters:
        po - po
        analyse - if set to true, search for BPartner/User
      • translate

        protected void translate()
        Translate to BPartner Language
      • getTranslation

        protected org.compiere.model.MMailText.MMailTextTrl getTranslation​(String AD_Language)
        Get Translation
        Parameters:
        AD_Language - language
        Returns:
        trl
      • setLanguage

        public void setLanguage​(String language)
      • getPO

        public PO getPO()
      • getBPartner

        public MBPartner getBPartner()
      • getLanguage

        public String getLanguage()
      • getUser

        public MUser getUser()