<commit_before>
package edu.wustl.query.workflowexecutor;

import java.util.Map;

import edu.wustl.common.query.AbstractQuery;
import edu.wustl.common.query.factory.AbstractQueryUIManagerFactory;
import edu.wustl.common.querysuite.exceptions.MultipleRootsException;
import edu.wustl.common.querysuite.exceptions.SqlException;
import edu.wustl.query.domain.WorkflowDetails;
import edu.wustl.query.querymanager.Count;
import edu.wustl.query.util.querysuite.AbstractQueryUIManager;
import edu.wustl.query.util.querysuite.QueryModuleException;

/**
 * The work flow manager class will handle all the operations related to work
 * flow. UI layer will always talk to this Class for all the UI related
 * operations.
 *
 * @author supriya_dankh
 *
 */
public class WorkflowManager
{
	private Map<Integer, WorkflowExecutor> execIdWorkflowExecutorMap;
	private WorkflowExecutor workflowExecutor;

	public WorkflowManager()
	{

	}

	public Map<Long, Integer> execute(WorkflowDetails workflowDetails,
            AbstractQuery ciderQuery, Map<Long, Integer> preExecIdMap) throws QueryModuleException,
            MultipleRootsException, SqlException
    {
        workflowExecutor = new WorkflowExecutor(workflowDetails);
        workflowExecutor.addAllExistingExecutionId(preExecIdMap);
        return workflowExecutor.execute(ciderQuery);
    }

	public Map<Long, Integer> execute(WorkflowDetails workflowDetails)
            throws QueryModuleException, MultipleRootsException, SqlException
    {
        workflowExecutor = new WorkflowExecutor(workflowDetails);
        return workflowExecutor.execute();
    }

	public Count getCount(int queryExecId) throws QueryModuleException
	{
		AbstractQueryUIManager qUIManager = AbstractQueryUIManagerFactory
		.getDefaultAbstractUIQueryManager();
		Count countObject = qUIManager.getCount(queryExecId);

		return countObject;
	}

	public void cancel(int workflowExecId){
		// TODO Add Implementation
	}



}<commit_msg>added check for privilege to get count<commit_after>
package edu.wustl.query.workflowexecutor;

import java.util.Map;

import edu.wustl.common.query.AbstractQuery;
import edu.wustl.common.query.QueryPrivilege;
import edu.wustl.common.query.factory.AbstractQueryUIManagerFactory;
import edu.wustl.common.querysuite.exceptions.MultipleRootsException;
import edu.wustl.common.querysuite.exceptions.SqlException;
import edu.wustl.query.domain.WorkflowDetails;
import edu.wustl.query.querymanager.Count;
import edu.wustl.query.util.querysuite.AbstractQueryUIManager;
import edu.wustl.query.util.querysuite.QueryModuleException;

/**
 * The work flow manager class will handle all the operations related to work
 * flow. UI layer will always talk to this Class for all the UI related
 * operations.
 *
 * @author supriya_dankh
 *
 */
public class WorkflowManager
{
	private Map<Integer, WorkflowExecutor> execIdWorkflowExecutorMap;
	private WorkflowExecutor workflowExecutor;

	public WorkflowManager()
	{

	}

	public Map<Long, Integer> execute(WorkflowDetails workflowDetails,
            AbstractQuery ciderQuery, Map<Long, Integer> preExecIdMap) throws QueryModuleException,
            MultipleRootsException, SqlException
    {
        workflowExecutor = new WorkflowExecutor(workflowDetails);
        workflowExecutor.addAllExistingExecutionId(preExecIdMap);
        return workflowExecutor.execute(ciderQuery);
    }

	public Map<Long, Integer> execute(WorkflowDetails workflowDetails)
            throws QueryModuleException, MultipleRootsException, SqlException
    {
        workflowExecutor = new WorkflowExecutor(workflowDetails);
        return workflowExecutor.execute();
    }

	public Count getCount(int queryExecId,QueryPrivilege privilege) throws QueryModuleException
	{
		AbstractQueryUIManager qUIManager = AbstractQueryUIManagerFactory
		.getDefaultAbstractUIQueryManager();
		Count countObject = qUIManager.getCount(queryExecId,privilege);

		return countObject;
	}

	public void cancel(int workflowExecId){
		// TODO Add Implementation
	}



}
{'fraction_non_alphanumeric': 0.07345617529880479, 'fraction_numerical': 0.0, 'mean_word_length': 4.977678571428571, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7059222', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1165, 'n_words': 247}