|
package app.navigation.matchday;
|
|
|
|
import app.data.service.MatchService;
|
|
import app.data.service.MatchdayService;
|
|
import app.data.service.SeasonService;
|
|
import app.navigation.AbstractNavigationHeader;
|
|
import app.navigation.NavigationService;
|
|
import app.navigation.matchday.components.MatchdayNavigationHeader;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@Service
|
|
public class MatchdayNavigationService implements NavigationService<MatchdayNavigation> {
|
|
|
|
private final SeasonService seasonService;
|
|
private final MatchdayService matchdayService;
|
|
|
|
public MatchdayNavigationService(@Autowired SeasonService seasonService,
|
|
@Autowired MatchdayService matchdayService) {
|
|
this.seasonService = seasonService;
|
|
this.matchdayService = matchdayService;
|
|
}
|
|
|
|
@Override
|
|
public MatchdayNavigation getNewNavigation() {
|
|
return new MatchdayNavigation(seasonService, matchdayService);
|
|
}
|
|
|
|
@Override
|
|
public AbstractNavigationHeader<MatchdayNavigation> getNewNavigationHeader(MatchdayNavigation navigation) {
|
|
return new MatchdayNavigationHeader(navigation);
|
|
}
|
|
}
|