public class SubscriptionNotificationCmdImpl extends TaskCommandImpl implements SubscriptionNotificationCmd
SubscriptionNotificationCmd
interface. The class implements the
business logic to notify the merchant by e-mail, notify the user by e-mail
and create a tickler for the customer care representative. The required
notification can be chosen by setting the appropriate notification flags to
True
.
The class uses SendMsgCmd
to send the e-mail notifications and
CreateTicklerCmd
to create the tickler.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The copy right field.
|
COMMENT_TO_CSR, CONFIG_DATA_COPIED, CONFIG_DATA_SUBJECT, CONFIG_DATA_SUBJECT_KEY, DEFAULT_MERCHANT_NOTIFICATION_MESSAGE_TYPE, DEFAULT_USER_NOTIFICATION_MESSAGE_TYPE, MERCHANT_NOTIFICATION_MSG_TYPE, NAME, RECIPIENT, TICKLER_REASON_ID, USER_NOTIFICATION_MSG_TYPE
Constructor and Description |
---|
SubscriptionNotificationCmdImpl()
Default implementation of the constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
performExecute()
This method performs the business logic for the command.
|
void |
setCreateTicklerForCSR(boolean createTickler)
This method sets the tickler notification flag for the command.
|
void |
setMerchantNotificationProperties(TypedProperty properties)
This method sets the input properties for e-mail to be sent to the
merchant.
|
void |
setNotifyMerchantByEmail(boolean notifyMerchantByEmail)
This method sets the merchant e-mail notification flag for the command.
|
void |
setNotifyUser(boolean notifyUserByEmail)
This method sets the user e-mail notification flag for the command.
|
void |
setSubscriptionId(java.lang.Long subscriptionId)
This method sets the unique ID of the subscription for which the
notifications are being sent.
|
void |
setTicklerProperties(TypedProperty properties)
This method sets the input properties for the tickler creation.
|
void |
setUserNotificationProperties(TypedProperty properties)
This method sets the input properties for e-mail to be sent to the user.
|
void |
validateParameters()
This method validates the parameters for the command.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public SubscriptionNotificationCmdImpl()
public void setCreateTicklerForCSR(boolean createTickler)
setCreateTicklerForCSR
in interface SubscriptionNotificationCmd
createTickler
- Boolean to indicate if the tickler needs to be created or not.public void setNotifyMerchantByEmail(boolean notifyMerchantByEmail)
setNotifyMerchantByEmail
in interface SubscriptionNotificationCmd
notifyMerchantByEmail
- Boolean to indicate if the e-mail needs to be sent to the
merchant or not.public void setNotifyUser(boolean notifyUserByEmail)
setNotifyUser
in interface SubscriptionNotificationCmd
notifyUserByEmail
- Boolean to indicate if the e-mail needs to be sent to the user
or not.public void setSubscriptionId(java.lang.Long subscriptionId)
setSubscriptionId
in interface SubscriptionNotificationCmd
subscriptionId
- The unique ID of the subscription.public void setMerchantNotificationProperties(TypedProperty properties)
setMerchantNotificationProperties
in interface SubscriptionNotificationCmd
properties
- The typed property to be passed to the merchant e-mail.public void setTicklerProperties(TypedProperty properties)
setTicklerProperties
in interface SubscriptionNotificationCmd
properties
- The typed property to be passed to the tickler.public void setUserNotificationProperties(TypedProperty properties)
setUserNotificationProperties
in interface SubscriptionNotificationCmd
properties
- The typed property to be passed to the user e-mail.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- If the subscription ID is invalid.public void performExecute() throws ECException
createTicklerForCSR
,
notifyMerchant
and notifyUser
methods.performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- If any exceptions occur while sending the notification.