static public CurricularCourseByExecutionSemesterBean buildFrom(final String key) { if (key == null || key.isEmpty()) { return null; } final String[] values = key.split(":"); final CurricularCourse course = FenixFramework.getDomainObject(values[0]); final ExecutionSemester semester = FenixFramework.getDomainObject(values[1]); return new CurricularCourseByExecutionSemesterBean(course, semester); } }
@Atomic public static List<InfoExecutionDegree> run(String degreeCurricularPlanID) { DegreeCurricularPlan degreeCurricularPlan = FenixFramework.getDomainObject(degreeCurricularPlanID); List<InfoExecutionDegree> result = new ArrayList<InfoExecutionDegree>(); for (final ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegreesSet()) { result.add(InfoExecutionDegree.newInfoFromDomain(executionDegree)); } return result; }
@Atomic public static InfoExecutionCourse run(final String oid) { InfoExecutionCourse infoExecutionCourse = null; final ExecutionCourse executionCourse = FenixFramework.getDomainObject(oid); if (executionCourse != null) { infoExecutionCourse = InfoExecutionCourse.newInfoFromDomain(executionCourse); } return infoExecutionCourse; }
protected Boolean run(String bibliographicReferenceOID) throws FenixServiceException { BibliographicReference bibliographicReference = FenixFramework.getDomainObject(bibliographicReferenceOID); if (bibliographicReference == null) { throw new InvalidArgumentsServiceException(); } bibliographicReference.delete(); return true; }
@Atomic public static InfoExecutionDegree run(String oid) { final ExecutionDegree executionDegree = FenixFramework.getDomainObject(oid); return InfoExecutionDegree.newInfoFromDomain(executionDegree); }
protected Boolean run(String infoExecutionCourseID, String newBibliographyTitle, String newBibliographyAuthors, String newBibliographyReference, String newBibliographyYear, Boolean newBibliographyOptional) throws FenixServiceException { final ExecutionCourse executionCourse = FenixFramework.getDomainObject(infoExecutionCourseID); if (executionCourse == null) { throw new InvalidArgumentsServiceException(); } executionCourse.createBibliographicReference(newBibliographyTitle, newBibliographyAuthors, newBibliographyReference, newBibliographyYear, newBibliographyOptional); return true; }
public DepartmentUnit getSelectedDepartmentUnit() { if (this.getSelectedDepartmentUnitID() != null) { return (DepartmentUnit) FenixFramework.getDomainObject(this.getSelectedDepartmentUnitID()); } else { return null; } }
private static CurricularRule createRestrictionEnroledDegreeModule(DegreeModule toApplyRule, ExecutionSemester begin, ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) { final DegreeModule enroledDegreeModule = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID()); final CourseGroup contextCourseGroup = (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID()); return new RestrictionEnroledDegreeModule((CurricularCourse) toApplyRule, (CurricularCourse) enroledDegreeModule, contextCourseGroup, parametersDTO.getCurricularPeriodInfoDTO(), begin, end); }
@Atomic public static List<InfoExecutionDegree> run(String degreeCurricularPlanID) throws FenixServiceException { DegreeCurricularPlan degreeCurricularPlan = FenixFramework.getDomainObject(degreeCurricularPlanID); List<InfoExecutionDegree> result = new ArrayList<InfoExecutionDegree>(); for (ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegreesSet()) { result.add(copyExecutionDegree2InfoExecutionDegree(executionDegree)); } return result; }
@Atomic public static InfoExecutionDegree run(String degreeCurricularPlanID, String executionYearID) { DegreeCurricularPlan degreeCurricularPlan = FenixFramework.getDomainObject(degreeCurricularPlanID); ExecutionYear executionYear = FenixFramework.getDomainObject(executionYearID); ExecutionDegree executionDegree = ExecutionDegree.getByDegreeCurricularPlanAndExecutionYear(degreeCurricularPlan, executionYear.getYear()); if (executionDegree == null) { return null; } return copyExecutionDegree2InfoExecutionDegree(executionDegree); }
@Atomic public static InfoShift run(final String oid) { final Shift shift = FenixFramework.getDomainObject(oid); return shift == null ? null : InfoShift.newInfoFromDomain(shift); }
protected List run(String executionDegreeCode, String studentCurricularPlanID) throws FenixServiceException { final StudentCurricularPlan studentCurricularPlan = FenixFramework.getDomainObject(studentCurricularPlanID); if (studentCurricularPlan == null) { throw new NonExistingServiceException("error.readStudentCurriculum.noStudentCurricularPlan"); } final List<InfoEnrolment> result = new ArrayList<InfoEnrolment>(studentCurricularPlan.getEnrolmentsSet().size()); for (final Enrolment enrolment : studentCurricularPlan.getEnrolmentsSet()) { result.add(InfoEnrolment.newInfoFromDomain(enrolment)); } return result; }
private List<ExecutionCourse> readExecutionCourses() throws FenixServiceException { ExecutionDegree executionDegree = FenixFramework.getDomainObject(this.getSelectedExecutionDegreeID()); final List<ExecutionCourse> executionCourses = new ArrayList<ExecutionCourse>(); executionCourses.addAll(ExecutionCourse.filterByAcademicIntervalAndDegreeCurricularPlanAndCurricularYearAndName( getAcademicIntervalFromParameter(getAcademicInterval()), executionDegree.getDegreeCurricularPlan(), CurricularYear.readByYear(curricularYearID), "%")); Collections.sort(executionCourses, new BeanComparator("sigla")); return executionCourses; }
@Atomic public static Object run(final String externalId, final String className) throws ExistingServiceException { check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE); final SchoolClass classToEdit = FenixFramework.getDomainObject(externalId); classToEdit.edit(className); return InfoClass.newInfoFromDomain(classToEdit); }
private static CurricularRule createCreditsLimit(DegreeModule toApplyRule, ExecutionSemester begin, ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) { final CourseGroup contextCourseGroup = (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID()); return new CreditsLimit(toApplyRule, contextCourseGroup, begin, end, parametersDTO.getMinimumCredits(), parametersDTO.getMaximumCredits()); }
@Atomic public static Object run(InfoExecutionPeriod infoExecutionPeriod, String code) { final ExecutionSemester executionSemester = FenixFramework.getDomainObject(infoExecutionPeriod.getExternalId()); ExecutionCourse iExecCourse = executionSemester.getExecutionCourseByInitials(code); if (iExecCourse != null) { return InfoExecutionCourse.newInfoFromDomain(iExecCourse); } return null; }
@Atomic public static void run(final String contextID, final Integer position) throws FenixServiceException { if (contextID == null) { throw new FenixServiceException(); } final Context context = FenixFramework.getDomainObject(contextID); if (context == null) { throw new FenixServiceException("error.noContext"); } context.getParentCourseGroup().orderChild(context, position); }
public DegreeSpecializationArea getSpecializationAreaToDelete() { this.specializationAreaToDelete = (DegreeSpecializationArea) (getSpecializationIdToDelete() == null ? null : FenixFramework .getDomainObject(getSpecializationIdToDelete())); if (getDegreeOfficialPublicationGoBack() == null && this.specializationAreaToDelete != null) { setDegreeOfficialPublicationGoBack(this.specializationAreaToDelete.getOfficialPublication()); } return this.specializationAreaToDelete; }
@Atomic public static Object run(InfoShift infoShiftOld, InfoShiftEditor infoShiftNew) { check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE); final Shift shiftToEdit = FenixFramework.getDomainObject(infoShiftOld.getExternalId()); final ExecutionCourse newExecutionCourse = FenixFramework.getDomainObject(infoShiftNew.getInfoDisciplinaExecucao().getExternalId()); shiftToEdit.edit(infoShiftNew.getTipos(), infoShiftNew.getLotacao(), newExecutionCourse, infoShiftNew.getNome(), infoShiftNew.getComment()); return InfoShift.newInfoFromDomain(shiftToEdit); } }
private static CurricularRule createEvenOdd(DegreeModule toApplyRule, ExecutionSemester begin, ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) { final CourseGroup contextCourseGroup = (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID()); return new EvenOddRule(toApplyRule, contextCourseGroup, parametersDTO.getCurricularPeriodInfoDTO().getOrder(), parametersDTO.getCurricularPeriodInfoDTO().getPeriodType(), parametersDTO.getEven(), begin, end); }