Package com.skava.oms.util
Class StatusValidationUtils
java.lang.Object
com.skava.oms.util.StatusValidationUtils
This class contains the utility method for validation.
- Since:
- Jul 11, 2018
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkValue
(OrderItemPatchDTO itemPatch, String key) This method is used to map and key value check.boolean
checkValue
(OrderPatchDTO orderPatchDTO, String key) This method is used to map and key value check.static boolean
orderItemNullcheck
(OrderItem orderitem) static boolean
validateAllowedPatchFieldItemlevelCancel
(OrderItem[] orderItems, OrderItemPatchDTO[] orderItemPatch) This method is used to validate allowed patch field item level.static void
validateCancelorRetrun
(Order order, PatchOrderRequest orderRequest) This method is used to validate cancel or return level.static void
validateExceptionforItemlevelCancel
(Order order, PatchOrderRequest orderRequest) This method is used to validate exception in item level cancel.static boolean
validateExceptionforOrderlevelCancel
(Order order, PatchOrderRequest orderRequest) This method is used to validate exception in cancel level.boolean
validateStatus
(AllowedPatchFields[] allowedPatchFields, String validateStatus)
-
Constructor Details
-
StatusValidationUtils
public StatusValidationUtils()
-
-
Method Details
-
validateCancelorRetrun
This method is used to validate cancel or return level.- Parameters:
order
- on which the validation to be done.orderRequest
- request given to be validated.
-
validateExceptionforItemlevelCancel
This method is used to validate exception in item level cancel.- Parameters:
order
- input model of orderorderRequest
- input model orderRequest.
-
validateAllowedPatchFieldItemlevelCancel
public static boolean validateAllowedPatchFieldItemlevelCancel(OrderItem[] orderItems, OrderItemPatchDTO[] orderItemPatch) This method is used to validate allowed patch field item level.- Parameters:
orderItems
- Indicates the array of order itemsorderItemPatch
- Indicates the array of order item patch- Returns:
- Returns boolean value.
-
orderItemNullcheck
- Parameters:
orderitem
- Contains the order item information about an order.- Returns:
- returns the boolean value
-
validateExceptionforOrderlevelCancel
public static boolean validateExceptionforOrderlevelCancel(Order order, PatchOrderRequest orderRequest) This method is used to validate exception in cancel level.- Parameters:
order
- input model of orderorderRequest
- input model orderRequest.- Returns:
- the checkOrderFlag
-
checkValue
This method is used to map and key value check.- Parameters:
itemPatch
- other Property valueskey
- Other Property values- Returns:
- returns the flag.
-
checkValue
This method is used to map and key value check.- Parameters:
orderPatchDTO
- other Property valueskey
- Other Property values- Returns:
- returns the flag.
-
validateStatus
-