public class tcEmailNotificationUtil
extends java.lang.Object
NotificationService
to construct and send emails.The flow is as follows:
Constructor and Description |
---|
tcEmailNotificationUtil()
Creates new tcEmailNotificationUtil
|
tcEmailNotificationUtil(com.thortech.xl.dataaccess.tcDataProvider poDataProvider)
Creates a new tcEmailNotificationUtil object.
|
Modifier and Type | Method and Description |
---|---|
void |
constructEmail(java.lang.String psEmdName)
Gets the email definition and puts it in the internal variables
|
void |
constructEmail(java.lang.String psEmdKey,
java.lang.String psReqKey)
Deprecated.
Not recomended to use from 11gR1 onwards.
|
void |
constructEmail(java.lang.String psEmdKey,
java.lang.String psReqKey,
java.lang.String userKey)
Gets the email definition and Request key.
|
void |
constructEmail(java.lang.String psEmdKey,
java.lang.String psReqKey,
java.lang.String psSchKey,
java.lang.String psObiKey)
Deprecated.
Not recomended to use from 11gR1 onwards.
|
void |
constructEmail(java.lang.String psEmdKey,
java.lang.String psReqKey,
java.lang.String psSchKey,
java.lang.String psObiKey,
java.lang.String usrkey)
Constructs the Email.
|
void |
constructPasswordEmail(java.lang.String psEmdName,
java.lang.String usrKey)
Gets the email definition and puts it in the internal variables
|
void |
constructProvisionEmail(java.lang.String psEmdKey,
java.lang.String psSchKey)
Constructs the Provisioning Email.
|
java.lang.String |
getBody()
This method returns the body of the email.
|
java.lang.String |
getEmailType()
Returns the Email Type
|
java.lang.String |
getFromAddress()
Returns the From Address
|
java.lang.String |
getFromProvision(java.lang.String psEmdKey,
java.lang.String psSchKey)
Returns the From Address for the email definition and task instance key passed
|
java.lang.String |
getFromRequest(java.lang.String psEmdKey,
java.lang.String psReqKey)
Deprecated.
Not recomended to use from 11gR1 onwards.
|
java.lang.String |
getSubject()
This method returns the subject of the email.
|
void |
sendEmail(java.lang.String psToAddress)
Sends to Email to the Address paased as a parameter
|
void |
sendEmail(java.lang.String psToAddress,
java.lang.String psCCAddress)
Sends the Email This method takes two parameter Toaddress and CC adrress.
|
void |
sendEmail(java.util.Vector pvToAddress)
This is used to send the email created to several email boxes.
|
static void |
sendEmailNotification(com.thortech.xl.dataaccess.tcDataProvider db,
java.lang.String toAddress,
java.lang.String defaultFromAddress,
java.lang.String emdName,
java.lang.String reqKeyAsString)
Sends Email Notification
|
void |
setBody(java.lang.String value)
Sets the Body of the Email
|
void |
setEmailType(java.lang.String psEmailType)
Sets the Email Type
|
void |
setFromAddress(java.lang.String address)
Sets the From Address
|
void |
setSubject(java.lang.String value)
Sets the Subject of the Email
|
public tcEmailNotificationUtil()
public tcEmailNotificationUtil(com.thortech.xl.dataaccess.tcDataProvider poDataProvider)
poDataProvider
- DataBase Conenctionpublic void setEmailType(java.lang.String psEmailType)
psEmailType
- EmailType, value can be "P"(Provisioning), "R"(Request) or "G"(General)public java.lang.String getEmailType()
public java.lang.String getFromAddress()
public void setFromAddress(java.lang.String address)
address
- FromAddresspublic void setSubject(java.lang.String value)
subject
- Subjectpublic void setBody(java.lang.String value)
EmailBody
- EmailBodypublic void constructEmail(java.lang.String psEmdName)
psEmdName
- Name of the Email Definitionpublic void constructEmail(java.lang.String psEmdKey, java.lang.String psReqKey)
psEmdKey
- Email Definition KeypsReqKey
- Request Keypublic void constructEmail(java.lang.String psEmdKey, java.lang.String psReqKey, java.lang.String userKey)
psEmdKey
- Email Definition KeypsReqKey
- Request KeyuserKey
- User Keypublic void constructEmail(java.lang.String psEmdKey, java.lang.String psReqKey, java.lang.String psSchKey, java.lang.String psObiKey, java.lang.String usrkey)
psEmdKey
- Email Definition KeypsReqKey
- Request KeypsSchKey
- SCH KeypsObiKey
- OBI KeyusrKey
- User Keypublic void constructEmail(java.lang.String psEmdKey, java.lang.String psReqKey, java.lang.String psSchKey, java.lang.String psObiKey)
psEmdKey
- Email Definition KeypsReqKey
- Request KeypsSchKey
- SCH KeypsObiKey
- OBI Keypublic void constructProvisionEmail(java.lang.String psEmdKey, java.lang.String psSchKey)
psEmdKey
- Email Definition KeypsSchKey
- SCH Key, Refer to tcProvisioningOperationsIntf
for SCH Keypublic java.lang.String getFromRequest(java.lang.String psEmdKey, java.lang.String psReqKey)
psEmdKey
- Email Definition KeypsReqKey
- Request Keypublic java.lang.String getFromProvision(java.lang.String psEmdKey, java.lang.String psSchKey)
psEmdKey
- Email Definition KeypsSchKey
- SCH Key, Refer to tcProvisioningOperationsIntf
for SCH Keypublic void constructPasswordEmail(java.lang.String psEmdName, java.lang.String usrKey)
psEmdName
- Name of the Email Definitionpublic void sendEmail(java.lang.String psToAddress)
psToAddress
- TO Addresspublic static void sendEmailNotification(com.thortech.xl.dataaccess.tcDataProvider db, java.lang.String toAddress, java.lang.String defaultFromAddress, java.lang.String emdName, java.lang.String reqKeyAsString)
db
- DataBaseConnection ObjecttoAddress
- Address to whom the mail is to be sentdefaultFromAddress
- From Address to be used in sending the mailemdName
- Name of the Email Definition which is to be usedreqKeyAsString
- Request Keypublic void sendEmail(java.util.Vector pvToAddress)
pvToAddress
- [] - This is a list of the email addresses the email
is to be sent to.public java.lang.String getBody()
public java.lang.String getSubject()
public void sendEmail(java.lang.String psToAddress, java.lang.String psCCAddress)
psToAddress
- To AddresspsCCAddress
- CC Address