/*
 * Copyright 2007 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.module.effort.service.impl;

import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.kuali.module.effort.service.EffortCertificationReportService;
import org.kuali.module.effort.util.ExtractProcessReportDataHolder;
import org.kuali.module.effort.util.EffortReportRegistry;
import org.kuali.module.effort.util.ReportGenerator;

/**
 * This class...
 */
public class EffortCertificationReportServiceImpl implements EffortCertificationReportService {
    public static final String PDF_FILE_EXTENSION = "pdf";

    /**
     * @see org.kuali.module.effort.service.EffortCertificationReportService#generate(org.kuali.module.effort.util.ExtractProcessReportDataHolder,
     *      org.kuali.module.effort.util.EffortReportRegistry, java.lang.String, java.util.Date)
     */
    public void generateReportForExtractProcess(ExtractProcessReportDataHolder reportDataHolder, EffortReportRegistry reportInfo, String reportsDirectory, Date runDate) {
        String fileNamePrefix = reportInfo.reportFilename();
        String template = reportInfo.getReportTemplateName();
        String fullReportFileName = this.buildFullFileName(reportsDirectory, fileNamePrefix, PDF_FILE_EXTENSION, runDate);

        ReportGenerator.generatePDFReport(reportDataHolder.getReportData(), template, fullReportFileName);
    }

    /**
     * build a full file name with the given information
     * 
     * @param directory the directory where the file would be located
     * @param fileNamePrefix the prefix of the file name
     * @param fileNameExtension the extension of the file name
     * @param runDate the run date
     * @return a full file name built from the given information
     */
    private String buildFullFileName(String directory, String fileNamePrefix, String fileNameExtension, Date runDate) {
        String sdf = new SimpleDateFormat("yyyyMMdd_HHmmss").format(runDate);
        String fileNamePattern = "{0}/{1}.{2}";

        return MessageFormat.format(fileNamePattern, directory, fileNamePrefix, fileNameExtension);
    }
}
@@ -753,56 +753,8 @@
 ate;
-%0Aimport java.util.HashMap;%0Aimport java.util.Map;
 %0A%0Aim
@@ -865,37 +865,27 @@
 il.E
-xtractProcessReportDataHolder
+ffortReportRegistry
 ;%0Aim
@@ -919,35 +919,45 @@
 t.util.E
-ffortReportRegistry
+xtractProcessReportDataHolder
 ;%0Aimport
@@ -1125,16 +1125,144 @@
 rvice %7B%0A
+    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(EffortCertificationReportServiceImpl.class);%0A
     publ
@@ -1991,16 +1991,53 @@
 Date);%0A%0A
+        LOG.info(reportDataHolder);%0A%0A
         

Remove @Logged