/** * */ package net.sourceforge.fenixedu.applicationTier.Servico.student; import net.sourceforge.fenixedu.applicationTier.FenixService; import net.sourceforge.fenixedu.domain.ExecutionCourse; import net.sourceforge.fenixedu.domain.Teacher; import net.sourceforge.fenixedu.domain.complain.EvaluationComplain; import net.sourceforge.fenixedu.domain.student.Student; import org.joda.time.YearMonthDay; import pt.ist.fenixWebFramework.security.accessControl.Checked; import pt.ist.fenixWebFramework.services.Service; public class CreateEvaluationComplain extends FenixService { @Checked("RolePredicates.STUDENT_PREDICATE") @Service public static void run(Integer executionCourseId, Integer teacherId, Student student, String description) { ExecutionCourse executionCourse = rootDomainObject.readExecutionCourseByOID(executionCourseId); Teacher teacher = rootDomainObject.readTeacherByOID(teacherId); YearMonthDay studentEvaluationComplainDateYearMonthDay = new YearMonthDay(); new EvaluationComplain(executionCourse, teacher, student, description, studentEvaluationComplainDateYearMonthDay); } }