com.ibm.commerce.negotiation.bean.commands
Class OpenCryBidControlRuleBeanCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.DataBeanCommandImpl
        |
        +--com.ibm.commerce.negotiation.bean.commands.OpenCryBidControlRuleBeanCmdImpl
All Implemented Interfaces:
DataBeanCommand, ECCommand, ECTargetableCommand, OpenCryBidControlRuleBeanCmd

public class OpenCryBidControlRuleBeanCmdImpl
extends DataBeanCommandImpl
implements OpenCryBidControlRuleBeanCmd

This class populate a OpenCryBidControlRuleDataBean.


Field Summary
protected  java.lang.Long bidControlRuleId
           
protected  ControlRuleAccessBean controlRuleAccessBean
           
 
Fields inherited from class com.ibm.commerce.command.DataBeanCommandImpl
dataBean, emptyString, EURO_CODE, requestProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.bean.commands.OpenCryBidControlRuleBeanCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command.DataBeanCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
OpenCryBidControlRuleBeanCmdImpl()
          Creates an instance of the command, default constructor.
 
Method Summary
protected static void copy(DataBeanCommandImpl cmd, ControlRuleAccessBean rule, OpenCryBidControlRuleDataBean ruleBean)
          Populates a rule bean.
protected static void copyBidRuleFields(DataBeanCommand cmd, ControlRuleAccessBean rule, OpenCryBidControlRuleDataBean ruleBean)
          Populates an OpenCryControlRuleDataBean from an access bean and a DataBeanCommand.
 ControlRuleAccessBean getBidControlRule()
          Returns the control rule access bean.
 java.lang.Long getBidControlRuleId()
          Returns the bid control rule id.
 boolean isReadyToCallExecute()
          Always returns 'true'.
 void performExecute()
          Looks-up a specific open cry bid control rule, and populates the data bean with its contents.
 boolean performSecurityCheck()
          Always returns 'false'.
 void populateDataBeanCommand(InputDataBean aDataBean)
          Obtains the rule id from the input data bean.
 void reset()
          Resets the class; current implementation does nothing.
 void setBidRuleControl(ControlRuleAccessBean aRule)
          Sets the control rule access bean.
 void setBidRuleControlId(java.lang.Long Id)
          Sets the control rule id.
 void setRequestProperties(TypedProperty properties)
          Obtains command parameters from TypedProperty; current implementation does nothing.
 
Methods inherited from class com.ibm.commerce.command.DataBeanCommandImpl
convertToString, getDataBean, setDataBean
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from interface com.ibm.commerce.command.DataBeanCommand
getDataBean, setDataBean
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

bidControlRuleId

protected java.lang.Long bidControlRuleId

controlRuleAccessBean

protected ControlRuleAccessBean controlRuleAccessBean
Constructor Detail

OpenCryBidControlRuleBeanCmdImpl

public OpenCryBidControlRuleBeanCmdImpl()
Creates an instance of the command, default constructor.
Method Detail

copy

protected static void copy(DataBeanCommandImpl cmd,
                           ControlRuleAccessBean rule,
                           OpenCryBidControlRuleDataBean ruleBean)
Populates a rule bean.
Parameters:
cmd - data inherited from the superclass.
rule - data to be copied from the access bean.
ruleBean - data bean to be populated.

copyBidRuleFields

protected static void copyBidRuleFields(DataBeanCommand cmd,
                                        ControlRuleAccessBean rule,
                                        OpenCryBidControlRuleDataBean ruleBean)
Populates an OpenCryControlRuleDataBean from an access bean and a DataBeanCommand.
Parameters:
param - com.ibm.commerce.command.DataBeanCommand
rule - com.ibm.commerce.negotiation.objects.ControlRuleAccessBean
ruleBean - com.ibm.commerce.negotiation.beans.OpenCryBidRuleControlDataBean

getBidControlRule

public ControlRuleAccessBean getBidControlRule()
Returns the control rule access bean.
Returns:
com.ibm.commerce.negotiation.objects.ControlRuleAccessBean

getBidControlRuleId

public java.lang.Long getBidControlRuleId()
Returns the bid control rule id.
Returns:
Long

isReadyToCallExecute

public boolean isReadyToCallExecute()
Always returns 'true'.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Following copied from class: com.ibm.commerce.command.AbstractECTargetableCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
Looks-up a specific open cry bid control rule, and populates the data bean with its contents.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - when data bean could not be populated.

performSecurityCheck

public boolean performSecurityCheck()
Always returns 'false'.

populateDataBeanCommand

public void populateDataBeanCommand(InputDataBean aDataBean)
Obtains the rule id from the input data bean.
Overrides:
populateDataBeanCommand in class DataBeanCommandImpl
Parameters:
com.ibm.commerce.beans.InputDataBean -  

reset

public void reset()
Resets the class; current implementation does nothing.
Overrides:
reset in class AbstractECTargetableCommand

setBidRuleControl

public void setBidRuleControl(ControlRuleAccessBean aRule)
Sets the control rule access bean.
Specified by:
setBidRuleControl in interface OpenCryBidControlRuleBeanCmd
Parameters:
aRule - com.ibm.commerce.negotiation.objects.ControlRuleAccessBean

setBidRuleControlId

public void setBidRuleControlId(java.lang.Long Id)
Sets the control rule id.
Specified by:
setBidRuleControlId in interface OpenCryBidControlRuleBeanCmd
Parameters:
Id - java.long.Long

setRequestProperties

public void setRequestProperties(TypedProperty properties)
Obtains command parameters from TypedProperty; current implementation does nothing.
Specified by:
setRequestProperties in interface DataBeanCommand
Overrides:
setRequestProperties in class DataBeanCommandImpl
Parameters:
properties - com.ibm.commerce.datatype.TypedProperty