Class ProductController

java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.wms.inventory.rest.ProductController

@Validated @MeasuredRestController public class ProductController extends org.openwms.core.http.AbstractWebController
A ProductController.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • productService

      private final ProductService productService
    • mapper

      private final org.ameba.mapping.BeanMapper mapper
    • productMapper

      private final ProductMapper productMapper
    • validator

      private final javax.validation.Validator validator
  • Constructor Details

    • ProductController

      ProductController(ProductService productService, org.ameba.mapping.BeanMapper mapper, ProductMapper productMapper, javax.validation.Validator validator)
  • Method Details

    • getProductSelfLink

      public static org.springframework.hateoas.Link getProductSelfLink(ProductVO o)
    • index

      @GetMapping("/v1/products/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
    • findAll

      @Transactional(readOnly=true) @GetMapping("/v1/products") public org.springframework.http.ResponseEntity<List<ProductVO>> findAll()
    • findBySKU

      @Transactional(readOnly=true) @GetMapping(value="/v1/products", params="sku") public org.springframework.http.ResponseEntity<ProductVO> findBySKU(@RequestParam("sku") String sku)
    • findByPKey

      @Transactional(readOnly=true) @GetMapping("/v1/products/{pKey}") public org.springframework.http.ResponseEntity<ProductVO> findByPKey(@PathVariable("pKey") String pKey)
    • findBySKUandUOM

      @Transactional(readOnly=true) @GetMapping(value="/v1/products", params={"sku","uom"}) public org.springframework.http.ResponseEntity<ProductVO> findBySKUandUOM(@RequestParam("sku") String sku, @RequestParam("uom") String uom)
    • findByLabelOrSKU

      @Transactional(readOnly=true) @GetMapping(value="/v1/products", params="bk") public org.springframework.http.ResponseEntity<ProductVO> findByLabelOrSKU(@RequestParam("bk") String bk)
    • create

      @Validated @PostMapping("/v1/products") public org.springframework.http.ResponseEntity<Void> create(@NotNull @Size(min=1) @RequestBody @NotNull @Size(min=1) List<ProductVO> products, javax.servlet.http.HttpServletRequest req)
    • update

      @Transactional @Validated(UpdateProduct.class) @PutMapping("/v1/products") public org.springframework.http.ResponseEntity<ProductVO> update(@Valid @NotNull @RequestBody @Valid @NotNull ProductVO product)