com.ibm.commerce.returns.commands

Class ApproveReturnItemCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ApproveReturnItemCmd, 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 ApproveReturnItemCmdImpl
    extends TaskCommandImpl
    implements ApproveReturnItemCmd
    Default implementation of the controller command AdminReturnItem interface.

    Change the status of a return merchandise authorization (RMA) item based on the approval type.

    Behaviour

    • All existing deny reasons for the RMA item are removed from table RMAIDNYRSN.
    • If the approval type is cManualApproval, the status of the RMA item is changed to 'MAN'.
    • If the approval type is cPendingApproval, the status of the RMA item is changed to 'PND'. And the new vector of deny reasons is recorded in RMAIDNYRSN.
    • Otherwise the status of the RMA item is set to 'APP'

    Utilizes these access beans

    See Also:
    Serialized Form
    • Constructor Detail

      • ApproveReturnItemCmdImpl

        public ApproveReturnItemCmdImpl()
        ApproveReturnItemCmdImpl constructor.
    • Method Detail

      • reset

        public void reset()
        Reset the command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setApprovalType

        public void setApprovalType(java.lang.Character newApprovalType)
        Set the approval type.
        Specified by:
        setApprovalType in interface ApproveReturnItemCmd
        Parameters:
        newApprovalType - The approval type.
      • setDenyReasons

        public void setDenyReasons(java.util.Vector RMAItemDenyReasons)
        Set the existing vector of return RMA item deny reasons.
        Specified by:
        setDenyReasons in interface ApproveReturnItemCmd
        Parameters:
        RMAItemDenyReasons - The vector of return deny reason identifiers.
      • setRMAItemAB

        public void setRMAItemAB(RMAItemAccessBean newRMAItemAB)
        Set the RMA Item access bean which will be approved.
        Specified by:
        setRMAItemAB in interface ApproveReturnItemCmd
        Parameters:
        newRMAItemAB - The RMA item access bean to be approved.
      • validateParameters

        public void validateParameters()
                                throws ECException
        Check mandatory parameters.

        • RMAitemAB
          • The RMA item access bean to be approved
        • approvalType
        • RMAItemDenyReasons
          • The vector of return deny reason identifiers.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECApplicationException - If the RMAitem is null or if the approval type is pending and there are no deny reasons specified, throws com.ibm.commerce.exception.ECApplicationException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETER
        ECException