Class BundlingRuleService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.bundler.rs1.bundlingrule.BundlingRuleService
@RestController
@RequestMapping("work-orders/bundler/r1/bundling-rules")
@Resource(logging=true)
public class BundlingRuleService
extends PrivateService
Service to manage Bundling Rule.
- Since:
- 20.1
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOBundlingRule> get(Long ruleId, Collection<String> fields) Retrieves the required bundling rule by calling theBundlingRuleHeaderLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOBundlingRule>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOBundlingRuleFilter filter) Returns the collection of all the stored bundling rules by calling theBundlingRuleHeaderSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long ruleId, @Valid DTOBundlingRuleUpdate dto) Update a bundling rule by calling theBundlingRuleHeaderUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new bundling rule by calling theBundlingRuleHeaderInsertEvent
-
Constructor Details
-
BundlingRuleService
public BundlingRuleService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOBundlingRule>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOBundlingRuleFilter filter) throws DAValidateException, DAException Returns the collection of all the stored bundling rules by calling theBundlingRuleHeaderSearchEvent.- Parameters:
page- the page that will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOBundlingRuleFilter- Returns:
- the collection of
DTOBundlingRules - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{ruleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOBundlingRule> get(@PathVariable("ruleId") Long ruleId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required bundling rule by calling theBundlingRuleHeaderLoadEvent.- Parameters:
ruleId- the ID of the bundling rule to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the bundling rule
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOBundlingRuleInsert dto) throws DAValidateException, DAException Create a new bundling rule by calling theBundlingRuleHeaderInsertEvent- Parameters:
dto- theDTOBundlingRuleInsert- Returns:
- the standard response containing the new bundling rule
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{ruleId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("ruleId") Long ruleId, @Valid @RequestBody @Valid DTOBundlingRuleUpdate dto) throws DAValidateException, DAException Update a bundling rule by calling theBundlingRuleHeaderUpdateEvent- Parameters:
ruleId- the bundling rule iddto- theDTOBundlingRuleUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-