com.ibm.commerce.payment.ppc.commands

Class PPCStoreMerchantAssociateCtrlCmdImpl

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

    Input parameters:

    Name XPath Description
    actionName /XML/actionName The action name. Possible values include "create", and "delete". Mandatory.
    merchantId /XML/merchantId The merchant identifier. Mandatory when actionName is "create". ignored otherwise.

    Output parameters:

    None.

    Behaviour:

    • If actionName is "create", calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#mapStoreMerchant(Integer, Long) to associate current store with the specified merchant.
    • If actionName is "delete", calls com.ibm.commerce.payments.plugincontroller.PaymentsAdminInterface#deleteMerchant(Long) to deassociate current store with 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

      • PPCStoreMerchantAssociateCtrlCmdImpl

        public PPCStoreMerchantAssociateCtrlCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the main logic of creating/deleting the association between the store and the merchant.

        When a new association between the store and the merchant needs to be created, action name is "create".

        When the association between the store and 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 - In case of any failure
      • getMerchantId

        public java.lang.String getMerchantId()
        This method gets the identifier of the involved merchant.
        Returns:
        merchantId The identifier of the involved merchant
      • setMerchantId

        public void setMerchantId(java.lang.String aMerchantId)
        This method sets the identifier of the involved merhcant.
        Parameters:
        aMerchantId - The merchant identifier to set
      • getActionName

        public java.lang.String getActionName()
        This method returns the action name upon the association, which could be Create or Delete.
        Returns:
        the action name upon the merchant configuration
      • setActionName

        public void setActionName(java.lang.String anActionName)
        This method sets the action name upon the association, which could be Create 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