.. java:import:: com.fasterxml.jackson.databind ObjectMapper .. java:import:: com.fasterxml.jackson.dataformat.csv CsvMapper .. java:import:: dk.magenta.datafordeler.core.database QueryManager .. java:import:: dk.magenta.datafordeler.core.database SessionManager .. java:import:: dk.magenta.datafordeler.core.user DafoUserDetails .. java:import:: dk.magenta.datafordeler.core.user DafoUserManager .. java:import:: dk.magenta.datafordeler.core.util LoggerHelper .. java:import:: dk.magenta.datafordeler.cpr CprPlugin .. java:import:: dk.magenta.datafordeler.cpr.data.person PersonEntity .. java:import:: dk.magenta.datafordeler.cpr.data.person PersonRecordQuery .. java:import:: dk.magenta.datafordeler.geo GeoLookupService .. java:import:: dk.magenta.datafordeler.statistik.utils Filter .. java:import:: org.apache.commons.io IOUtils .. java:import:: org.apache.logging.log4j LogManager .. java:import:: org.apache.logging.log4j Logger .. java:import:: org.hibernate Session .. java:import:: org.hibernate.jpa QueryHints .. java:import:: org.springframework.beans.factory.annotation Autowired .. java:import:: org.springframework.web.bind.annotation RequestMapping .. java:import:: org.springframework.web.bind.annotation RequestMethod .. java:import:: org.springframework.web.bind.annotation RestController .. java:import:: javax.persistence TypedQuery .. java:import:: javax.persistence.criteria CriteriaBuilder .. java:import:: javax.persistence.criteria CriteriaQuery .. java:import:: javax.persistence.criteria Root .. java:import:: javax.servlet.http HttpServletRequest .. java:import:: javax.servlet.http HttpServletResponse .. java:import:: java.io IOException .. java:import:: java.net URLEncoder .. java:import:: java.nio.charset StandardCharsets .. java:import:: java.nio.file Files .. java:import:: java.nio.file Paths .. java:import:: java.time LocalDate CollectiveReportDataService =========================== .. java:package:: dk.magenta.datafordeler.statistik.services :noindex: .. java:type:: @RestController @RequestMapping public class CollectiveReportDataService extends PersonStatisticsService Fields ------ objectMapper ^^^^^^^^^^^^ .. java:field:: @Autowired ObjectMapper objectMapper :outertype: CollectiveReportDataService sessionManager ^^^^^^^^^^^^^^ .. java:field:: @Autowired SessionManager sessionManager :outertype: CollectiveReportDataService Methods ------- formatPerson ^^^^^^^^^^^^ .. java:method:: @Override protected List> formatPerson(PersonEntity person, Session session, GeoLookupService lookupService, Filter filter) :outertype: CollectiveReportDataService get ^^^ .. java:method:: @RequestMapping public void get(HttpServletRequest request, HttpServletResponse response) throws AccessDeniedException, AccessRequiredException, InvalidTokenException, InvalidClientInputException, IOException, HttpNotFoundException, MissingParameterException, InvalidCertificateException :outertype: CollectiveReportDataService Calls handleRequest in super with the ID of the report as a parameter :param request: :param response: :throws AccessDeniedException: :throws AccessRequiredException: :throws InvalidTokenException: :throws IOException: :throws MissingParameterException: :throws InvalidClientInputException: :throws HttpNotFoundException: :throws InvalidCertificateException: getColumnNames ^^^^^^^^^^^^^^ .. java:method:: @Override protected List getColumnNames() :outertype: CollectiveReportDataService getCprPlugin ^^^^^^^^^^^^ .. java:method:: @Override protected CprPlugin getCprPlugin() :outertype: CollectiveReportDataService getCsvMapper ^^^^^^^^^^^^ .. java:method:: @Override protected CsvMapper getCsvMapper() :outertype: CollectiveReportDataService getDafoUserManager ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected DafoUserManager getDafoUserManager() :outertype: CollectiveReportDataService getDone ^^^^^^^ .. java:method:: @RequestMapping public void getDone(HttpServletRequest request, HttpServletResponse response) throws IOException :outertype: CollectiveReportDataService getLogger ^^^^^^^^^ .. java:method:: @Override protected Logger getLogger() :outertype: CollectiveReportDataService getQuery ^^^^^^^^ .. java:method:: @Override protected PersonRecordQuery getQuery(Filter filter) :outertype: CollectiveReportDataService getReportExecute ^^^^^^^^^^^^^^^^ .. java:method:: @RequestMapping public void getReportExecute(HttpServletRequest request, HttpServletResponse response) throws IOException, AccessDeniedException, InvalidTokenException, InvalidCertificateException, AccessRequiredException :outertype: CollectiveReportDataService Find one report from the list of started reports and run it :param request: :param response: :throws IOException: :throws AccessDeniedException: :throws InvalidTokenException: :throws InvalidCertificateException: :throws AccessRequiredException: getReportList ^^^^^^^^^^^^^ .. java:method:: @RequestMapping public void getReportList(HttpServletRequest request, HttpServletResponse response) throws IOException, AccessDeniedException, InvalidTokenException, InvalidCertificateException, AccessRequiredException :outertype: CollectiveReportDataService Return a list of reports which is either started, running or done Done reports is only returned if there is no started or running reports found :param request: :param response: :throws IOException: :throws AccessDeniedException: :throws InvalidTokenException: :throws InvalidCertificateException: :throws AccessRequiredException: getReportStatus ^^^^^^^^^^^^^^^ .. java:method:: @RequestMapping public void getReportStatus(HttpServletRequest request, HttpServletResponse response) throws IOException, AccessDeniedException, InvalidTokenException, InvalidCertificateException, AccessRequiredException :outertype: CollectiveReportDataService Get the status of reports from the reportlist :param request: :param response: :throws IOException: :throws AccessDeniedException: :throws InvalidTokenException: :throws InvalidCertificateException: :throws AccessRequiredException: getSessionManager ^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected SessionManager getSessionManager() :outertype: CollectiveReportDataService handlePost ^^^^^^^^^^ .. java:method:: @RequestMapping public void handlePost(HttpServletRequest request, HttpServletResponse response) throws IOException, AccessDeniedException, InvalidTokenException, InvalidCertificateException, AccessRequiredException :outertype: CollectiveReportDataService Post is used for starting the generation of a report :param request: :param response: :throws AccessDeniedException: :throws AccessRequiredException: :throws InvalidTokenException: :throws IOException: :throws MissingParameterException: :throws InvalidClientInputException: :throws HttpNotFoundException: :throws InvalidCertificateException: requiredParameters ^^^^^^^^^^^^^^^^^^ .. java:method:: protected String[] requiredParameters() :outertype: CollectiveReportDataService