Subversion Repositories bacoAlunos

Rev

Rev 1573 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.estgweb.domain;

import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONException;
import pt.estgp.estgweb.domain.utils.InputDriven;
import pt.estgp.estgweb.domain.utils.InputDrivenInput;
import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.ReportGenerator;

import java.util.List;

/**
 * Created by jorgemachado on 05/11/16.
 */

public abstract class QuestionarioReportFileGroupImpl extends QuestionarioReportFileGroup implements InputDriven
{

    private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(QuestionarioReportFileGroupImpl.class);
    @1.5.0/docs/api/java/lang/Override.html">Override
    public abstract List<InputDrivenInput> getInputs();
    public abstract 1.5.0/docs/api/java/lang/String.html">String getInputsJson() throws JSONException;
    public abstract JSONArray getInputsJsonArray() throws JSONException;

    public ReportGenerator getReportGeneratorInstance()
    {
        try {
            return (ReportGenerator) 1.5.0/docs/api/java/lang/Class.html">Class.forName(getReportProcessorClass()).newInstance();
        } catch (1.5.0/docs/api/java/lang/InstantiationException.html">InstantiationException e) {
            logger.error(e,e);
            throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException(e);
        } catch (1.5.0/docs/api/java/lang/IllegalAccessException.html">IllegalAccessException e) {
            logger.error(e, e);
            throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException(e);
        } catch (1.5.0/docs/api/java/lang/ClassNotFoundException.html">ClassNotFoundException e) {
            logger.error(e, e);
            throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException(e);
        }
    }

}