Class WarehouseMaterialService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.inventory.rs2.warehouse.warehousematerial.WarehouseMaterialService
@RestController
@RequestMapping("inventory/r2/warehouses/materials")
@Resource(logging=true)
public class WarehouseMaterialService
extends PrivateService
Services to manage warehouse materials.
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Activates the warehouse material by calling theWarehouseMaterialActivateEvent.org.springframework.http.ResponseEntity<Void> Deactivates the warehouse material by calling theWarehouseMaterialDeactivateEvent.org.springframework.http.ResponseEntity<DTOWarehouseMaterial> Retrieves the required warehouse material by calling theWarehouseMaterialLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWarehouseMaterial>> getCollection(@NotNull @Valid Page page, @Valid @NotNull DTOWarehouseMaterialSearchFilter filter) Retrieves all the stored warehouse material by calling theWarehouseMaterialSearchEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWarehouseMaterialAvailability>> Retrieves the required Warehouse Material Availability as requiredWarehouseMaterialAvailabilitySearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOWarehouseMaterialUpdate dto) Modifies the required warehouse material by calling theWarehouseMaterialUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new warehouse material by calling theWarehouseMaterialInsertEvent.
-
Constructor Details
-
WarehouseMaterialService
public WarehouseMaterialService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWarehouseMaterial>> getCollection(@RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOWarehouseMaterialSearchFilter filter) throws DAValidateException, DAException Retrieves all the stored warehouse material by calling theWarehouseMaterialSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOWarehouseMaterialSearchFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOWarehouseMaterial - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWarehouseMaterial> get(@PathVariable("id") Long id) throws DAValidateException, DAException Retrieves the required warehouse material by calling theWarehouseMaterialLoadEvent.- Parameters:
id- warehouse material id- Returns:
- the
ResponseEntitycontaining the loadedDTOWarehouseMaterial - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOWarehouseMaterialInsert dto) throws DAValidateException, DAException Creates a new warehouse material by calling theWarehouseMaterialInsertEvent.- Parameters:
dto- theDTOWarehouseMaterialInsert- Returns:
- the
ResponseEntitycontaining the id of the inserted warehouse material - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{id:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("id") Long id, @Valid @RequestBody @Valid DTOWarehouseMaterialUpdate dto) throws DAValidateException, DAException Modifies the required warehouse material by calling theWarehouseMaterialUpdateEvent.- Parameters:
id- the warehouse material iddto- theDTOWarehouseMaterialUpdate- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
activateWarehouseMaterial
@PostMapping(value="{id:[0-9]+}/actions/activate", produces="application/json") public org.springframework.http.ResponseEntity<Void> activateWarehouseMaterial(@PathVariable("id") Long id) throws DAValidateException, DAException Activates the warehouse material by calling theWarehouseMaterialActivateEvent.- Parameters:
id- the warehouse material id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deactivateWarehouseMaterial
@PostMapping(value="{id:[0-9]+}/actions/deactivate", produces="application/json") public org.springframework.http.ResponseEntity<Void> deactivateWarehouseMaterial(@PathVariable("id") Long id) throws DAValidateException, DAException Deactivates the warehouse material by calling theWarehouseMaterialDeactivateEvent.- Parameters:
id- the warehouse material id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getMaterialAvailability
@GetMapping(value="actions/getMaterialAvailability", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWarehouseMaterialAvailability>> getMaterialAvailability(@RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOWarehouseMaterialAvailabilitySearchFilter filter) throws DAValidateException, DAException Retrieves the required Warehouse Material Availability as requiredWarehouseMaterialAvailabilitySearchEvent.- Parameters:
filter- theDTOWarehouseMaterialAvailabilitySearchFilter- Returns:
- the the
ResponseEntitycontaining the collection ofDTOWarehouseMaterialAvailability - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-