Class ProjectsActivitiesService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.projects.rs1.activity.ProjectsActivitiesService
@RestController
@Resource(logging=true)
@RequestMapping("work-orders/projects/r1/projects/{projectId:[0-9]+}/activities")
public class ProjectsActivitiesService
extends PrivateService
Services to manage project activity
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> cancellation(Long projectId, Long activityId) Evolves in Cancel State the required project activity by calling theCancelProjectActivitiesEvent.org.springframework.http.ResponseEntity<Void> Evolves in Close State the required project activity by calling theCloseProjectActivitiesEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> createBelow(Long projectId, Long activityId, @Valid DTOProjectActivityInsert input) Creates and add a new project activity below the one indicatedorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> createNext(Long projectId, Long activityId, @Valid DTOProjectActivityInsert input) Creates and add a new project activity next the one indicatedorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> createPrevious(Long projectId, Long activityId, DTOProjectActivityInsert input) Creates and add a new project activity before the one indicatedorg.springframework.http.ResponseEntity<DTOProjectActivity> Retrieves the required project activity by calling theProjectActivityLoadEvent.protected BOProjectActivityorg.springframework.http.ResponseEntity<PageResponse<DTOProjectActivity>> getCollection(Long projectId, @Valid Page page, String language, Collection<String> fields, String order, @Valid DTOProjectActivityFilter filter) Returns the collection of all the project activity by calling theProjectActivitySearchEvent.protected BOProjectActivityprotected BOProjectActivityDebriefingorg.springframework.http.ResponseEntity<Void> patch(Long projectId, Long projectActivityId, @Valid DTOProjectActivityUpdate input) Updates the required project activity by calling theModifyProjectActivityEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long projectId, @Valid DTOProjectActivityInsert input) Create a new project activity by calling theAddProjectActivityEventorg.springframework.http.ResponseEntity<Void> Evolves in Active State the required project activity by calling theReleaseProjectActivitiesEvent.org.springframework.http.ResponseEntity<Void> technicalClose(Long projectId, Long activityId, @Valid DTOProjectActivityDebriefing dto) Evolves in Technical Close State and save debriefing data the required project activity by calling theProjectActivityGenericDebriefingCreateEvent.
-
Constructor Details
-
ProjectsActivitiesService
public ProjectsActivitiesService()
-
-
Method Details
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("projectId") Long projectId, @Valid @RequestBody @Valid DTOProjectActivityInsert input) throws DAException, DAValidateException Create a new project activity by calling theAddProjectActivityEvent- Parameters:
projectId- the project idinput- theDTOProjectActivityInsert- Returns:
- the
ResponseEntitycontaining the created project activity id - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{id:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("projectId") Long projectId, @PathVariable("id") Long projectActivityId, @Valid @RequestBody @Valid DTOProjectActivityUpdate input) throws DAValidateException, DAException Updates the required project activity by calling theModifyProjectActivityEvent.- Parameters:
projectId- the project idprojectActivityId- the project activity idinput- theDTOProjectActivityUpdate- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
cancellation
@PostMapping(path="{activityId:[0-9]+}/cancellations", produces="application/json") public org.springframework.http.ResponseEntity<Void> cancellation(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId) throws DAException, DAValidateException Evolves in Cancel State the required project activity by calling theCancelProjectActivitiesEvent.- Parameters:
projectId- the project idactivityId- the project activity id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
closure
@PostMapping(path="{activityId:[0-9]+}/closures", produces="application/json") public org.springframework.http.ResponseEntity<Void> closure(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId) throws DAException, DAValidateException Evolves in Close State the required project activity by calling theCloseProjectActivitiesEvent.- Parameters:
projectId- the project idactivityId- the project activity id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
release
@PostMapping(path="{activityId:[0-9]+}/releases", produces="application/json") public org.springframework.http.ResponseEntity<Void> release(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId) throws DAException, DAValidateException Evolves in Active State the required project activity by calling theReleaseProjectActivitiesEvent.- Parameters:
projectId- the project idactivityId- the project activity id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
technicalClose
@PostMapping(path="{activityId:[0-9]+}/technical-closures", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> technicalClose(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId, @Valid @RequestBody @Valid DTOProjectActivityDebriefing dto) throws DAException, DAValidateException Evolves in Technical Close State and save debriefing data the required project activity by calling theProjectActivityGenericDebriefingCreateEvent.- Parameters:
projectId- the project idactivityId- the project activity id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{activityId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOProjectActivity> get(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long projectActivityId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required project activity by calling theProjectActivityLoadEvent.- Parameters:
projectId- project idprojectActivityId- project activity idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the
ResponseEntitycontaining the loadedDTOProjectActivity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOProjectActivity>> getCollection(@PathVariable("projectId") Long projectId, @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 DTOProjectActivityFilter filter) throws DAValidateException, DAException Returns the collection of all the project activity by calling theProjectActivitySearchEvent.- Parameters:
projectId- project idpage- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOProjectActivityFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOProjectActivity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
createNext
@PostMapping(path="{activityId:[0-9]+}/next", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> createNext(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId, @Valid @RequestBody @Valid DTOProjectActivityInsert input) throws DAException, DAValidateException Creates and add a new project activity next the one indicated- Parameters:
projectId- the project idactivityId- the project activity idinput- theDTOProjectActivityInsert- Returns:
- the
ResponseEntitycontaining the created project activity id - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
createPrevious
@PostMapping(path="{activityId:[0-9]+}/previous", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> createPrevious(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId, @RequestBody DTOProjectActivityInsert input) throws DAException, DAValidateException Creates and add a new project activity before the one indicated- Parameters:
projectId- the project idactivityId- the project activity idinput- theDTOProjectActivityInsert- Returns:
- the
ResponseEntitycontaining the created project activity id - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
createBelow
@PostMapping(path="{activityId:[0-9]+}/below", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> createBelow(@PathVariable("projectId") Long projectId, @PathVariable("activityId") Long activityId, @Valid @RequestBody @Valid DTOProjectActivityInsert input) throws DAException, DAValidateException Creates and add a new project activity below the one indicated- Parameters:
projectId- the project idactivityId- the project activity idinput- theDTOProjectActivityInsert- Returns:
- the
ResponseEntitycontaining the created project activity id - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getCommonDebriefingData
-
getCommonActivityData
-
getActivityDataToInsert
-