IUserView id = (IUserView) request.getRequester(); Student student = readStudent(id); if(student == null) {
Object[] args = request.getServiceParameters().parametersArray();  Student student = null; if (args[1] != null) { Integer studentCurricularPlanID = (Integer) args[1]; StudentCurricularPlan studentCurricularPlan = (StudentCurricularPlan) persistentObject.readByOID(StudentCurricularPlan.class, studentCurricularPlanID); student = studentCurricularPlan.getStudent(); } else if (args.length > 2 && args[2] != null) { Integer studentNumber = (Integer) args[2]; student = persistentSupport.getIPersistentStudent().readByUsername("L" + studentNumber); }  if (student == null) {
	public void execute(ServiceRequest request, ServiceResponse response)			throws Exception {		IUserView id = (IUserView) request.getRequester();		Student student = readStudent(id);		if(student == null) {			throw new NotAuthorizedFilterException("noAuthorization");		}				ExecutionPeriod actualExecutionPeriod = persistentSupport.getIPersistentExecutionPeriod().readActualExecutionPeriod();		ExecutionPeriod previousExecutionPeriod = actualExecutionPeriod.getPreviousExecutionPeriod();		ExecutionPeriod beforePreviousExecutionPeriod = previousExecutionPeriod.getPreviousExecutionPeriod();				for (StudentCurricularPlan studentCurricularPlan : student.getStudentCurricularPlans()) {			for (Enrolment enrolment : studentCurricularPlan.getEnrolments()) {				if(enrolment.getExecutionPeriod().equals(previousExecutionPeriod) || enrolment.getExecutionPeriod().equals(beforePreviousExecutionPeriod)) {					return;				}			}		}		throw new NotAuthorizedFilterException("error.no.enrolment.two.previous.executions");	}