Package com.thortech.xl.dataobj.util
Class tcEmailNotificationUtil
java.lang.Object
com.thortech.xl.dataobj.util.tcEmailNotificationUtil
This class is used to construct the emails to be send. From 11gR1 onwards it's recomended
to use Get instane: using constructor tcEmailNotificationUtil
Construct Email: using method constructXYZEmail
Set Email content(Optional): using methods setSubject/setBody
Send constructed Email: using method sendEmail
NotificationService
to construct and send emails.The flow is as follows:
- Version:
- Author:
- Paris York
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new tcEmailNotificationUtiltcEmailNotificationUtil
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider) Creates a new tcEmailNotificationUtil object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
constructEmail
(String psEmdName) Gets the email definition and puts it in the internal variablesvoid
constructEmail
(String psEmdKey, String psReqKey) Deprecated.Not recomended to use from 11gR1 onwards.void
constructEmail
(String psEmdKey, String psReqKey, String userKey) Gets the email definition and Request key.void
constructEmail
(String psEmdKey, String psReqKey, String psSchKey, String psObiKey) Deprecated.Not recomended to use from 11gR1 onwards.void
Constructs the Email.void
constructPasswordEmail
(String psEmdName, String usrKey) Gets the email definition and puts it in the internal variablesvoid
constructProvisionEmail
(String psEmdKey, String psSchKey) Constructs the Provisioning Email.getBody()
This method returns the body of the email.Returns the Email TypeReturns the From AddressgetFromProvision
(String psEmdKey, String psSchKey) Returns the From Address for the email definition and task instance key passedgetFromRequest
(String psEmdKey, String psReqKey) Deprecated.Not recomended to use from 11gR1 onwards.This method returns the subject of the email.void
Sends to Email to the Address paased as a parametervoid
Sends the Email This method takes two parameter Toaddress and CC adrress.void
This is used to send the email created to several email boxes.static void
sendEmailNotification
(com.thortech.xl.dataaccess.tcDataProvider db, String toAddress, String defaultFromAddress, String emdName, String reqKeyAsString) Sends Email Notificationvoid
Sets the Body of the Emailvoid
setEmailType
(String psEmailType) Sets the Email Typevoid
setFromAddress
(String address) Sets the From Addressvoid
setSubject
(String value) Sets the Subject of the Email
-
Constructor Details
-
tcEmailNotificationUtil
public tcEmailNotificationUtil()Creates new tcEmailNotificationUtil -
tcEmailNotificationUtil
public tcEmailNotificationUtil(com.thortech.xl.dataaccess.tcDataProvider poDataProvider) Creates a new tcEmailNotificationUtil object.- Parameters:
poDataProvider
- DataBase Conenction
-
-
Method Details
-
setEmailType
Sets the Email Type- Parameters:
psEmailType
- EmailType, value can be "P"(Provisioning), "R"(Request) or "G"(General)
-
getEmailType
Returns the Email Type- Returns:
- String EmailType
-
getFromAddress
Returns the From Address- Returns:
- String FromAddress
-
setFromAddress
Sets the From Address- Parameters:
address
- FromAddress
-
setSubject
Sets the Subject of the Email- Parameters:
subject
- Subject
-
setBody
Sets the Body of the Email- Parameters:
EmailBody
- EmailBody
-
constructEmail
Gets the email definition and puts it in the internal variables- Parameters:
psEmdName
- Name of the Email Definition
-
constructEmail
Deprecated.Not recomended to use from 11gR1 onwards.Gets the email definition and Request key. Puts it on the internal variables.- Parameters:
psEmdKey
- Email Definition KeypsReqKey
- Request Key
-
constructEmail
Gets the email definition and Request key. Puts it on the internal variables.- Parameters:
psEmdKey
- Email Definition KeypsReqKey
- Request KeyuserKey
- User Key
-
constructEmail
public void constructEmail(String psEmdKey, String psReqKey, String psSchKey, String psObiKey, String usrkey) Constructs the Email.- Parameters:
psEmdKey
- Email Definition KeypsReqKey
- Request KeypsSchKey
- SCH KeypsObiKey
- OBI KeyusrKey
- User Key
-
constructEmail
Deprecated.Not recomended to use from 11gR1 onwards.Constructs the Email.- Parameters:
psEmdKey
- Email Definition KeypsReqKey
- Request KeypsSchKey
- SCH KeypsObiKey
- OBI Key
-
constructProvisionEmail
Constructs the Provisioning Email.- Parameters:
psEmdKey
- Email Definition KeypsSchKey
- SCH Key, Refer totcProvisioningOperationsIntf
for SCH Key
-
getFromRequest
Deprecated.Not recomended to use from 11gR1 onwards.Returns the From Address for the email definition and Request key passed- Parameters:
psEmdKey
- Email Definition KeypsReqKey
- Request Key- Returns:
- String From Address
-
getFromProvision
Returns the From Address for the email definition and task instance key passed- Parameters:
psEmdKey
- Email Definition KeypsSchKey
- SCH Key, Refer totcProvisioningOperationsIntf
for SCH Key- Returns:
- String From Address
-
constructPasswordEmail
Gets the email definition and puts it in the internal variables- Parameters:
psEmdName
- Name of the Email Definition
-
sendEmail
Sends to Email to the Address paased as a parameter- Parameters:
psToAddress
- TO Address
-
sendEmailNotification
public static void sendEmailNotification(com.thortech.xl.dataaccess.tcDataProvider db, String toAddress, String defaultFromAddress, String emdName, String reqKeyAsString) Sends Email Notification- Parameters:
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 Key
-
sendEmail
This is used to send the email created to several email boxes.- Parameters:
pvToAddress
- [] - This is a list of the email addresses the email is to be sent to.
-
getBody
This method returns the body of the email.- Returns:
- Body of the email as a String
-
getSubject
This method returns the subject of the email.- Returns:
- Subject of the email as a String
-
sendEmail
Sends the Email This method takes two parameter Toaddress and CC adrress. Note: CC address can be made to take multiple values.(May be added in future need)- Parameters:
psToAddress
- To AddresspsCCAddress
- CC Address
-