Class ForecastResourceService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.forecastcapacity.rs1.forecast.resource.forecastresource.ForecastResourceService
@RestController
@RequestMapping("planning/forecast-capacity/r1/resource-forecasts/{resourceForecastId:[0-9]+}/resources")
@Resource(logging=true)
public class ForecastResourceService
extends PrivateService
Services to manage a
BOForecastResource object. - Since:
- 15.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Deletes the requiredBOForecastResourceobject from a givenBOResourceForecastHeaderobject by calling theForecastResourceDeleteEventorg.springframework.http.ResponseEntity<DTOForecastResource> get(Long forecastHeaderId, Long id, Collection<String> fields) Retrieves the requiredBOForecastResourceobject by calling theForecastResourceLoadEventeventorg.springframework.http.ResponseEntity<PageResponse<DTOForecastResource>> getCollection(Long forecastHeaderId, @Valid Page page, String order, Collection<String> fields, @Valid DTOForecastResourceSearchFilter filter) Returns the collection of all the storedBOForecastResourceobjects by calling theForecastResourceSearchEventeventorg.springframework.http.ResponseEntity<Void> importFromOc(Long forecastHeaderId, @Valid DTOForecastResourceImportFromCO dto) Import a real resource as aBOForecastResourceobject by calling theForecastResourceImportFromOCEventeventorg.springframework.http.ResponseEntity<Void> patch(Long forecastHeaderId, Long id, @Valid DTOForecastResourceUpdate dto) Updates aBOForecastResourceobject by calling theForecastResourceUpdateEventeventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long forecastHeaderId, @Valid DTOForecastResourceInsert dto) Creates a newBOForecastResourceobject by calling theForecastResourceInsertEventevent
-
Constructor Details
-
ForecastResourceService
public ForecastResourceService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOForecastResource>> getCollection(@PathVariable("resourceForecastId") Long forecastHeaderId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,value="_order") String order, @RequestParam(required=false,value="_fields") Collection<String> fields, @Valid @Valid DTOForecastResourceSearchFilter filter) throws DAValidateException, DAException Returns the collection of all the storedBOForecastResourceobjects by calling theForecastResourceSearchEventevent- Parameters:
forecastHeaderId- theBOForecastResourceobject's forecastHeader fieldpage- the pageorder- the orderfields- the collection of fields that will be contained in the responsefilter- theDTOForecastResourceSearchFilterobject- Returns:
- the collection of
DTOForecastResources - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{resourceId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOForecastResource> get(@PathVariable("resourceForecastId") Long forecastHeaderId, @PathVariable("resourceId") Long id, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredBOForecastResourceobject by calling theForecastResourceLoadEventevent- Parameters:
forecastHeaderId- theBOForecastResourceobject's forecastHeader fieldid- theBOForecastResourceobject's id fieldfields- the collection of fields the response will contain- Returns:
- the response containing the loaded
DTOForecastResource - 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(@PathVariable("resourceForecastId") Long forecastHeaderId, @Valid @RequestBody @Valid DTOForecastResourceInsert dto) throws DAValidateException, DAException Creates a newBOForecastResourceobject by calling theForecastResourceInsertEventevent- Parameters:
forecastHeaderId- theBOForecastResource's forecastHeader fielddto- theDTOForecastResourceInsertobject- Returns:
- the response containing the ID of the newly created
BOForecastResource - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{resourceId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("resourceForecastId") Long forecastHeaderId, @PathVariable("resourceId") Long id, @Valid @RequestBody @Valid DTOForecastResourceUpdate dto) throws DAValidateException, DAException Updates aBOForecastResourceobject by calling theForecastResourceUpdateEventevent- Parameters:
forecastHeaderId- theBOForecastResourceobject's forecastHeader fieldid- id of theBOForecastResourceobject to updatedto- theDTOForecastResourceUpdateobject- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
importFromOc
@PostMapping(value="import-from-operation-centers", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> importFromOc(@PathVariable("resourceForecastId") Long forecastHeaderId, @Valid @RequestBody @Valid DTOForecastResourceImportFromCO dto) throws DAValidateException, DAException Import a real resource as aBOForecastResourceobject by calling theForecastResourceImportFromOCEventevent- Parameters:
forecastHeaderId- theBOForecastResourceobject's forecastHeader fielddto- theDTOForecastResourceImportFromCOobject- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
delete
@DeleteMapping(value="{resourceId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("resourceForecastId") Long forecastHeaderId, @PathVariable("resourceId") Long id) throws DAValidateException, DAException Deletes the requiredBOForecastResourceobject from a givenBOResourceForecastHeaderobject by calling theForecastResourceDeleteEvent- Parameters:
forecastHeaderId- theBOForecastResource's forecastHeader fieldid- the id of theBOForecastResourceobject to be deleted- Returns:
- the DTO response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-