public class PPCMerchantEditCtrlCmdImpl extends ToolsControllerCommandImpl implements PPCMerchantEditCtrlCmd, ECConstants, ECToolsConstants, com.ibm.commerce.base.helpers.EJBConstants
Name | XPath | Description |
---|---|---|
actionName | /XML/actionName | The action name. Possible values include "create", "update" and "delete". Mandatory. |
merchantId | /XML/merchantId | The merchant ID. Mandatory when actionName is "update" or "delete", ignored otherwise. |
merchantName | /XML/merchantName | The name of the merchant. Mandatory when actionName is "create", ignored otherwise. |
state | /XML/state | The state of the merchant. Possible values include "0" (disabled) and "1" (enabled). Mandatory when actionName is "update", ignored otherwise. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASS_NAME
The class name of this class.
|
static java.lang.String | COPYRIGHT
The internal copyright field.
|
Constructor and Description |
---|
PPCMerchantEditCtrlCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | checkActionNameException()
This method checks that the action name is in {create, update, delete}.
|
protected void | checkMerchantIdNullException()
This method checks whether merchant id is null.
|
protected void | checkNumberFormatException()
This method checks that the numeric fields are in the correct numeric format.
|
protected void | checkRequiredParameter()
This method checks if required parameters is present.
|
java.lang.String | getActionName()
This method sets the action name upon the merchant, which could be Add, Update or Delete.
|
java.lang.Long | getMemberId()
This method returns the owner identifier of this merchant.
|
java.lang.String | getMerchantId()
This method returns the identifier of this merchant.
|
java.lang.String | getMerchantName()
This method returns the name of this merchant.
|
protected com.ibm.commerce.payments.plugincontroller.beans.PluginController | getPaymentsFacade()
This method gets interface of the payment processing component.
|
AccessVector | getResources()
This method gets the access vector accessed by this command.
|
java.lang.String | getState()
This method returns the state of this merchant.
|
protected void | handleSubmitError(ECException e)
This method constructs and returns the error message.
|
void | performExecute()
This method performs the main logic of creating/editing/deleting the merchant.
|
void | reset()
This method resets the command fields.
|
void | setActionName(java.lang.String anActionName)
This method sets the action name upon the merchant, which could be Add, Update or Delete.
|
void | setMemberId(java.lang.Long aMemberId)
This method sets the owner identifier of this merchant.
|
void | setMerchantId(java.lang.String aMerchantId)
This method sets the identifier of this merchant.
|
void | setMerchantName(java.lang.String aMerchantName)
This method sets the name of this merchant.
|
void | setState(java.lang.String aState)
This method sets the state of this merchant
|
void | validateParameters()
This method gets information from requestProperties and sets the information into the command local variables.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
protected com.ibm.commerce.payments.plugincontroller.beans.PluginController getPaymentsFacade() throws J2EEException
public void validateParameters() throws ECException
protected void handleSubmitError(ECException e) throws ECApplicationException
protected void checkNumberFormatException() throws ECApplicationException
protected void checkActionNameException() throws ECApplicationException
protected void checkMerchantIdNullException() throws ECApplicationException
protected void checkRequiredParameter() throws ECException
public AccessVector getResources() throws ECException
public void performExecute() throws ECException
When the new merchant needs to be created, there is no merchant id in the request properties. And the action name is "create".
When the merchant needs to be updated, action name is "update".
When the merchant needs to be deleted, action name is "delete".
public java.lang.Long getMemberId()
public void setMemberId(java.lang.Long aMemberId)
public java.lang.String getMerchantId()
public void setMerchantId(java.lang.String aMerchantId)
public java.lang.String getMerchantName()
public void setMerchantName(java.lang.String aMerchantName)
public java.lang.String getState()
public void setState(java.lang.String aState)
public java.lang.String getActionName()
public void setActionName(java.lang.String anActionName)
public void reset()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.