Class TeamTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.teams.rs1.teamtypes.TeamTypeService
@RestController
@RequestMapping("workforce/teams/r1/team-types")
@Resource(logging=true)
public class TeamTypeService
extends PrivateService
Service to manage team type
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOTeamType> get(Long id, Collection<String> fields) Retrieves the requiredDTOTeamTypeby calling theTeamTypeLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOTeamType>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOTeamTypeFilter filter) Returns the collection of all the stored team typ[e by calling theTeamTypeSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOTeamTypeUpdate dto) Update a team type by calling theTeamTypeUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOTeamTypeInsert dto) Create a new team type by calling theTeamTypeInsertEvent
-
Constructor Details
-
TeamTypeService
public TeamTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOTeamType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOTeamTypeFilter filter) throws DAValidateException, DAException Returns the collection of all the stored team typ[e by calling theTeamTypeSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOTeamTypeFilter- Returns:
- the collection of
DTOTeamType - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{teamTypeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOTeamType> get(@PathVariable("teamTypeId") Long id, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOTeamTypeby calling theTeamTypeLoadEvent.- Parameters:
id- the team type idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded team type
- 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 DTOTeamTypeInsert dto) throws DAValidateException, DAException Create a new team type by calling theTeamTypeInsertEvent- Parameters:
dto- theDTOTeamTypeInsert- Returns:
- the standard response containing the new team type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{teamTypeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("teamTypeId") Long id, @Valid @RequestBody @Valid DTOTeamTypeUpdate dto) throws DAValidateException, DAException Update a team type by calling theTeamTypeUpdateEvent- Parameters:
id- the team type iddto- theDTOTeamTypeUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-