Class GetOrderController

java.lang.Object
com.skava.oms.web.GetOrderController

@RestController @RequestMapping("/orders") public class GetOrderController extends Object
This class defines the controller implementations to handle the order request.
Author:
Infosys Equinox
  • Constructor Details

    • GetOrderController

      public GetOrderController()
  • Method Details

    • getAllOrder

      @GetMapping @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_REG_USER\', \'oms\', #collectionid) || hasRoleForServiceAndCollection(\'ROLE_GUEST\', \'oms\', #collectionid) ||hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER_ADMIN\', \'oms\', #collectionid) ||hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER\', \'oms\', #collectionid) ||hasPrivilegeForServiceAndCollection(\'oms/viewall/order\', \'oms\', #collectionid)") public org.springframework.http.ResponseEntity<Collection<OrderDTO>> getAllOrder(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="page",required=false,defaultValue="1") int page, @RequestParam(value="size",required=false,defaultValue="100") int size, @RequestParam(value="lookup",required=false,defaultValue="false") boolean lookup, @RequestParam(value="filters",required=false) @DeIdentify String filters, @RequestParam(value="sort",required=false,defaultValue="orderinfo.updatedtime:DESC") String sort, @RequestParam(value="archive",required=false) boolean archive, @RequestParam(value="skipTotalCount",required=false,defaultValue="false") boolean skipTotalCount)
      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 identifier
      version - 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 specified
      size - The number of documents being retrieved on the corresponding page specified by page parameter
      lookup - if “lookup” param is set to true and all the required filters which are defined in collection properties should be passed with order id, Login is not required. Returns 404 if the given filters doesn’t match
      filters - Holds the filter criteria
      sort - Holds the sorting param which contains sorting property name and sorting order
      archive - It decides the Order Data fetched from Primary or Archive
      Returns:
      It returns the OrderDTO.