Package com.skava.oms.web
Class OrderProcessController
java.lang.Object
com.skava.oms.web.OrderProcessController
@RestController
@RequestMapping("/orders/process/")
public class OrderProcessController
extends Object
This OrderProcessController class defines the controller implementations to handle
the order request.
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Collection<OrderDTO>>
getLockedOrders
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, long collectionid, String version, String locale, Boolean skipTotalCount, String filters, int page, int size, String sort) org.springframework.http.ResponseEntity<OrderDTO>
patchMessageResend
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, long collectionid, String version, String locale, String orderId, String queueName, @Valid MessageResendPatchFieldsDTO patchObj) org.springframework.http.ResponseEntity<OrderDTO>
patchOrder
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, long collectionid, String version, String locale, String orderId, @Valid LockedOrderPatchFieldsDTO patchObj) This method is used to patch the modifiable order details based on given request.
-
Constructor Details
-
OrderProcessController
public OrderProcessController()
-
-
Method Details
-
getLockedOrders
@GetMapping("/lockedorders") @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_CSR_ADMIN\', \'oms\', #collectionid) ||hasPrivilegeForServiceAndCollection(\'oms/view/order\', \'oms\', #collectionid)") public org.springframework.http.ResponseEntity<Collection<OrderDTO>> getLockedOrders(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestHeader(value="x-collection-id",required=true) long collectionid, @RequestHeader(value="x-version",required=false) String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestParam(value="skipTotalCount",required=false,defaultValue="false") Boolean skipTotalCount, @RequestParam(value="filters",required=false) String filters, @RequestParam(value="page",required=false,defaultValue="1") int page, @RequestParam(value="size",required=false,defaultValue="100") int size, @RequestParam(value="sort",required=false,defaultValue="orderinfo.updatedtime:DESC") String sort) - Parameters:
request
- Request provides request information for HTTP servlets. Request provides request information for HTTP servlets.response
- Response provides HTTP-specific functionality in sending a response.collectionid
- It contains the valid collection identifier of this micro service and requested operation will be performed on this collection identifierversion
- It contains value of the API version.locale
- API Response and error messages will be responded in the locale mentioned in this parameter.page
- The page number to be retrieved where the size of the page must be specifiedsize
- The number of documents being retrieved on the corresponding page specified by page parameterfilters
- Holds the filter criteriasort
- Holds the sorting param which contains sorting property name and sorting order- Returns:
- It returns the
OrderDTO
.
-
patchOrder
@PatchMapping("/{orderId}/releaselock") @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_CSR_ADMIN\', \'oms\', #collectionid) ||hasPrivilegeForServiceAndCollection(\'oms/update/order\', \'oms\', #collectionid)") public org.springframework.http.ResponseEntity<OrderDTO> patchOrder(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestHeader(value="x-collection-id",required=true) long collectionid, @RequestHeader(value="x-version",required=false) String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @PathVariable("orderId") String orderId, @RequestBody @Valid @Valid LockedOrderPatchFieldsDTO patchObj) This method is used to patch the modifiable order details based on given request.- Parameters:
request
- Request provides request information for HTTP servlets. Request provides request information for HTTP servlets.response
- Response provides HTTP-specific functionality in sending a response.collectionid
- It contains the valid collection identifier of this micro service and requested operation will be performed on this collection identifierversion
- It contains value of the API version.locale
- API Response and error messages will be responded in the locale mentioned in this parameter.orderId
- It refers to unique identifier of order for which the patch request has to be donepatchObj
- Contains the patch request for the order/item- Returns:
- It returns the
OrderResponse
.
-
patchMessageResend
@PatchMapping("/{orderId}/publish/{queueName}") @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_CSR_ADMIN\', \'oms\', #collectionid) ||hasPrivilegeForServiceAndCollection(\'oms/update/order\', \'oms\', #collectionid)") public org.springframework.http.ResponseEntity<OrderDTO> patchMessageResend(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestHeader(value="x-collection-id",required=true) long collectionid, @RequestHeader(value="x-version",required=false) String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @PathVariable("orderId") String orderId, @PathVariable("queueName") String queueName, @RequestBody @Valid @Valid MessageResendPatchFieldsDTO patchObj)
-