Class WorkCycleService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.workorders.rs1.workcycle.WorkCycleService
@RestController
@RequestMapping("work-orders/r1/work-cycles")
@Resource(logging=true)
public class WorkCycleService
extends PrivateService
Service for manage work cycle
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOWorkCycle> Retrieves the requiredDTOWorkCycleby calling theWorkCycleLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkCycle>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTOWorkCycleFilter filter) Returns the collection of all the stored work cycles by calling theWorkCycleSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long workCycleId, @Valid DTOWorkCycleUpdate dto) Update a work cycle by calling theWorkCycleUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOWorkCycleInsert dto) Create a new work cycle by calling theWorkCycleInsertEvent
-
Constructor Details
-
WorkCycleService
public WorkCycleService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkCycle>> 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 @NotNull @Valid @NotNull DTOWorkCycleFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work cycles by calling theWorkCycleSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldlanguage- the language for multilanguage fieldsfilter- theDTOWorkCycleFilter- Returns:
- the collection of
DTOWorkCycle - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{workCycleId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkCycle> get(@PathVariable("workCycleId") Long workCycleId, @RequestParam(required=false,name="_language",defaultValue="user") @Valid @Valid String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOWorkCycleby calling theWorkCycleLoadEvent.- Parameters:
workCycleId- the work cycle idlanguage- the language for multilanguage fieldsfields- the collection of fields the response will contain- Returns:
- the response containing the loaded work cycle
- 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 DTOWorkCycleInsert dto) throws DAValidateException, DAException Create a new work cycle by calling theWorkCycleInsertEvent- Parameters:
dto- theDTOWorkCycleInsert- Returns:
- the standard response containing the new work cycle id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{workCycleId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("workCycleId") Long workCycleId, @Valid @RequestBody @Valid DTOWorkCycleUpdate dto) throws DAValidateException, DAException Update a work cycle by calling theWorkCycleUpdateEvent- Parameters:
workCycleId- the work cycle iddto- theDTOWorkCycleUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-