Class MaterialItemService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.materials.rs1.item.MaterialItemService
@RestController
@RequestMapping("inventory/materials/r1/items")
@Resource(logging=true)
public class MaterialItemService
extends PrivateService
Services to manage material item types.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMaterialItem> get(Long id, Collection<String> fields, String language) Retrieves the requiredDTOMaterialItemby calling from theMaterialItemLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOMaterialItem>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid DTOMaterialItemSearchFilter filter) Returns the collection of all the stored material item types by calling theMaterialItemSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOMaterialItemUpdate dto) Updates the required material by calling theMaterialItemUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new item type by calling theMaterialItemInsertEvent.
-
Constructor Details
-
MaterialItemService
public MaterialItemService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMaterialItem>> 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 DTOMaterialItemSearchFilter filter) throws DAValidateException, DAException Returns the collection of all the stored material item types by calling theMaterialItemSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOMaterialItemSearchFilter- Returns:
- the response containing the collection of
DTOMaterialItem - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{itemId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMaterialItem> get(@PathVariable("itemId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_language",defaultValue="user") String language) throws DAValidateException, DAException Retrieves the requiredDTOMaterialItemby calling from theMaterialItemLoadEvent.- Parameters:
id- the item type id- Returns:
- the response containing the loaded
DTOMaterialItem - 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 DTOMaterialItemInsert dto) throws DAValidateException, DAException Creates a new item type by calling theMaterialItemInsertEvent.- Parameters:
dto- theDTOMaterialItemInsertcontaining the needed info- Returns:
- the response containing the id of the inserted item type
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{itemId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("itemId") Long id, @Valid @RequestBody @Valid DTOMaterialItemUpdate dto) throws DAValidateException, DAException Updates the required material by calling theMaterialItemUpdateEvent.- Parameters:
id- the item type iddto- theDTOMaterialItemUpdatecontaining the needed info- Returns:
- the update response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-