package com.capgemini.reports.r17;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

import com.capgemini.reports.common.AbstractSubmitServletForItemRevision;
import com.capgemini.reports.definition.r15r16r17reports.r15r17reports.r17report.ExecutionR17;

/**
 * This class receives demands to perform a R17 report.<br>
 * It prepares the data and creates the appropriate {@link ExecutionR17} instance that will carry out the job.
 */
@WebServlet("/report_r17/submit")
public class SubmitServletR17 extends AbstractSubmitServletForItemRevision<ExecutionR17> {

    private static final long serialVersionUID = 4201618696927491183L;

    @Override
    protected ExecutionR17 prepareReport(final String itemId, final String itemRev, final HttpServletRequest request) {
        // Obtain report parameters
        String langue = request.getParameter("langue");

        return new ExecutionR17(itemId, itemRev, langue);
    }
}
