private static ExecutionSemester getEndExecutionPeriod(Integer endExecutionPeriodID) {
   final ExecutionSemester endExecutionPeriod =
       (endExecutionPeriodID == null)
           ? null
           : RootDomainObject.getInstance().readExecutionSemesterByOID(endExecutionPeriodID);
   return endExecutionPeriod;
 }
 private void setNotValidState(PartyContactValidationState state) {
   if (!hasRootDomainObject()) {
     setRootDomainObject(RootDomainObject.getInstance());
   }
   super.setState(state);
   setLastChangeDate(new DateTime());
 }
 private static ExecutionSemester getBeginExecutionPeriod(final Integer beginExecutionPeriodID) {
   if (beginExecutionPeriodID == null) {
     return ExecutionSemester.readActualExecutionSemester();
   } else {
     return RootDomainObject.getInstance().readExecutionSemesterByOID(beginExecutionPeriodID);
   }
 }
Exemple #4
0
  public static final ResearchResult readByOid(Integer oid) {
    final ResearchResult result = RootDomainObject.getInstance().readResearchResultByOID(oid);

    if (result == null) {
      throw new DomainException("error.researcher.Result.null");
    }
    return result;
  }
 @Service
 public static void run(Integer curricularRuleID) throws FenixServiceException {
   final CurricularRule curricularRule =
       RootDomainObject.getInstance().readCurricularRuleByOID(curricularRuleID);
   if (curricularRule == null) {
     throw new FenixServiceException("error.noCurricularRule");
   }
   curricularRule.delete();
 }
Exemple #6
0
 public StudentNumber(final Student student) {
   super();
   String[] args = {};
   if (student == null) {
     throw new DomainException("error.StudentNumber.invalid.student", args);
   }
   setRootDomainObject(RootDomainObject.getInstance());
   setStudent(student);
   setNumber(student.getNumber());
 }
Exemple #7
0
 @Checked("SpacePredicates.checkIfLoggedPersonHasPermissionsToManageBlueprints")
 @FenixDomainObjectActionLogAnnotation(
     actionName = "Created space blueprint",
     parameters = {"space", "person"})
 public Blueprint(Space space, Person person) {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
   checkNewBluePrintDates(space);
   closeCurrentSpaceBlueprint(space);
   setSpace(space);
   setCreationPerson(person);
   super.setValidFrom(new YearMonthDay());
 }
 public static Collection<Person> findPersonByDocumentID(final String documentIDValue) {
   final Collection<Person> people = new ArrayList<Person>();
   if (!StringUtils.isEmpty(documentIDValue)) {
     for (final IdDocument idDocument : RootDomainObject.getInstance().getIdDocumentsSet()) {
       if (StringUtils.trim(idDocument.getValue())
           .replace(" ", "")
           .equalsIgnoreCase(documentIDValue)) {
         people.add(idDocument.getPerson());
       }
     }
   }
   return people;
 }
  private void notifyVigilants(WrittenEvaluation writtenEvaluation, Date dayDate, Date beginDate) {

    final HashSet<Person> tos = new HashSet<Person>();

    // VigilantGroup group =
    // writtenEvaluation.getAssociatedVigilantGroups().iterator().next();
    for (VigilantGroup group : writtenEvaluation.getAssociatedVigilantGroups()) {
      tos.clear();
      DateTime date = writtenEvaluation.getBeginningDateTime();
      String time = writtenEvaluation.getBeginningDateHourMinuteSecond().toString();
      String beginDateString =
          date.getDayOfMonth() + "-" + date.getMonthOfYear() + "-" + date.getYear();

      String subject =
          String.format(
              "[ %s - %s - %s %s ]",
              new Object[] {writtenEvaluation.getName(), group.getName(), beginDateString, time});
      String body =
          String.format(
              "Caro Vigilante,\n\nA prova de avalia��o: %1$s %2$s - %3$s foi alterada para  %4$td-%4$tm-%4$tY - %5$tH:%5$tM.",
              new Object[] {
                writtenEvaluation.getName(), beginDateString, time, dayDate, beginDate
              });

      for (Vigilancy vigilancy : writtenEvaluation.getVigilancies()) {
        Person person = vigilancy.getVigilantWrapper().getPerson();
        tos.add(person);
      }
      Sender sender = RootDomainObject.getInstance().getSystemSender();
      new Message(
          sender,
          new ConcreteReplyTo(group.getContactEmail()).asCollection(),
          new Recipient(new FixedSetGroup(tos)).asCollection(),
          subject,
          body,
          "");
    }
  }
  private void loadIndexes() {
    for (final Party party : RootDomainObject.getInstance().getPartysSet()) {
      if (party.isPerson()) {
        final Person person = (Person) party;
        try {
          final String personName = CardGenerationEntry.normalizePersonName(person).trim();
          addPerson(peopleByName, person, personName);

          if (person.hasEmployee()) {
            final Integer number = person.getEmployee().getEmployeeNumber();
            addPerson(peopleByNumber, person, number);
          }
          if (person.hasStudent()) {
            final Integer number = person.getStudent().getNumber();
            addPerson(peopleByNumber, person, number);
          }
        } catch (Error e) {
          // keep going... ignore the person for now.
          peopleWithBadNames.add(person);
        }
      }
    }
  }
 private PhdConfigurationIndividualProgramProcess() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
   setGenerateAlert(true);
   setMigratedProcess(false);
 }
Exemple #12
0
  public ResearchResult() {

    super();
    setRootDomainObject(RootDomainObject.getInstance());
    setOnCreateAtributes();
  }
Exemple #13
0
 protected ResidenceMonth() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
 }
Exemple #14
0
 protected void init(DateTime begin, DateTime end) {
   validateInquiryPeriod(begin, end);
   setResponsePeriodBegin(begin);
   setResponsePeriodEnd(end);
   setRootDomainObject(RootDomainObject.getInstance());
 }
Exemple #15
0
 public static List<ParkingGroup> getAll() {
   return RootDomainObject.getInstance().getParkingGroups();
 }
Exemple #16
0
 public GlossaryEntry() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
 }
 protected InstitutionAffiliationEventTicket() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
   setGenerated(new DateTime());
 }
Exemple #18
0
 protected PaymentCodeMapping() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
 }
 public StudentCourseReport() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
 }
Exemple #20
0
 public ParkingGroup(String groupName) {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
   setGroupName(groupName);
 }
 protected PhdConclusionProcess() {
   super();
   setRootDomainObject(RootDomainObject.getInstance());
 }