com.ibm.commerce.ordermanagement.util

Class OrderBlockManager

  • java.lang.Object
    • com.ibm.commerce.ordermanagement.util.OrderBlockManager
  • All Implemented Interfaces:
    OrderBlockManagerInterface


    public class OrderBlockManager
    extends java.lang.Object
    implements OrderBlockManagerInterface
    Utility class to determine the block status of an order, or to either block or unblock an order. This is a singleton class and as such has a protected constructor.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long block(java.lang.Long longOrderId, java.lang.Integer blkRsnCodeId, java.lang.String comments, CommandContext cmdContext)
      A requested has been received to block an order.
      java.lang.Long block(java.lang.Long longOrderId, java.lang.String blockReasonDesc, java.lang.String comments, CommandContext cmdContext)
      A requested has been received to block an order.
      void copyBlocksBetweenOrders(java.lang.Long copyFromOrderId, java.lang.Long copyToOrderId)
      Copy all blocks from order A (from order ID) to order B (to order ID).
      java.lang.Long getBlockReasonCodeId(java.lang.Long ordersId, java.lang.String blockReasonCodeDescription)
      For an order and a textual description of a block.
      static OrderBlockManagerInterface getInstance()
      This method returns the reference of the instance to this class
      java.util.Enumeration getOrderBlockReasons(java.lang.Long ordersId)
      For a particular order gets all the reasons it is blocked for
      boolean isBlocked(java.lang.Long longOrderId, CommandContext cmdContext)
      Determined if the order is blocked or not.
      boolean isBlockedDueToReason(java.lang.Long ordersId, java.lang.Integer blkRsnCodeId)
      For a particular order ID and block reason code ID, determine if the order is blocked or not
      boolean isBlockedDueToReason(java.lang.Long ordersId, java.lang.String blockReasonCodeDescription)
      For a particular order and a block reason description determine if the order is blocked or not
      boolean isBlockReasonCodeRespected(java.lang.Integer storeEntiyId, java.lang.Integer blkRsnCodeId)
      Determines if a block reason code is respected on a store.
      boolean isBlockReasonCodeRespected(java.lang.Integer storeEntiyId, java.lang.String blockReasonCodeDescription)
      Determines if a block reason code is respected on a store.
      boolean isBlockReasonCodeTickerGenearation(java.lang.Integer storeEntiyId, java.lang.Integer blkRsnCodeId)
      Determines if a block reason is tickler generation on a store.
      boolean isBlockReasonCodeTickerGenearation(java.lang.Integer storeEntiyId, java.lang.String blockReasonCodeDescription)
      Determines if a block reason is tickler generation on a store.
      void unBlock(java.lang.Long longOrderId, java.lang.Integer blkRsnCodeId, java.lang.String comments, CommandContext cmdContext)
      A requested has been received to unblock an order.
      void unBlock(java.lang.Long longOrderId, java.lang.String blockReasonDesc, java.lang.String comments, CommandContext cmdContext)
      A requested has been received to unblock an order.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static OrderBlockManagerInterface getInstance()
        This method returns the reference of the instance to this class
        Returns:
        The unique instance of this class.
      • isBlocked

        public boolean isBlocked(java.lang.Long longOrderId,
                                 CommandContext cmdContext)
                          throws ECException
        Determined if the order is blocked or not. The Store BLKEXTASYNCH flag will be inspected to determine whether to invoke the command in an asynchronous or non-asynchronous fashion.
        Specified by:
        isBlocked in interface OrderBlockManagerInterface
        Parameters:
        longOrderId -
        cmdContext -
        Returns:
        boolean
        Throws:
        ECException
      • block

        public java.lang.Long block(java.lang.Long longOrderId,
                                    java.lang.Integer blkRsnCodeId,
                                    java.lang.String comments,
                                    CommandContext cmdContext)
                             throws ECException
        A requested has been received to block an order.
        Specified by:
        block in interface OrderBlockManagerInterface
        Parameters:
        longOrderId -
        blkRsnCodeId -
        comments -
        cmdContext -
        Returns:
        tickler id
        Throws:
        ECException
      • block

        public java.lang.Long block(java.lang.Long longOrderId,
                                    java.lang.String blockReasonDesc,
                                    java.lang.String comments,
                                    CommandContext cmdContext)
                             throws ECException
        A requested has been received to block an order.
        Specified by:
        block in interface OrderBlockManagerInterface
        Parameters:
        longOrderId -
        blockReasonDesc -
        comments -
        cmdContext -
        Returns:
        tickler id
        Throws:
        ECException
      • unBlock

        public void unBlock(java.lang.Long longOrderId,
                            java.lang.Integer blkRsnCodeId,
                            java.lang.String comments,
                            CommandContext cmdContext)
                     throws ECException
        A requested has been received to unblock an order.
        Specified by:
        unBlock in interface OrderBlockManagerInterface
        Parameters:
        longOrderId -
        blkRsnCodeId -
        comments -
        cmdContext -
        Throws:
        ECException
      • unBlock

        public void unBlock(java.lang.Long longOrderId,
                            java.lang.String blockReasonDesc,
                            java.lang.String comments,
                            CommandContext cmdContext)
                     throws ECException
        A requested has been received to unblock an order.
        Specified by:
        unBlock in interface OrderBlockManagerInterface
        Parameters:
        longOrderId -
        blockReasonDesc -
        comments -
        cmdContext -
        Throws:
        ECException
      • copyBlocksBetweenOrders

        public void copyBlocksBetweenOrders(java.lang.Long copyFromOrderId,
                                            java.lang.Long copyToOrderId)
                                     throws ECException
        Copy all blocks from order A (from order ID) to order B (to order ID). All blocks will be copied, both resolved and unresolved.
        Specified by:
        copyBlocksBetweenOrders in interface OrderBlockManagerInterface
        Parameters:
        copyFromOrderId -
        copyToOrderId -
        Throws:
        ECException
      • isBlockedDueToReason

        public boolean isBlockedDueToReason(java.lang.Long ordersId,
                                            java.lang.String blockReasonCodeDescription)
                                     throws ECException
        For a particular order and a block reason description determine if the order is blocked or not
        Specified by:
        isBlockedDueToReason in interface OrderBlockManagerInterface
        Parameters:
        ordersId -
        blockReasonCodeDescription -
        Returns:
        boolean
        Throws:
        ECException
      • isBlockedDueToReason

        public boolean isBlockedDueToReason(java.lang.Long ordersId,
                                            java.lang.Integer blkRsnCodeId)
                                     throws ECException
        For a particular order ID and block reason code ID, determine if the order is blocked or not
        Specified by:
        isBlockedDueToReason in interface OrderBlockManagerInterface
        Parameters:
        ordersId -
        blkRsnCodeId -
        Returns:
        boolean
        Throws:
        ECException
      • getBlockReasonCodeId

        public java.lang.Long getBlockReasonCodeId(java.lang.Long ordersId,
                                                   java.lang.String blockReasonCodeDescription)
                                            throws ECException
        For an order and a textual description of a block. Get the block reason code so long as it exists for the order and it is unresolved.
        Specified by:
        getBlockReasonCodeId in interface OrderBlockManagerInterface
        Parameters:
        ordersId -
        blockReasonCodeDescription -
        Returns:
        Long
        Throws:
        ECException
      • isBlockReasonCodeRespected

        public boolean isBlockReasonCodeRespected(java.lang.Integer storeEntiyId,
                                                  java.lang.Integer blkRsnCodeId)
                                           throws ECException
        Determines if a block reason code is respected on a store.
        Specified by:
        isBlockReasonCodeRespected in interface OrderBlockManagerInterface
        Parameters:
        storeEntiyId -
        blkRsnCodeId -
        Returns:
        boolean true indicates the block reason code is respected on the store.
        Throws:
        ECException
      • isBlockReasonCodeRespected

        public boolean isBlockReasonCodeRespected(java.lang.Integer storeEntiyId,
                                                  java.lang.String blockReasonCodeDescription)
                                           throws ECException
        Determines if a block reason code is respected on a store.
        Specified by:
        isBlockReasonCodeRespected in interface OrderBlockManagerInterface
        Parameters:
        storeEntiyId -
        blockReasonCodeDescription -
        Returns:
        boolean true indicates the block reason code is respected on the store.
        Throws:
        ECException
      • isBlockReasonCodeTickerGenearation

        public boolean isBlockReasonCodeTickerGenearation(java.lang.Integer storeEntiyId,
                                                          java.lang.Integer blkRsnCodeId)
                                                   throws ECException
        Determines if a block reason is tickler generation on a store.
        Specified by:
        isBlockReasonCodeTickerGenearation in interface OrderBlockManagerInterface
        Parameters:
        storeEntiyId -
        blkRsnCodeId -
        Returns:
        boolean true indicates the block reason code is ticker generation on the store.
        Throws:
        ECException
      • isBlockReasonCodeTickerGenearation

        public boolean isBlockReasonCodeTickerGenearation(java.lang.Integer storeEntiyId,
                                                          java.lang.String blockReasonCodeDescription)
                                                   throws ECException
        Determines if a block reason is tickler generation on a store.
        Specified by:
        isBlockReasonCodeTickerGenearation in interface OrderBlockManagerInterface
        Parameters:
        storeEntiyId -
        blockReasonCodeDescription -
        Returns:
        boolean true indicates the block reason code is ticker generation on the store.
        Throws:
        ECException