Package com.ptc.windchill.esi.delegate
Class TransactionWarningEmailDelegate
java.lang.Object
com.ptc.windchill.esi.delegate.TransactionWarningEmailDelegate
- All Implemented Interfaces:
TransactionWarningDelegate
This class sends the warning messages in form of email to the appropriate principals.
The warning email will be sent when there are warning generated during the publication in following scenarios.
Supported API: true
Extendable: true
The warning email will be sent when there are warning generated during the publication in following scenarios.
- Publication expressions that has alias or functions
- Publication rules that has alias
- Publication option set that has global rules used in it
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildMessage(VdbBuilder builder, String targetNames) Build the message for the email.protected StringbuildSubject(VdbBuilder builder, String targetNames) Builds the message for the subject of email.protected StringReturns the value for property wt.notify.notificationSenderEmail from wt.properties which is used as the sender.protected StringgetTargetIds(Set<ESITarget> targets) Returns the string for set of targets.protected Set<WTPrincipal> getWTPrincipalList(VdbBuilder builder) Returns the WTPrincipal object list, the WTPrincipal list is decided based on the following criteria - If the transaction happened with Change - the recipient would be the creator of the change.voidsendNotification(VdbBuilder builder) This method add the entry to the email queue and sends the email to the appropriate recipient.
-
Method Details
-
sendNotification
This method add the entry to the email queue and sends the email to the appropriate recipient.
- Specified by:
sendNotificationin interfaceTransactionWarningDelegate- Parameters:
builder- - The VdbBuilder instance containing warning information for the in-progress ESI Transaction. Supported API: true- Throws:
Exception
-
buildSubject
Builds the message for the subject of email.
Supported API: true- Parameters:
builder- - The VdbBuilder instance containing warning information for the in-progress ESI Transaction.- Returns:
- - Localized subject for email notification containing informaton about transaction number, primary business object, esi target
- Throws:
WTException
-
buildMessage
Build the message for the email.
Supported API: true- Parameters:
builder- - The VdbBuilder instance containing warning information for the in-progress ESI Transaction.target- - The set of targets for which this transaction is processed- Returns:
- -The message representation for warning notification
- Throws:
WTException
-
getTargetIds
Returns the string for set of targets.
Supported API: true- Parameters:
target- - The set of targets for which string identification is needed- Returns:
- - The comma saperated list of targets.
-
getSender
Returns the value for property wt.notify.notificationSenderEmail from wt.properties which is used as the sender.
Supported API: true- Returns:
- Throws:
IOException
-
getWTPrincipalList
Returns the WTPrincipal object list, the WTPrincipal list is decided based on the following criteria - If the transaction happened with Change - the recipient would be the creator of the change. If the transaction happened with Promotion - the recipient would be the creator of the promotion. In other cases (i.e. adhoc publishing or set state publishing) - the recipient would be the current session user.
Supported API: true- Parameters:
builder- - The VdbBuilder instance containing warning information for the in-progress ESI Transaction.- Returns:
- - The WTPrincipal list for sending notification
- Throws:
WTException
-