ISummary summary = getSummary(arguments); ISuportePersistente sp = SuportePersistenteOJB.getInstance(); IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher(); ITeacher teacherLogged = persistentTeacher.readTeacherByUsername(id.getUtilizador());
    public void execute(ServiceRequest request, ServiceResponse response) throws Exception {        IUserView id = getRemoteUser(request);        Object[] arguments = getServiceCallArguments(request);        try {            if ((id == null) || (id.getRoles() == null)                    || !AuthorizationUtils.containsRole(id.getRoles(), getRoleType())                    || !lecturesExecutionCourse(id, arguments)                    || !SummaryBelongsExecutionCourse(id, arguments)                    || !summaryBelongsToTeacher(id, arguments) || !validTeacher(id, arguments)) {                throw new NotAuthorizedFilterException("error.summary.not.authorized");            }        } catch (RuntimeException ex) {            throw new NotAuthorizedFilterException(ex.getMessage());        }    }