Class TeamService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.teams.rs1.team.TeamService
@RestController
@RequestMapping("workforce/teams/r1/teams")
@Resource(logging=true)
public class TeamService
extends PrivateService
Service to manage teams.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOTeam> get(Long teamId, Collection<String> fields) Retrieves the requiredDTOTeamby calling from theTeamLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOTeam>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOTeamFilter filter) Returns the collection of all the stored teams by calling theTeamSearchEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOTeamInsert dto) Creates a new team by calling from theTeamInsertEvent.
-
Constructor Details
-
TeamService
public TeamService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOTeam>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOTeamFilter filter) throws DAValidateException, DAException Returns the collection of all the stored teams by calling theTeamSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOTeamFilter- Returns:
- the collection of
DTOTeam - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{teamId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOTeam> get(@PathVariable("teamId") Long teamId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOTeamby calling from theTeamLoadEvent.- Parameters:
teamId- the team idfields- the collection of fields the response will contain- Returns:
- the loaded
DTOTeam - 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 DTOTeamInsert dto) throws DAValidateException, DAException Creates a new team by calling from theTeamInsertEvent.- Parameters:
dto- theDTOTeamInsertcontaining the team data to insert- Returns:
- the inserted team id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-