Class SkillDivisionService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.skills.rs1.skilldivision.SkillDivisionService
@RestController
@RequestMapping("workforce/skills/r1/divisions")
@Resource(logging=true)
public class SkillDivisionService
extends PrivateService
Service to manage skill divisions.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOSkillDivision> get(Long id, String language, Collection<String> fields) Retrieves the required skill division by calling theSkillDivisionLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOSkillDivision>> getCollection(@Valid Page page, String order, String language, Collection<String> fields, @Valid DTOSkillDivisionFilter filter) Returns the collection of all the stored skill divisions by calling theSkillDivisionSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOSkillDivisionUpdate input) Updates the required skill division by calling theSkillDivisionUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOSkillDivisionInsert input) Creates a new skill division by calling theSkillDivisionInsertEvent.
-
Constructor Details
-
SkillDivisionService
public SkillDivisionService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOSkillDivision>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,value="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields, @Valid @Valid DTOSkillDivisionFilter filter) throws DAValidateException, DAException Returns the collection of all the stored skill divisions by calling theSkillDivisionSearchEvent.- Parameters:
page- the page that will contain the paginated resultorder- the ordering fieldlanguage- the user languagefields- the collection of fields that will be contained in the responsefilter- theDTOSkillDivisionFilter- Returns:
- the collection of
DTOSkillDivisions - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{divisionId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOSkillDivision> get(@PathVariable("divisionId") 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 skill division by calling theSkillDivisionLoadEvent.- Parameters:
id- the ID of the skill division to be loadedlanguage- the user languagefields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded skill division
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOSkillDivisionInsert input) throws DAValidateException, DAException Creates a new skill division by calling theSkillDivisionInsertEvent.- Parameters:
input- theDTOSkillDivisionInsert- Returns:
- the response containing the ID of the newly created skill division
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
patch
@PatchMapping(value="{divisionId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("divisionId") Long id, @Valid @RequestBody @Valid DTOSkillDivisionUpdate input) throws DAValidateException, DAException Updates the required skill division by calling theSkillDivisionUpdateEvent.- Parameters:
id- the ID of the skill division to be updatedinput- theDTOSkillDivisionUpdate- Returns:
- the standard response
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-