Class MatchesController
java.lang.Object
net.andresbustamante.yafoot.commons.web.controllers.AbstractController
net.andresbustamante.yafoot.core.web.controllers.MatchesController
- All Implemented Interfaces:
MatchesApi
@RestController
public class MatchesController
extends net.andresbustamante.yafoot.commons.web.controllers.AbstractController
implements MatchesApi
REST service for managing and searching matches.
- Author:
- andresbustamante
-
Field Summary
Fields inherited from class net.andresbustamante.yafoot.commons.web.controllers.AbstractController
DATABASE_BASIC_ERROR, UNAUTHORISED_USER_ERRORFields inherited from interface net.andresbustamante.yafoot.core.web.controllers.MatchesApi
log -
Constructor Summary
ConstructorsConstructorDescriptionMatchesController(net.andresbustamante.yafoot.core.services.MatchSearchService matchSearchService, net.andresbustamante.yafoot.core.services.PlayerSearchService playerSearchService, net.andresbustamante.yafoot.core.services.CarpoolingService carpoolingService, net.andresbustamante.yafoot.core.services.MatchManagementService matchManagementService, MatchMapper matchMapper, RegistrationMapper registrationMapper, CarMapper carMapper) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void>cancelMatch(String code) org.springframework.http.ResponseEntity<Void>createMatch(MatchForm match) findCarsForMatch(String code) findMatches(LocalDate startDate, LocalDate endDate, SportCode sport, MatchStatus status) org.springframework.http.ResponseEntity<Match>loadMatchByCode(String code) org.springframework.http.ResponseEntity<List<Registration>>loadMatchRegistrations(String code) org.springframework.http.ResponseEntity<Void>registerPlayerToMatch(String code, RegistrationForm registration) org.springframework.http.ResponseEntity<Void>unregisterPlayerFromMatch(String code, Integer pid) org.springframework.http.ResponseEntity<Void>updateCarForRegistration(String code, Integer pid, CarConfirmation carConfirmation) Methods inherited from class net.andresbustamante.yafoot.commons.web.controllers.AbstractController
getLocationURI, getObjectMapper, getRequest, getUserContext, handleConstraintViolationException, translateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andresbustamante.yafoot.core.web.controllers.MatchesApi
getObjectMapper, getRequest
-
Constructor Details
-
MatchesController
public MatchesController(net.andresbustamante.yafoot.core.services.MatchSearchService matchSearchService, net.andresbustamante.yafoot.core.services.PlayerSearchService playerSearchService, net.andresbustamante.yafoot.core.services.CarpoolingService carpoolingService, net.andresbustamante.yafoot.core.services.MatchManagementService matchManagementService, MatchMapper matchMapper, RegistrationMapper registrationMapper, CarMapper carMapper)
-
-
Method Details
-
loadMatchByCode
- Specified by:
loadMatchByCodein interfaceMatchesApi
-
loadMatchRegistrations
public org.springframework.http.ResponseEntity<List<Registration>> loadMatchRegistrations(String code) - Specified by:
loadMatchRegistrationsin interfaceMatchesApi
-
findMatches
public org.springframework.http.ResponseEntity<List<Match>> findMatches(@DateTimeFormat(iso=DATE) LocalDate startDate, @DateTimeFormat(iso=DATE) LocalDate endDate, SportCode sport, MatchStatus status) - Specified by:
findMatchesin interfaceMatchesApi
-
cancelMatch
- Specified by:
cancelMatchin interfaceMatchesApi
-
createMatch
@CrossOrigin(exposedHeaders="Location") public org.springframework.http.ResponseEntity<Void> createMatch(MatchForm match) - Specified by:
createMatchin interfaceMatchesApi
-
findCarsForMatch
- Specified by:
findCarsForMatchin interfaceMatchesApi
-
registerPlayerToMatch
@CrossOrigin(exposedHeaders="Location") public org.springframework.http.ResponseEntity<Void> registerPlayerToMatch(String code, RegistrationForm registration) - Specified by:
registerPlayerToMatchin interfaceMatchesApi
-
updateCarForRegistration
public org.springframework.http.ResponseEntity<Void> updateCarForRegistration(String code, Integer pid, CarConfirmation carConfirmation) - Specified by:
updateCarForRegistrationin interfaceMatchesApi
-
unregisterPlayerFromMatch
public org.springframework.http.ResponseEntity<Void> unregisterPlayerFromMatch(String code, Integer pid) - Specified by:
unregisterPlayerFromMatchin interfaceMatchesApi
-