Class SitesController

java.lang.Object
net.andresbustamante.yafoot.commons.web.controllers.AbstractController
net.andresbustamante.yafoot.core.web.controllers.SitesController
All Implemented Interfaces:
SitesApi

@RestController public class SitesController extends net.andresbustamante.yafoot.commons.web.controllers.AbstractController implements SitesApi
REST controller for sites related operations.
Author:
andresbustamante
  • Field Summary

    Fields inherited from class net.andresbustamante.yafoot.commons.web.controllers.AbstractController

    DATABASE_BASIC_ERROR, UNAUTHORISED_USER_ERROR

    Fields inherited from interface net.andresbustamante.yafoot.core.web.controllers.SitesApi

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
    SitesController(net.andresbustamante.yafoot.core.services.SiteSearchService siteSearchService, net.andresbustamante.yafoot.core.services.SiteManagementService siteManagementService, SiteMapper siteMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<Void>
     
    org.springframework.http.ResponseEntity<List<Site>>
     

    Methods inherited from class net.andresbustamante.yafoot.commons.web.controllers.AbstractController

    getLocationURI, getObjectMapper, getRequest, getUserContext, handleConstraintViolationException, translate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.andresbustamante.yafoot.core.web.controllers.SitesApi

    getObjectMapper, getRequest
  • Constructor Details

    • SitesController

      public SitesController(net.andresbustamante.yafoot.core.services.SiteSearchService siteSearchService, net.andresbustamante.yafoot.core.services.SiteManagementService siteManagementService, SiteMapper siteMapper)
  • Method Details

    • loadSites

      public org.springframework.http.ResponseEntity<List<Site>> loadSites()
      Specified by:
      loadSites in interface SitesApi
    • addNewSite

      @CrossOrigin(exposedHeaders="Location") public org.springframework.http.ResponseEntity<Void> addNewSite(SiteForm site)
      Specified by:
      addNewSite in interface SitesApi