Class ActivityService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.workorders.rs1.activity.ActivityService
@RestController
@RequestMapping("work-orders/r1/activities")
@Resource(logging=true)
public class ActivityService
extends PrivateService
Service to manage activities
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOActivity> get(Long activityId, String language, Collection<String> fields) Retrieves the requiredDTOActivityby calling theActivityLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOActivity>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOActivityFilter filter) Returns the collection of all the storedDTOActivityby calling theActivitySearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long activityId, @Valid DTOActivityUpdate newValues) Update an activity by calling theActivityUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOActivityInsert dto) Create a new activity by calling theActivityInsertEvent
-
Constructor Details
-
ActivityService
public ActivityService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOActivity>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields, @RequestParam(required=false,value="_order") String order, @Valid @Valid DTOActivityFilter filter) throws DAValidateException, DAException Returns the collection of all the storedDTOActivityby calling theActivitySearchEvent.- Parameters:
page- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOActivityFilter- Returns:
- the collection of
DTOActivity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{activityId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOActivity> get(@PathVariable("activityId") Long activityId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOActivityby calling theActivityLoadEvent.- Parameters:
activityId- the activity idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the loaded work order operation
- 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 DTOActivityInsert dto) throws DAValidateException, DAException Create a new activity by calling theActivityInsertEvent- Parameters:
dto- theDTOActivityInsert- Returns:
- the standard response containing the new work order operation id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{activityId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("activityId") Long activityId, @RequestBody @Valid @Valid DTOActivityUpdate newValues) throws DAValidateException, DAException Update an activity by calling theActivityUpdateEvent- Parameters:
activityId- the activity idnewValues- theDTOActivityUpdatevalues to be updated- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-