Class BundleService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.bundler.rs1.bundle.BundleService
@RestController
@RequestMapping("work-orders/bundler/r1/bundles")
@Resource(logging=true)
public class BundleService
extends PrivateService
Service to manage bundles.
- Since:
- 21.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOBundle> get(Long bundleId, Collection<String> fields) Retrieves the required bundle by calling theBundleLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOBundle>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOBundleFilter filter) Returns the collection of all the stored bundles by calling theBundleHeaderSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long bundleId, @Valid DTOBundleUpdate dto) Update a bundle by calling theSchedulableBundleUpdateEvent
-
Constructor Details
-
BundleService
public BundleService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOBundle>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOBundleFilter filter) throws DAValidateException, DAException Returns the collection of all the stored bundles by calling theBundleHeaderSearchEvent.- Parameters:
page- the page that will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOBundleFilter- Returns:
- the collection of
DTOBundles - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{bundleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOBundle> get(@PathVariable("bundleId") Long bundleId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required bundle by calling theBundleLoadEvent.- Parameters:
bundleId- the ID of the bundle to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the bundle
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
patch
@PatchMapping(value="{bundleId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("bundleId") Long bundleId, @Valid @RequestBody @Valid DTOBundleUpdate dto) throws DAValidateException, DAException Update a bundle by calling theSchedulableBundleUpdateEvent- Parameters:
bundleId- the bundle iddto- theDTOBundleUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-