// Path: akanke-common/src/main/java/eu/kielczewski/akanke/common/service/document/DocumentService.java
// public interface DocumentService {
// 
//     Document get(String id);
// 
//     Map<String, Long> getTagCounts();
// 
//     Page<Document> getRecentByTag(String tag, int page, int numPerPage);
// 
//     Page<Document> getRecent(int page, int numPerPage);
// 
//     Optional<Document> getOneMostRecent();
// 
//     Map<String, Map<String, Long>> getCountInYearMonth();
// 
//     Page<Document> getRecentByYear(int year, int page, int numPerPage);
// 
//     Map<String, Long> getCountInMonthByYear(int year);
// 
//     Page<Document> getRecentByYearMonth(int year, int month, int page, int numPerPage);
// 
//     long getCountByYearMonth(int year, int month);
// 
//     List<Document> getMostPopular(int count);
// }


import eu.kielczewski.akanke.common.service.document.DocumentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.inject.Inject;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
package eu.kielczewski.akanke.web.controller;



@Controller
public class BlogController {

    private static final Logger LOGGER = LoggerFactory.getLogger(BlogController.class);
    private static final int NUM_PER_PAGE = 5;
    private final DocumentService documentService;

    @Autowired
// Path: akanke-common/src/main/java/eu/kielczewski/akanke/common/service/document/DocumentService.java
// public interface DocumentService {
// 
//     Document get(String id);
// 
//     Map<String, Long> getTagCounts();
// 
//     Page<Document> getRecentByTag(String tag, int page, int numPerPage);
// 
//     Page<Document> getRecent(int page, int numPerPage);
// 
//     Optional<Document> getOneMostRecent();
// 
//     Map<String, Map<String, Long>> getCountInYearMonth();
// 
//     Page<Document> getRecentByYear(int year, int page, int numPerPage);
// 
//     Map<String, Long> getCountInMonthByYear(int year);
// 
//     Page<Document> getRecentByYearMonth(int year, int month, int page, int numPerPage);
// 
//     long getCountByYearMonth(int year, int month);
// 
//     List<Document> getMostPopular(int count);
// }


// Path: akanke-web/src/main/java/eu/kielczewski/akanke/web/controller/BlogController.java
import eu.kielczewski.akanke.common.service.document.DocumentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.inject.Inject;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

package eu.kielczewski.akanke.web.controller;



@Controller
public class BlogController {

    private static final Logger LOGGER = LoggerFactory.getLogger(BlogController.class);
    private static final int NUM_PER_PAGE = 5;
    private final DocumentService documentService;

    @Autowired
    public BlogController(DocumentService documentService) {