package ub.scp2.bo;

import java.util.List;

import ub.scp2.entities.Submission;
import ub.scp2.entities.Task;
import ub.scp2.entities.Test;
import ub.scp2.entities.User;

public interface TaskBo {
	
	//Persistence methods
	public List<Task> getActiveTasksByUser(User user);
	public List<Task> getExpiredTasksByUser(User user);
	public List<Task> getTasks();
	public void saveTask(Task task);
	public void deleteTask(Task task);
	public void updateTask(Task task);
	public boolean exists(Long taskid, User user);
	public Task getTaskById(Long taskid);
	public List<Test> getTestsByTask(Task task);

	//Code checking mehtods
	public List<String> compile(Task task);
	public List<String> runTest(Task task, Test test);
	public void cleanup(Task task);
	public List<Task> getActiveTasksForStudent(User user);
	public List<Task> getExpiredTasksForStudent(User user);
	
	public List<String[]> getPresetArguments(String path);
}
