<commit_before>/*
 * 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.kfs.gl.batch;

import java.util.Date;

import org.kuali.kfs.gl.batch.service.CollectorReportService;
import org.kuali.kfs.gl.batch.service.CollectorService;
import org.kuali.kfs.gl.report.CollectorReportData;
import org.kuali.kfs.sys.batch.AbstractStep;
import org.kuali.kfs.sys.batch.AbstractWrappedBatchStep;
import org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor;

/**
 * Batch step that controls the collector process. The basic steps in the collector process are the following: 1) Retrieves files
 * that need processed 2) Parses each file into a CollectorBatch object using the collector digester rules 3) Validation of contents
 * in CollectorService 4) Stores origin group, gl entries, and id billings for each batch 5) Sends email to workgroup listed in the
 * batch file header with process results 6) Cleans up .done files
 */
public class CollectorStep extends AbstractStep {
    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CollectorStep.class);

    private CollectorService collectorService;
    private CollectorReportService collectorReportService;

    /**
     * Controls the collector process.
     * @param jobName the name of the job
     * @param jobRunDate when the job has been run
     * @return true if the next step in the job should proceed, false otherwise
     * @see org.kuali.kfs.sys.batch.Step#execute(java.lang.String, java.util.Date)
     */
    @Override
    public boolean execute(String jobName, Date jobRunDate) throws InterruptedException {
        CollectorReportData collectorReportData = collectorService.performCollection();
        collectorReportService.sendEmails(collectorReportData);
        collectorReportService.generateCollectorRunReports(collectorReportData);
        return true;
    }

    /**
     * Gets the collectorService attribute.
     * 
     * @return Returns the collectorService.
     */
    public CollectorService getCollectorService() {
        return collectorService;
    }

    /**
     * Sets the collectorService attribute value.
     * 
     * @param collectorService The collectorService to set.
     */
    public void setCollectorService(CollectorService collectorService) {
        this.collectorService = collectorService;
    }

    /**
     * Gets the collectorReportService attribute.
     * 
     * @return Returns the collectorReportService.
     */
    public CollectorReportService getCollectorReportService() {
        return collectorReportService;
    }

    /**
     * Sets the collectorReportService attribute value.
     * 
     * @param collectorReportService The collectorReportService to set.
     */
    public void setCollectorReportService(CollectorReportService collectorReportService) {
        this.collectorReportService = collectorReportService;
    }
}
<commit_msg>KFSMI-3133: whoops! collector step doesn't @Override.  Sorry about that.<commit_after>/*
 * 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.kfs.gl.batch;

import java.util.Date;

import org.kuali.kfs.gl.batch.service.CollectorReportService;
import org.kuali.kfs.gl.batch.service.CollectorService;
import org.kuali.kfs.gl.report.CollectorReportData;
import org.kuali.kfs.sys.batch.AbstractStep;
import org.kuali.kfs.sys.batch.AbstractWrappedBatchStep;
import org.kuali.kfs.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor;

/**
 * Batch step that controls the collector process. The basic steps in the collector process are the following: 1) Retrieves files
 * that need processed 2) Parses each file into a CollectorBatch object using the collector digester rules 3) Validation of contents
 * in CollectorService 4) Stores origin group, gl entries, and id billings for each batch 5) Sends email to workgroup listed in the
 * batch file header with process results 6) Cleans up .done files
 */
public class CollectorStep extends AbstractStep {
    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CollectorStep.class);

    private CollectorService collectorService;
    private CollectorReportService collectorReportService;

    /**
     * Controls the collector process.
     * @param jobName the name of the job
     * @param jobRunDate when the job has been run
     * @return true if the next step in the job should proceed, false otherwise
     * @see org.kuali.kfs.sys.batch.Step#execute(java.lang.String, java.util.Date)
     */
    public boolean execute(String jobName, Date jobRunDate) throws InterruptedException {
        CollectorReportData collectorReportData = collectorService.performCollection();
        collectorReportService.sendEmails(collectorReportData);
        collectorReportService.generateCollectorRunReports(collectorReportData);
        return true;
    }

    /**
     * Gets the collectorService attribute.
     * 
     * @return Returns the collectorService.
     */
    public CollectorService getCollectorService() {
        return collectorService;
    }

    /**
     * Sets the collectorService attribute value.
     * 
     * @param collectorService The collectorService to set.
     */
    public void setCollectorService(CollectorService collectorService) {
        this.collectorService = collectorService;
    }

    /**
     * Gets the collectorReportService attribute.
     * 
     * @return Returns the collectorReportService.
     */
    public CollectorReportService getCollectorReportService() {
        return collectorReportService;
    }

    /**
     * Sets the collectorReportService attribute value.
     * 
     * @param collectorReportService The collectorReportService to set.
     */
    public void setCollectorReportService(CollectorReportService collectorReportService) {
        this.collectorReportService = collectorReportService;
    }
}

{'fraction_non_alphanumeric': 0.07058488686494949, 'fraction_numerical': 0.004838480148000569, 'mean_word_length': 3.672872340425532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1784752', 'n_tokens_mistral': 1913, 'n_tokens_neox': 1802, 'n_words': 609}