Package org.compiere.model
Class MMailText
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_R_MailText
org.compiere.model.MMailText
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_Persistent
,I_R_MailText
,Evaluatee
Mail Template Model.
Cannot be cached as it holds PO/BPartner/User to parse.
- Version:
- $Id: MMailText.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected MBPartner
Parse BPartnerprotected String
protected String
Translated Headerprotected String
Translated Textprotected String
Translated Text 2protected String
Translated Text 3protected PO
Parse POprotected MUser
Parse UserTranslation CacheFields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_R_MailText
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_IsActive, COLUMNNAME_IsHtml, COLUMNNAME_MailHeader, COLUMNNAME_MailText, COLUMNNAME_MailText2, COLUMNNAME_MailText3, COLUMNNAME_Name, COLUMNNAME_R_MailText_ID, COLUMNNAME_R_MailText_UU, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMMailText
(Properties ctx, int R_MailText_ID, String trxName) Standard ConstructorMMailText
(Properties ctx, String R_MailText_UU, String trxName) UUID based ConstructorMMailText
(Properties ctx, ResultSet rs, String trxName) Load Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet translated and parsed Mail HeadergetMailHeader
(boolean parsed) Get translated and parsed (if parsed argument is true) HeaderGet translated and parsed Mail TextgetMailText
(boolean all) Get translated and parsed Mail TextgetMailText
(boolean all, boolean parsed) Get translated and parsed (if parsed argument is true) Mail TextGet translated and parsed Mail Text 2Get translated and parsed Mail Text 3getPO()
protected org.compiere.model.MMailText.MMailTextTrl
getTranslation
(String AD_Language) Get TranslationgetUser()
protected String
Parse variables in text (@variable expression@)protected String
Parse variables in text (@variable expression@)protected String
parseVariable
(String variable, PO po) Get value for a variable expressionvoid
setBPartner
(int C_BPartner_ID) Set BPartner for parsing of textvoid
setBPartner
(MBPartner bpartner) Set BPartner for parsing of textvoid
setLanguage
(String language) Set language for translation of textvoid
Set PO for parsing of textvoid
Set PO for parsing of textvoid
setUser
(int AD_User_ID) Set User for parsing of textvoid
Set User for parsing of textprotected void
Translate to BPartner Language or language fromsetLanguage(String)
call.Methods inherited from class org.compiere.model.X_R_MailText
get_AccessLevel, getKeyNamePair, getName, getR_MailText_ID, getR_MailText_UU, initPO, isHtml, setIsHtml, setMailHeader, setMailText, setMailText2, setMailText3, setName, setR_MailText_ID, setR_MailText_UU, toString
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, beforeSave, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_Persistent
save
Methods inherited from interface org.compiere.model.I_R_MailText
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Field Details
-
m_user
Parse User -
m_bpartner
Parse BPartner -
m_po
Parse PO -
m_MailHeader
Translated Header -
m_MailText
Translated Text -
m_MailText2
Translated Text 2 -
m_MailText3
Translated Text 3 -
s_cacheTrl
Translation Cache -
m_language
-
-
Constructor Details
-
MMailText
UUID based Constructor- Parameters:
ctx
- ContextR_MailText_UU
- UUID keytrxName
- Transaction
-
MMailText
Standard Constructor- Parameters:
ctx
- contextR_MailText_ID
- idtrxName
- transaction
-
MMailText
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Details
-
getMailText
Get translated and parsed Mail Text- Parameters:
all
- true to concatenate mailtext, mailtext2 and mailtext3- Returns:
- translated and parsed text
-
getMailText
Get translated and parsed (if parsed argument is true) Mail Text- Parameters:
all
- true to concatenate mailtext, mailtext2 and mailtext3parsed
- true to parsed variables in text- Returns:
- translated and parsed (if parsed argument is true) text
-
getMailText
Get translated and parsed Mail Text- Specified by:
getMailText
in interfaceI_R_MailText
- Overrides:
getMailText
in classX_R_MailText
- Returns:
- translated and parsed text
-
getMailText2
Get translated and parsed Mail Text 2- Specified by:
getMailText2
in interfaceI_R_MailText
- Overrides:
getMailText2
in classX_R_MailText
- Returns:
- translated and parsed text
-
getMailText3
Get translated and parsed Mail Text 3- Specified by:
getMailText3
in interfaceI_R_MailText
- Overrides:
getMailText3
in classX_R_MailText
- Returns:
- translated and parsed text
-
getMailHeader
Get translated and parsed Mail Header- Specified by:
getMailHeader
in interfaceI_R_MailText
- Overrides:
getMailHeader
in classX_R_MailText
- Returns:
- translated and parsed text
-
getMailHeader
Get translated and parsed (if parsed argument is true) Header- Parameters:
parsed
- true to parse variable in text- Returns:
- translated and parsed (if parsed argument is true) text
-
parse
Parse variables in text (@variable expression@)- Parameters:
text
- text- Returns:
- parsed text
-
parse
Parse variables in text (@variable expression@)- Parameters:
text
- textpo
- PO instance- Returns:
- parsed text
-
parseVariable
Get value for a variable expression- Parameters:
variable
- variable expressionpo
- po- Returns:
- value for variable or if not found the original variable expression
-
setUser
public void setUser(int AD_User_ID) Set User for parsing of text- Parameters:
AD_User_ID
- user
-
setUser
Set User for parsing of text- Parameters:
user
- MUser instance
-
setBPartner
public void setBPartner(int C_BPartner_ID) Set BPartner for parsing of text- Parameters:
C_BPartner_ID
- bp
-
setBPartner
Set BPartner for parsing of text- Parameters:
bpartner
- MBPartner instance
-
setPO
Set PO for parsing of text- Parameters:
po
- PO instance
-
setPO
Set PO for parsing of text- Parameters:
po
- PO instanceanalyse
- true to search for BPartner/User from po
-
translate
protected void translate()Translate to BPartner Language or language fromsetLanguage(String)
call. -
getTranslation
Get Translation- Parameters:
AD_Language
- language- Returns:
- MMailTextTrl
-
setLanguage
Set language for translation of text- Parameters:
language
-
-
getPO
- Returns:
- PO instance
-
getBPartner
- Returns:
- MBPartner instance
-
getLanguage
- Returns:
- language for translation of text
-
getUser
- Returns:
- MUser instance
-