com.ibm.commerce.messaging.commands
Class GetRecipientsCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.messaging.commands.GetRecipientsCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, GetRecipientsCmd, TaskCommand

public class GetRecipientsCmdImpl
extends TaskCommandImpl
implements GetRecipientsCmd

This is the default implementation of GetRecipientsCmd.

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.messaging.commands. GetRecipientsCmd
ALL_CUSTOMERS, ALL_USERS, CUSTOMERS, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
GetRecipientsCmdImpl()
           
 
Method Summary
 java.lang.Long[] getMemberIds()
          Gets the message recipients.
 void performExecute()
          Constructs a hashtable of memberIds for the broadcast message to be sent to based on the broadcast mode.
 void setCatalogEntryId(java.lang.Long anCatalogEntryId)
          Sets The catalog entry (for targeted broadcast).
 void setContractId(java.lang.Long anContractId)
          Sets The contract (for targeted broadcast).
 void setMode(java.lang.Integer anMode)
          Sets The broadcast mode.
 void setOfferId(java.lang.Long anOfferId)
          Sets The offer (for targeted broadcast).
 void setPartNumber(java.lang.String astrPartNumber)
          Sets The part number (for targeted broadcast).
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets The requestProperties object of BroadcastMessage.
 void validateParameters()
          Validates the broadcast mode parameter
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, 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

GetRecipientsCmdImpl

public GetRecipientsCmdImpl()
Method Detail

getMemberIds

public java.lang.Long[] getMemberIds()
Gets the message recipients.
Specified by:
getMemberIds in interface GetRecipientsCmd
Returns:
The array of message recipients

performExecute

public void performExecute()
                    throws ECException
Constructs a hashtable of memberIds for the broadcast message to be sent to based on the broadcast mode.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If the message is not sent.

setCatalogEntryId

public void setCatalogEntryId(java.lang.Long anCatalogEntryId)
Sets The catalog entry (for targeted broadcast).
Specified by:
setCatalogEntryId in interface GetRecipientsCmd
Parameters:
anCatalogEntryId - The catalog entry Id to set

setContractId

public void setContractId(java.lang.Long anContractId)
Sets The contract (for targeted broadcast).
Specified by:
setContractId in interface GetRecipientsCmd
Parameters:
anContractId - The contract Id to set.

setMode

public void setMode(java.lang.Integer anMode)
Sets The broadcast mode.
Specified by:
setMode in interface GetRecipientsCmd
Parameters:
anMode - The broadcast mode to set. 0 - broadcast to all customers. 2 - broadcast to targeted customers. 3 - broadcast to all registered users.

setOfferId

public void setOfferId(java.lang.Long anOfferId)
Sets The offer (for targeted broadcast).
Specified by:
setOfferId in interface GetRecipientsCmd
Parameters:
anOfferId - The offer Id to set.

setPartNumber

public void setPartNumber(java.lang.String astrPartNumber)
Sets The part number (for targeted broadcast).
Specified by:
setPartNumber in interface GetRecipientsCmd
Parameters:
astrPartNumber - The part number to set.

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Sets The requestProperties object of BroadcastMessage.
Specified by:
setRequestProperties in interface GetRecipientsCmd
Throws:
ECException - If the setting of the requestProperties fails.
ECApplicationException

validateParameters

public void validateParameters()
                        throws ECException
Validates the broadcast mode parameter
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If the parameter does not have any of the values 0 - broadcast to all customers. 2 - broadcast to targeted customers. 3 - broadcast to all registered users.