com.ibm.commerce.tools.optools.order.commands
Class CSROrderCommentsNotifyCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.tools.optools.order.commands.CSROrderCommentsNotifyCmdImpl
All Implemented Interfaces:
CSROrderCommentsNotifyCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CSROrderCommentsNotifyCmdImpl
extends TaskCommandImpl
implements CSROrderCommentsNotifyCmd

This is the default implementation of the CSROrderCommentsNotifyCmd command. This command will use the email address of the store as the sender email address.

This command calls the following command:

This command uses the following AccessBeans:

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.optools.order.commands. CSROrderCommentsNotifyCmd
defaultCommandClassName, MSG_TYPE_NAME, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CSROrderCommentsNotifyCmdImpl()
          CSROrderCommentsNotifyCmdImpl constructor.
 
Method Summary
  AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getStoreEMailAddress(java.lang.String newStoreId)
          Obtain the email address of the store.
 void performExecute()
          This method performs the execution to send order comment.
 void setComment(java.lang.String newComment)
          Sets the order comment which needs to be sent.
 void setOrderId(java.lang.Long newOrderId)
          Sets the order ID.
 void setOrderId(java.lang.String newOrderId)
          Sets the order ID.
 void setReceiverEmailAddress(java.lang.String newReceiverEmailAddr)
          Sets the email address.
 void setSubject(java.lang.String newSubject)
          Ses the email subject.
 void validateParameters()
          Validates the input parameters are valid.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

CSROrderCommentsNotifyCmdImpl

public CSROrderCommentsNotifyCmdImpl()
CSROrderCommentsNotifyCmdImpl constructor.
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs
Throws:
ECException - If the resource can not be retrieved.

getStoreEMailAddress

public java.lang.String getStoreEMailAddress(java.lang.String newStoreId)
                                      throws java.lang.Exception
Obtain the email address of the store.
Parameters:
newStoreId - The store ID.
Returns:
The email address of the store.
Throws:
java.lang.Exception - If the email address cannot be retrieved

performExecute

public void performExecute()
                    throws ECException
This method performs the execution to send order comment.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - if the comment can not be sent.

setComment

public void setComment(java.lang.String newComment)
Sets the order comment which needs to be sent.
Specified by:
setComment in interface CSROrderCommentsNotifyCmd
Parameters:
newComment - The order comment.

setOrderId

public void setOrderId(java.lang.Long newOrderId)
Sets the order ID.
Specified by:
setOrderId in interface CSROrderCommentsNotifyCmd
Parameters:
newOrderId - The order ID.

setOrderId

public void setOrderId(java.lang.String newOrderId)
Sets the order ID.
Specified by:
setOrderId in interface CSROrderCommentsNotifyCmd
Parameters:
newOrderId - The order ID.

setReceiverEmailAddress

public void setReceiverEmailAddress(java.lang.String newReceiverEmailAddr)
Sets the email address.
Specified by:
setReceiverEmailAddress in interface CSROrderCommentsNotifyCmd
Parameters:
newReceiverEmailAddr - The email address.

setSubject

public void setSubject(java.lang.String newSubject)
Ses the email subject.
Specified by:
setSubject in interface CSROrderCommentsNotifyCmd
Parameters:
newSubject - The email subject.

validateParameters

public void validateParameters()
                        throws ECException
Validates the input parameters are valid.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - if parameters are invalid.