com.ibm.commerce.negotiation.bean.commands
Class ControlRuleListBeanCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.DataBeanCommandImpl
|
+--com.ibm.commerce.negotiation.bean.commands.ControlRuleListBeanCmdImpl
- All Implemented Interfaces:
- ControlRuleListBeanCmd, DataBeanCommand, ECCommand, ECTargetableCommand
- public class ControlRuleListBeanCmdImpl
- extends DataBeanCommandImpl
- implements ControlRuleListBeanCmd
This class will fetch an array of ControlRuleDataBean for
ControlRuleListBean
Method Summary |
ControlRuleAccessBean |
getControlRule()
Fetches a ControlRule from the list. |
java.lang.Long |
getOwnerId()
Fetches the ownerId used for list population. |
java.lang.String |
getRuleName()
Fetches the control rule name used for list population. |
java.lang.String |
getRuleType()
Fetches the control rule type used for list population. |
boolean |
isReadyToCallExecute()
Always returns 'true'. |
void |
performExecute()
Populates a list of control rules matching specific criteria, in the following
precedence:
- by match on both the ownerId and ruleType
- by match on both the ownerId and ruleName
- by macthing ownerId
- a list of all rules |
void |
populateDataBeanCommand(InputDataBean aDataBean)
Get input data (OwnerId, RuleType, or RuleName) from
ControlRuleListBean |
void |
reset()
Resets the bean. |
void |
setControlRule(ControlRuleAccessBean newControlRuleAccessBean)
Provides an access bean instance for returning an element from the list. |
void |
setOwnerId(java.lang.Long newOwnerId)
Sets the ownerId used by the finder methods to populate the list. |
void |
setRequestProperties(TypedProperty properties)
Obtains command parameters from TypedProperty; current implementation does nothing. |
void |
setRuleName(java.lang.String newRuleName)
Sets the rule name used by the finder method to populate the list. |
void |
setRuleType(java.lang.String newRuleType)
Sets the ruleType used by the finder methods to populate the list. |
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.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
controlRuleAccessBean
protected ControlRuleAccessBean controlRuleAccessBean
ownerId
protected java.lang.Long ownerId
ruleName
protected java.lang.String ruleName
ruleType
protected java.lang.String ruleType
ControlRuleListBeanCmdImpl
public ControlRuleListBeanCmdImpl()
getControlRule
public ControlRuleAccessBean getControlRule()
- Fetches a ControlRule from the list.
- Specified by:
getControlRule
in interface ControlRuleListBeanCmd
- Returns:
- com.ibm.commerce.negotiation.objects.ControlRuleAccessBean
getOwnerId
public java.lang.Long getOwnerId()
- Fetches the ownerId used for list population.
- Returns:
- Long
getRuleName
public java.lang.String getRuleName()
- Fetches the control rule name used for list population.
- Returns:
- java.lang.String
getRuleType
public java.lang.String getRuleType()
- Fetches the control rule type used for list population.
- Returns:
- java.lang.String
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
- Populates a list of control rules matching specific criteria, in the following
precedence:
- by match on both the ownerId and ruleType
- by match on both the ownerId and ruleName
- by macthing ownerId
- a list of all rules
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
populateDataBeanCommand
public void populateDataBeanCommand(InputDataBean aDataBean)
- Get input data (OwnerId, RuleType, or RuleName) from
ControlRuleListBean
- Overrides:
populateDataBeanCommand
in class DataBeanCommandImpl
- Parameters:
aDataBean
- The ControlRuleListBean
reset
public void reset()
- Resets the bean.
- Overrides:
reset
in class AbstractECTargetableCommand
setControlRule
public void setControlRule(ControlRuleAccessBean newControlRuleAccessBean)
- Provides an access bean instance for returning an element from the list.
- Parameters:
newControlRuleAccessBean
- com.ibm.commerce.negotiation.objects.ControlRuleAccessBean
setOwnerId
public void setOwnerId(java.lang.Long newOwnerId)
- Sets the ownerId used by the finder methods to populate the list.
- Specified by:
setOwnerId
in interface ControlRuleListBeanCmd
- Parameters:
newOwnerId
- Long
setRequestProperties
public void setRequestProperties(TypedProperty properties)
- Obtains command parameters from TypedProperty; current implementation does nothing.
- Overrides:
setRequestProperties
in class DataBeanCommandImpl
- Parameters:
properties
- com.ibm.commerce.datatype.TypedProperty
setRuleName
public void setRuleName(java.lang.String newRuleName)
- Sets the rule name used by the finder method to populate the list.
- Specified by:
setRuleName
in interface ControlRuleListBeanCmd
- Parameters:
newRuleName
- java.lang.String
setRuleType
public void setRuleType(java.lang.String newRuleType)
- Sets the ruleType used by the finder methods to populate the list.
- Specified by:
setRuleType
in interface ControlRuleListBeanCmd
- Parameters:
newRuleType
- java.lang.String