com.ibm.commerce.utf.commands
Class RFQNotificationMonitorBaseCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.utf.commands.RFQNotificationMonitorBaseCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RFQNotificationMonitorBaseCmd
Direct Known Subclasses:
RFQNotificationClosedMonitorCmdImpl, RFQNotificationCompletedMonitorCmdImpl, RFQNotificationSubmittedMonitorCmdImpl

public class RFQNotificationMonitorBaseCmdImpl
extends ControllerCommandImpl
implements RFQNotificationMonitorBaseCmd

The base ControllerCommand implementation class for monitoring when notifications need to be sent.

See Also:
getNotifyRFQOwner(), setNotifyRFQOwner(boolean), getSellerMemberGroupNameToNotify(), setSellerMemberGroupNameToNotify(java.lang.String), getSellerMemberGroupToNotifyOwnerId(),


Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.utf.commands.RFQNotificationMonitorBaseCmd
COPYRIGHT, defaultCommandClassName, NAME, NOTIFY_RFQ_OWNER_PARAM, SCHJOB_COMPETED_STATE_FLAG, SCHJOB_REFNUM_PARAM, SELLER_MBR_GROUP_NAME_TO_NOTIFY_OWNERID_PARAM, SELLER_MBR_GROUP_NAME_TO_NOTIFY_PARAM, siteStoreId
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
RFQNotificationMonitorBaseCmdImpl()
          RFQNotificationMonitorBaseCmdImpl constructor.
 
Method Summary
 boolean getNotifyRFQOwner()
           
 java.sql.Timestamp getScheduledJobLastCompletionTimestamp()
          Returns the last time the scheduled job was successfully completed.
 java.lang.String getSellerMemberGroupNameToNotify()
           
 java.lang.Long getSellerMemberGroupToNotifyOwnerId()
           
 UserAccessBean[] getUsersToNotify(RFQAccessBean rfq)
          Return a list of users to notify.
 void setNotifyRFQOwner(boolean aFlag)
           
 void setSellerMemberGroupNameToNotify(java.lang.String mbrGroup)
           
 void setSellerMemberGroupToNotifyOwnerId(java.lang.Long mbrGrpOwnerId)
           
 void updateCommandContextWithUsersPreferredLanguage(UserAccessBean user)
          Sets the command context language id to that of the user's preferred language.
 void validateParameters()
          Checks if the jobRefNum was specified with command.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, performExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Constructor Detail

RFQNotificationMonitorBaseCmdImpl

public RFQNotificationMonitorBaseCmdImpl()
RFQNotificationMonitorBaseCmdImpl constructor.
Method Detail

getNotifyRFQOwner

public boolean getNotifyRFQOwner()
Specified by:
getNotifyRFQOwner in interface RFQNotificationMonitorBaseCmd
Returns:
True if the RFQ owner is to be notified, false otherwise.
See Also:


getScheduledJobLastCompletionTimestamp

public java.sql.Timestamp getScheduledJobLastCompletionTimestamp()
                                                          throws ECException
Returns the last time the scheduled job was successfully completed. Returns the earliest timestamp possible if the job was never successfully completed before.

Returns:
The last time the scheduled job was successfully completed.
Throws:
ECException. -  

getSellerMemberGroupNameToNotify

public java.lang.String getSellerMemberGroupNameToNotify()
Specified by:
getSellerMemberGroupNameToNotify in interface RFQNotificationMonitorBaseCmd
Returns:
The member group name defined in the MBRGRP table that is used to retrieve the users in the seller's organization in order to send notifications to.
See Also:
setSellerMemberGroupNameToNotify(java.lang.String), getSellerMemberGroupToNotifyOwnerId(),


getSellerMemberGroupToNotifyOwnerId

public java.lang.Long getSellerMemberGroupToNotifyOwnerId()
Specified by:
getSellerMemberGroupToNotifyOwnerId in interface RFQNotificationMonitorBaseCmd
Returns:
The owner id of the member group name defined by the setSellerMemberGroupNameToNotify() method.
See Also:
setSellerMemberGroupNameToNotify(java.lang.String),


getUsersToNotify

public UserAccessBean[] getUsersToNotify(RFQAccessBean rfq)
                                  throws ECException
Return a list of users to notify.

Returns:
An array of UserAccessBean objects.
Throws:
ECException. -  

setNotifyRFQOwner

public void setNotifyRFQOwner(boolean aFlag)
Specified by:
setNotifyRFQOwner in interface RFQNotificationMonitorBaseCmd
Parameters:
aFlag - Sets whether the RFQ owner is notified. True the RFQ owner is notified, false the RFQ owner is not notified.
See Also:


setSellerMemberGroupNameToNotify

public void setSellerMemberGroupNameToNotify(java.lang.String mbrGroup)
Specified by:
setSellerMemberGroupNameToNotify in interface RFQNotificationMonitorBaseCmd
Parameters:
mbrGroup - The member group name defined in the MBRGRP table that is used to retrieve the users in the seller's organization in order to send notifications to.
See Also:
getSellerMemberGroupNameToNotify(), getSellerMemberGroupToNotifyOwnerId(),


setSellerMemberGroupToNotifyOwnerId

public void setSellerMemberGroupToNotifyOwnerId(java.lang.Long mbrGrpOwnerId)
Specified by:
setSellerMemberGroupToNotifyOwnerId in interface RFQNotificationMonitorBaseCmd
Parameters:
mbrGrpOwnerId - The owner id of the member group name defined by the setSellerMemberGroupNameToNotify() method.
See Also:
setSellerMemberGroupNameToNotify(java.lang.String),


updateCommandContextWithUsersPreferredLanguage

public void updateCommandContextWithUsersPreferredLanguage(UserAccessBean user)
                                                    throws ECException
Sets the command context language id to that of the user's preferred language. This also resets the locale in the command context.

Parameters:
UserAccessBean - The user.

validateParameters

public void validateParameters()
                        throws ECException
Checks if the jobRefNum was specified with command. This parameter is the scheduled job in the SCHCONFIG table. The reference number is needed to retrieve the last successfull job completion end time.

Optional parameters are:
sellerMemberGroupNameToNotify, the group name defined in the mbrgrp table that is used to notify the seller users.
sellerMemberGroupToNotifyOwnerId, the group name owner defined in the mbrgrp table that is used to notify the seller users. If the sellerMemberGroupToNotify parameter is specified then this parameter must also be specified.
storeId, the store identifier number in the command context. If the storeId is 0 then this command works on all the RFQs for the site.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - if the jobRefNum is not found.