Class ProjectsHeaderService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.projects.rs1.header.ProjectsHeaderService
@RestController
@RequestMapping("work-orders/projects/r1/projects")
@Resource(logging=true)
public class ProjectsHeaderService
extends PrivateService
Services to manage project header
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> cancellation(Long id) Evolves in Cancelled State the required project header by calling theProjectHeaderCancelEvent.org.springframework.http.ResponseEntity<Void> Evolves in Closed State the required project header by calling theProjectHeaderCloseEvent.org.springframework.http.ResponseEntity<DTOProjectHeader> get(Long id, String language, Collection<String> fields) Retrieves the required project header by calling theProjectHeaderLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOProjectHeader>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOProjectHeaderFilter filter) Returns the collection of all the project header by calling theProjectHeaderSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOProjectHeaderUpdate dto) Updates the required project header by calling theProjectHeaderUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOProjectHeaderInsert input) Create a new project header by calling theProjectHeaderCreateEventorg.springframework.http.ResponseEntity<Void> Evolves in Active State the required project header by calling theProjectHeaderReleaseEvent.
-
Constructor Details
-
ProjectsHeaderService
public ProjectsHeaderService()
-
-
Method Details
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOProjectHeaderInsert input) throws DAException, DAValidateException Create a new project header by calling theProjectHeaderCreateEvent- Parameters:
input- theDTOProjectHeaderInsert- Returns:
- the
ResponseEntitycontaining the created project 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("id") Long id, @Valid @RequestBody @Valid DTOProjectHeaderUpdate dto) throws DAValidateException, DAException Updates the required project header by calling theProjectHeaderUpdateEvent.- Parameters:
id- the project header iddto- theDTOProjectHeaderUpdate- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
cancellation
@PostMapping(value="{id:[0-9]+}/cancellations", produces="application/json") public org.springframework.http.ResponseEntity<Void> cancellation(@PathVariable("id") Long id) throws DAException, DAValidateException Evolves in Cancelled State the required project header by calling theProjectHeaderCancelEvent.- Parameters:
id- the project header id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
closure
@PostMapping(value="{id:[0-9]+}/closures", produces="application/json") public org.springframework.http.ResponseEntity<Void> closure(@PathVariable("id") Long id) throws DAException, DAValidateException Evolves in Closed State the required project header by calling theProjectHeaderCloseEvent.- Parameters:
id- the project header id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
release
@PostMapping(value="{id:[0-9]+}/releases", produces="application/json") public org.springframework.http.ResponseEntity<Void> release(@PathVariable("id") Long id) throws DAException, DAValidateException Evolves in Active State the required project header by calling theProjectHeaderReleaseEvent.- Parameters:
id- the project header id- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{projectId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOProjectHeader> get(@PathVariable("projectId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required project header by calling theProjectHeaderLoadEvent.- Parameters:
id- project idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the
ResponseEntitycontaining the loadedDTOProjectHeader - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOProjectHeader>> 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 DTOProjectHeaderFilter filter) throws DAValidateException, DAException Returns the collection of all the project header by calling theProjectHeaderSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOProjectHeaderFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOProjectHeader - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-