com.ibm.commerce.payment.ppc.commands

Class PPCMerchantEditCtrlCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.base.helpers.EJBConstants, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PPCMerchantEditCtrlCmd, Protectable, ECConstants, ToolsControllerCommand, ECToolsConstants, 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 PPCMerchantEditCtrlCmdImpl
    extends ToolsControllerCommandImpl
    implements PPCMerchantEditCtrlCmd, ECConstants, ECToolsConstants, com.ibm.commerce.base.helpers.EJBConstants
    This is the default implementation of the PPCMerchantEditCtrlCmd tools controller command.

    Input parameters:

    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.

    Output parameters:

    None.

    Behaviour:

    • If actionName is "create", calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#createMerchant(String, Long) to create the merchant.
    • If actionName is "update":
      • If state is "0" (disabled), calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#deactivateMerchant(Long) to deactivate the merchant.
      • If state is "1" (enabled), calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#activateMerchant(Long) to activate the merchant.
    • If actionName is "delete", calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#deleteMerchant(Long) to delete the merchant.

    Task commands called:

    None.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The class name of this class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PPCMerchantEditCtrlCmdImpl

        public PPCMerchantEditCtrlCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the main logic of creating/editing/deleting the merchant.

        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".

        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • getMemberId

        public java.lang.Long getMemberId()
        This method returns the owner identifier of this merchant. The owner of a merchant must be an organization.
        Returns:
        memberId The owner identifier of this merchant
      • setMemberId

        public void setMemberId(java.lang.Long aMemberId)
        This method sets the owner identifier of this merchant. The owner of a merchant must be an organization.
        Parameters:
        aMemberId - The memberId to set.
      • getMerchantId

        public java.lang.String getMerchantId()
        This method returns the identifier of this merchant.
        Specified by:
        getMerchantId in interface PPCMerchantEditCtrlCmd
        Returns:
        merchantId The identifier of this merchant
      • setMerchantId

        public void setMerchantId(java.lang.String aMerchantId)
        This method sets the identifier of this merchant.
        Specified by:
        setMerchantId in interface PPCMerchantEditCtrlCmd
        Parameters:
        aMerchantId - The merchant identifier to set.
      • getMerchantName

        public java.lang.String getMerchantName()
        This method returns the name of this merchant.
        Returns:
        merchantName The name of this merchant
      • setMerchantName

        public void setMerchantName(java.lang.String aMerchantName)
        This method sets the name of this merchant.
        Parameters:
        aMerchantName - The name of this merchant
      • getState

        public java.lang.String getState()
        This method returns the state of this merchant.
        Returns:
        state The state of this merchant
      • setState

        public void setState(java.lang.String aState)
        This method sets the state of this merchant
        Parameters:
        aState - The state to set
      • getActionName

        public java.lang.String getActionName()
        This method sets the action name upon the merchant, which could be Add, Update or Delete.
        Returns:
        the action name upon the merchant
      • setActionName

        public void setActionName(java.lang.String anActionName)
        This method sets the action name upon the merchant, which could be Add, Update or Delete.
        Parameters:
        anActionName - The action name to set
      • reset

        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.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand