Class GoodsGroupService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.materials.rs1.goodsgroup.GoodsGroupService
@RestController
@RequestMapping("inventory/materials/r1/goods-groups")
@Resource(logging=true)
public class GoodsGroupService
extends PrivateService
Services to manage goods groups.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOGoodsGroup> get(Long id, Collection<String> fields, String language) Retrieves the requiredDTOGoodsGroupby calling from theGoodsGroupLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOGoodsGroup>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid DTOGoodsGroupSearchFilter filter) Returns the collection of all the stored goods groups by calling theGoodsGroupSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOGoodsGroupUpdate dto) Updates the required material by calling theGoodsGroupUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new goods group by calling theGoodsGroupInsertEvent.
-
Constructor Details
-
GoodsGroupService
public GoodsGroupService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOGoodsGroup>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @Valid @Valid DTOGoodsGroupSearchFilter filter) throws DAValidateException, DAException Returns the collection of all the stored goods groups by calling theGoodsGroupSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOGoodsGroupSearchFilter- Returns:
- the response containing the collection of
DTOGoodsGroup - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{goodsGroupId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOGoodsGroup> get(@PathVariable("goodsGroupId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_language",defaultValue="user") String language) throws DAValidateException, DAException Retrieves the requiredDTOGoodsGroupby calling from theGoodsGroupLoadEvent.- Parameters:
id- the goods group id- Returns:
- the response containing the loaded
DTOGoodsGroup - 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 DTOGoodsGroupInsert dto) throws DAValidateException, DAException Creates a new goods group by calling theGoodsGroupInsertEvent.- Parameters:
dto- theDTOGoodsGroupInsertcontaining the needed info- Returns:
- the response containing the id of the inserted goods group
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{goodsGroupId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("goodsGroupId") Long id, @Valid @RequestBody @Valid DTOGoodsGroupUpdate dto) throws DAValidateException, DAException Updates the required material by calling theGoodsGroupUpdateEvent.- Parameters:
id- the goods group iddto- theDTOGoodsGroupUpdatecontaining the needed info- Returns:
- the update response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-