Package com.cfinkel.reports

Examples of com.cfinkel.reports.ReportSessionInfo


                    rd.include(request, response);
                    return;
                }
            }

            ReportSessionInfo reportSessionInfo = getReportSessionInfo(report,session,reportPath);
            request.setAttribute(AttributeNames.reportSessionInfo,reportSessionInfo);

            // check if user has access to this report:
            if (report.hasAccess(request)) {

                try {
                    if (request.getParameter(ParameterNames.clearData) != null) {
                        reportSessionInfo.clearCachedData();
                        response.sendRedirect(request.getContextPath() + request.getServletPath());
                        return;
                    }

                    if ((request.getParameter(ParameterNames.run) != null) || report.getAllInputs().size() == 0) {
                        Map<String, List> reportData = reportSessionInfo.runReport(request.getParameterMap());
                        request.setAttribute(AttributeNames.reportData,reportData);
                    } else if (reportSessionInfo.isReportWasRunAndDataWasNotCleared()) {
                        Map<String, List> reportData = reportSessionInfo.runOnlyForNonCachedData();
                        request.setAttribute(AttributeNames.reportData,reportData);
                    }
                } catch (InvalidInputException e) {
                    log.info("invalid input exception",e); // should not happen
                    throw new ServletException(e);
View Full Code Here


            session.setAttribute(AttributeNames.reportSessionInfos,reportSessionInfos);
        } else {
            reportSessionInfos = (Map<String, ReportSessionInfo>)session.getAttribute(AttributeNames.reportSessionInfos);
        }

        ReportSessionInfo reportSessionInfo;

        if (reportSessionInfos.get(reportPath) == null) {
            reportSessionInfo = new ReportSessionInfo(report);
            reportSessionInfos.put(reportPath, reportSessionInfo);
        } else {
            reportSessionInfo = reportSessionInfos.get(reportPath);
        }
View Full Code Here

     *            of adapter
     * @return ValueListAdapter
     */
    private ValueListAdapter getAdapter(String name)
    {
        ReportSessionInfo reportSessionInfo = (ReportSessionInfo)
                WebContext.get().getRequest().getAttribute(AttributeNames.reportSessionInfo);

        ValueListAdapter adapter = reportSessionInfo.getValueListAdapters().get(name);

        if (adapter == null)
        {
            throw new NullPointerException("Adapter could not be located: " + name);
        }
View Full Code Here

                                           String parentValue, String dependentName) throws Exception {

        HttpServletRequest request = setLocalThreadInfo();

        HttpSession session = WebContextFactory.get().getSession();
        ReportSessionInfo reportSessionInfo = getReportSessionInfo(reportPath,session);

        Input input = reportSessionInfo.getReport().getAllInputs().get(parentInputName);
        if (input == null)
            throw new Exception("No input found with name " + parentInputName );

        Input dependentInput = input.getDependents().get(dependentName);
        if (dependentInput == null)
View Full Code Here

            String error = "No reportSessionInfos in session when trying to get reportSessionInfo with Ajax";
            Exception e = new InvalidSessionException(error);
            log.error(error,e);
            throw e;
        }
        ReportSessionInfo reportSessionInfo = reportSessionInfos.get(reportPath);
        if (reportSessionInfo == null) {
            String error = "No reportSessionInfo in session when trying to get with Ajax";
            Exception e = new InvalidSessionException(error);
            log.error(error,e);
            throw e;
View Full Code Here

TOP

Related Classes of com.cfinkel.reports.ReportSessionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.