Class OrderMethodsForMail

java.lang.Object
com.skava.oms.flow.util.OrderMethodsForMail

@Component public final class OrderMethodsForMail extends Object
This class OrderMethodsForMail defines the notification properties based on the type of notification. This class will add the Notification properties to the order.
Since:
26-Jul-2018
Author:
Parthiban.P
  • Field Details

    • VARIABLE_DELETION_CAUSE

      public static final String VARIABLE_DELETION_CAUSE
      The constant VARIABLE_DELETION_CAUSE
      See Also:
  • Method Details

    • orderDefaultMail

      public static Map<String,Object> orderDefaultMail(Order order, Map<String,Object> notify, org.camunda.bpm.engine.delegate.VariableScope execution)
      This method will add properties to the notification
      Parameters:
      order - - it will update the order.
      notify - - hashmap to update the notification property
      execution - - delegate execution task
      Returns:
      - the updated hashmap to the order. Debug logger has been added to this method.
    • getNotifyProcess

      public static Map<String,Object> getNotifyProcess(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order)
      This method contains the default process for the External notification
      Parameters:
      execution - - Execution used in current delegate
      order - - contains the data related to the process
      Returns:
    • checkAndSetItemNofication

      public static Map<String,Object> checkAndSetItemNofication(OrderItem item, Order order)
      This method validate and set item notifications
      Parameters:
      item - -details of items
      order - - contains the data related to the order
    • getOrderLevelShippingCharges

      public static BigDecimal getOrderLevelShippingCharges(Math ordermath, Order order)
      This will give the Order Level Shipping Charges.
      Parameters:
      ordermath - - order math details.
      order - - to update the order.
      Returns:
      - return the cost price from the math. Debug logger has been added to this method.
    • setNotificationMap

      public static void setNotificationMap(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order, Map<String,Object> notify)
      Parameters:
      execution - - Execution of the BPMN
      order - - to update the order.
      notify - - hashmap for order update.
    • getReasonCodeMessage

      public static void getReasonCodeMessage(OrderItemPatchDTO[] itempatchDTO, OrderItem orderItem, Map<String,String> reasoncode)
      Parameters:
      itempatchDTO - the unique identifier of the item.
      orderItem - the order item information about an order.
      reasoncode - the reason code for the operation made on the order.
    • checkAndSetItemNofication

      public static Map<String,Object> checkAndSetItemNofication(Order order, OrderItem item, String reasoncode, String reasonmessage)
      Parameters:
      order - - to update the order.
      item - - indicates the order item
      reasoncode - - indicates the order item patch from request
      reasonmessage - the reason message for the operation made on the order.
      Returns:
      - updated notification item