Package com.skava.oms.flow.util
Class OrderProcessUtil
java.lang.Object
com.skava.oms.flow.util.OrderProcessUtil
This class contains the common methods needed for order process.
- Since:
- Feb 28, 2019
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic AllowedPatchFields[]
allowedPatchFields
(String patchFields) Adds allowedPatchfileds for cancelled and return the the available order/itemsstatic OrderItem[]
Adds allowedPatchfileds for cancelled and return the the available order/itemsstatic OrderItem[]
allowedPatchFieldsforItesms
(String allowedPatchFields, Order order) Adds allowedPatchfileds for cancelled and return the the available order/itemsstatic AllowedPatchFields[]
allowedPatchFieldsforOrder
(AllowedPatchFields[] allowedPatchFields, Order order) Adds allowedPatchfileds for order checking with nextStatusstatic void
allowedPathFieldForItem
(AllowedPatchFields[] allowedPatchFields, OrderItem oi) static PatchOrderRequest
constructPatchFields
(Order order, String status) static PatchOrderRequest
constructPatchFields
(Order order, String status, boolean isParentOrderUpdate) static String
getDisplayStatus
(org.camunda.bpm.engine.delegate.DelegateExecution execution, String displayStatus) This method checks and returns the display status if present in BPMNstatic String
getDisplayStatus
(org.camunda.bpm.engine.delegate.DelegateTask execution, String displayStatus) This method checks and returns the display status if present in BPMNgetOrderDisplayStatusMap
(org.camunda.bpm.engine.delegate.DelegateExecution execution) getOrderDisplayStatusMap
(org.camunda.bpm.engine.delegate.DelegateTask execution) getOrderStatusMap
(org.camunda.bpm.engine.delegate.DelegateExecution execution) getOrderStatusMap
(org.camunda.bpm.engine.delegate.DelegateTask execution) getPatchedOrderItems
(OrderItemPatchDTO patchitemdto, List<OrderItem> splittedOrderItems) This method will extract the updated order items based on the given request.static PatchOrderRequest
getPatchOrderItemInfo
(Order order, PatchOrderRequest patchOrderRequest) This method generates orderitem information for patchOrderRequest model from the given orderstatic brave.propagation.TraceContext
static void
logDebug
(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order, brave.Tracer tracer) static void
static void
recalcAllowedPatchFields
(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order) This method set null value or other status in item level and order level.static void
updateLoyaltyUserInfo
(Order order, PreProcessLoyaltyEventRequest.LoyaltyUserInfo userInfo) This method updates loyalty user info
-
Method Details
-
getPatchOrderItemInfo
public static PatchOrderRequest getPatchOrderItemInfo(Order order, PatchOrderRequest patchOrderRequest) This method generates orderitem information for patchOrderRequest model from the given order- Parameters:
order
- - order objectpatchOrderRequest
- - patch order input- Returns:
- - patch order updated object
-
getDisplayStatus
public static String getDisplayStatus(org.camunda.bpm.engine.delegate.DelegateExecution execution, String displayStatus) This method checks and returns the display status if present in BPMN- Parameters:
execution
- delegatedisplayStatus
- status to be updated- Returns:
- status to be updated
-
getDisplayStatus
public static String getDisplayStatus(org.camunda.bpm.engine.delegate.DelegateTask execution, String displayStatus) This method checks and returns the display status if present in BPMN- Parameters:
execution
- delegate taskdisplayStatus
- status to be updated- Returns:
- status to be updated
-
allowedPatchFieldsforItesms
Adds allowedPatchfileds for cancelled and return the the available order/items- Parameters:
allowedPatchFields
- - value for allowedPatchFieldsorder
- details of order- Returns:
- Debug logger has been added to this method.
-
allowedPathFieldForItem
- Parameters:
allowedPatchFields
- Indicates the status of the order item for which the given configuration needs to be applied.oi
- order item information about an order.
-
allowedPatchFieldsEmptyforItesms
Adds allowedPatchfileds for cancelled and return the the available order/items- Parameters:
items
- number of items- Returns:
- returns the order items Debug logger has been added to this method.
-
allowedPatchFields
Adds allowedPatchfileds for cancelled and return the the available order/items- Parameters:
patchFields
- - value for allowedPatchFields- Returns:
- returns the values Debug logger has been added to this method.
-
allowedPatchFieldsforOrder
public static AllowedPatchFields[] allowedPatchFieldsforOrder(AllowedPatchFields[] allowedPatchFields, Order order) Adds allowedPatchfileds for order checking with nextStatus- Parameters:
allowedPatchFields
- - value for allowedPatchFieldsorder
- - orderdetails of order- Returns:
- returns the arrays Debug logger has been added to this method.
-
getPatchedOrderItems
public static List<OrderItem> getPatchedOrderItems(OrderItemPatchDTO patchitemdto, List<OrderItem> splittedOrderItems) This method will extract the updated order items based on the given request.- Parameters:
patchitemdto
- orderitems from patch reqeustsplittedOrderItems
- orderitems after splitting based on the given quantity and available quantity- Returns:
- affected order items
-
recalcAllowedPatchFields
public static void recalcAllowedPatchFields(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order) This method set null value or other status in item level and order level.- Parameters:
execution
- delteageexecution to get and validatevariableorder
- order detail info
-
constructPatchFields
public static PatchOrderRequest constructPatchFields(Order order, String status, boolean isParentOrderUpdate) -
getOrderDisplayStatusMap
-
getOrderStatusMap
-
getOrderDisplayStatusMap
-
getOrderStatusMap
-
updateLoyaltyUserInfo
public static void updateLoyaltyUserInfo(Order order, PreProcessLoyaltyEventRequest.LoyaltyUserInfo userInfo) This method updates loyalty user info- Parameters:
order
- indicates order detailsuserInfo
- indicates user info
-
constructPatchFields
- Parameters:
order
-status
-- Returns:
-
getTraceContextFromOrderTraceString
- Parameters:
order
-- Returns:
-
logDebug
public static void logDebug(org.camunda.bpm.engine.delegate.DelegateExecution execution, Order order, brave.Tracer tracer) - Parameters:
execution
-order
-tracer
-
-
logDebug
public static void logDebug(org.camunda.bpm.engine.delegate.DelegateTask execution, Order order, brave.Tracer tracer) - Parameters:
execution
-order
-tracer
-
-