/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rmi;

import infoObjects.InfoError;
import infoObjects.InfoResults;
import infoObjects.InfoTarea;
import infoObjects.InfoTest;
import interfaces.InterfaceSecurity;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;


import controller.Controller;


/**
 * Clase que contiene la implementación de la interfaz remota InterfaceSecurity
 *
 * @author Enrique M.L
 */
public class RMIImpl extends UnicastRemoteObject implements InterfaceSecurity{
    
    private static final long serialVersionUID = 1L;
    
    protected RMIImpl(String ruteRoot) throws RemoteException {
       super();
       Controller.init(ruteRoot);
    }
    
    @Override
    public InfoError securityCheckCode(InfoTarea infoTarea) throws RemoteException {
        return Controller.securityCheckCode(infoTarea);
    }
    
    @Override
    public InfoError securityNewTask(InfoTarea infoTarea) throws RemoteException{
        return Controller.securityNewTask(infoTarea);
    }
    
    @Override
    public InfoError securityRunTest(InfoTest infoTest) throws RemoteException{
        return Controller.securityRunTest(infoTest);
    }
    
    @Override
    public InfoError securitySaveTest(InfoTest infoTest) throws RemoteException{
        return Controller.securitySaveTest(infoTest);
    }
    
    @Override
    public InfoResults securityStudentRunTask(InfoTarea infoTarea) throws RemoteException {
        return Controller.securityStudentRunTask(infoTarea);
    }

	@Override
	public void setShowHelpDebug(boolean show) throws RemoteException {
		Controller.setShowHelpDebug(show);
	}

	@Override
	public InfoError securityDeleteTest(InfoTest infoTest) throws RemoteException {
		return Controller.securityDeleteTest(infoTest);
	}

	@Override
	public InfoError securityDeleteTask(InfoTarea infoTarea) throws RemoteException {
		return Controller.securityDeleteTask(infoTarea);
	}

	@Override
	public InfoError securityCleanData() throws RemoteException {
		return Controller.securityCleanData();
	}


	
	
}   
    

