com.ibm.commerce.messaging.commands
Class BroadcastMessageCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.ControllerCommandImpl
-
- com.ibm.commerce.messaging.commands.BroadcastMessageCmdImpl
-
- All Implemented Interfaces:
- AccCommand, com.ibm.commerce.command.CacheableECCommand, ControllerCommand, ECCommand, ECTargetableCommand, TaskCommand, BroadcastMessageCmd, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class BroadcastMessageCmdImpl extends ControllerCommandImpl implements BroadcastMessageCmd
The default implementation of BroadcastMessageCmd will broadcast messages to specific groups.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field-
Fields inherited from interface com.ibm.commerce.messaging.commands.BroadcastMessageCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description BroadcastMessageCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
performExecute()
The method contains the business logic for this controller command.void
setCatalogEntryId(java.lang.Long anCatalogEntryId)
This method sets the catalog entry ID.void
setContractId(java.lang.Long anContractId)
This method sets the contract ID.void
setMessageContent(java.lang.String astrMessageContent)
Sets the message content.void
setMessageProperties(TypedProperty aMessageProperties)
Sets themessageProperties
object used by message composition.void
setMessageType(java.lang.Integer anMessageType)
Sets the message type (as specified in the MSGTYPES table).void
setMode(java.lang.Integer anMode)
Sets broadcast mode.void
setOfferId(java.lang.Long anOfferId)
Sets the offer ID (for targeted broadcast).void
setPartNumber(java.lang.String astrPartNumber)
Sets the part number (for targeted broadcast).void
setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties.void
validateParameters()
Validates required parameters before executing this command.-
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
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
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute
-
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, setAccCheck
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field- See Also:
- Constant Field Values
-
-
Method Detail
-
performExecute
public void performExecute() throws ECException
The method contains the business logic for this controller command. The SendMsgCmd will be invoked to send the broadcast messages to specified recipients.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- See Also:
ECCommand.performExecute()
-
setCatalogEntryId
public void setCatalogEntryId(java.lang.Long anCatalogEntryId)
This method sets the catalog entry ID.- Specified by:
setCatalogEntryId
in interfaceBroadcastMessageCmd
- Parameters:
anCatalogEntryId
- The catalog entry ID.- See Also:
BroadcastMessageCmd.setCatalogEntryId(Long).
-
setContractId
public void setContractId(java.lang.Long anContractId)
This method sets the contract ID.- Specified by:
setContractId
in interfaceBroadcastMessageCmd
- Parameters:
anContractId
- The contract ID.- See Also:
BroadcastMessageCmd.setContractId(Long).
-
setMessageContent
public void setMessageContent(java.lang.String astrMessageContent)
Sets the message content. If not specified, it will be composed from the view specified in MSGTYPES.VIEWNAME.- Specified by:
setMessageContent
in interfaceBroadcastMessageCmd
- Parameters:
astrMessageContent
- The message content.- See Also:
BroadcastMessageCmd.setMessageContent(String).
-
setMessageProperties
public void setMessageProperties(TypedProperty aMessageProperties)
Sets themessageProperties
object used by message composition.- Specified by:
setMessageProperties
in interfaceBroadcastMessageCmd
- Parameters:
aMessageProperties
- The message properties. This object is TypedProperty.- See Also:
BroadcastMessageCmd.setMessageProperties(TypedProperty)
-
setMessageType
public void setMessageType(java.lang.Integer anMessageType)
Sets the message type (as specified in the MSGTYPES table). If not specified, the defaultBroadcastMessage
message type will be used.- Specified by:
setMessageType
in interfaceBroadcastMessageCmd
- Parameters:
anMessageType
- The message type.- See Also:
BroadcastMessageCmd.setMessageType(Integer)
-
setMode
public void setMode(java.lang.Integer anMode)
Sets broadcast mode. 0 - broadcast to all customers.
2 - broadcast to targeted customers.
3 - broadcast to all registered users.- Specified by:
setMode
in interfaceBroadcastMessageCmd
- Parameters:
anMode
- The broadcast mode.- See Also:
BroadcastMessageCmd.setMode(Integer)
-
setOfferId
public void setOfferId(java.lang.Long anOfferId)
Sets the offer ID (for targeted broadcast).- Specified by:
setOfferId
in interfaceBroadcastMessageCmd
- Parameters:
anOfferId
- The offer ID.- See Also:
BroadcastMessageCmd.setOfferId(Long)
-
setPartNumber
public void setPartNumber(java.lang.String astrPartNumber)
Sets the part number (for targeted broadcast).- Specified by:
setPartNumber
in interfaceBroadcastMessageCmd
- Parameters:
astrPartNumber
- The part number.- See Also:
BroadcastMessageCmd.setPartNumber(String)
-
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
Sets the request properties.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classControllerCommandImpl
- Parameters:
aRequestProperties
- The request properties.- Throws:
ECApplicationException
- See Also:
ControllerCommand.setRequestProperties(TypedProperty)
-
validateParameters
public void validateParameters() throws ECException
Validates required parameters before executing this command. The current implementation does not validate any parameters.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
- See Also:
ECCommand.validateParameters()
-
-