Package org.projectforge.calendar

Examples of org.projectforge.calendar.TimePeriod


  }

  private TimePeriod getTimePeriod()
  {
    if (timePeriod == null) {
      timePeriod = new TimePeriod();
    }
    return timePeriod;
  }
View Full Code Here


  }

  private TimePeriod getTimePeriod()
  {
    if (timePeriod == null) {
      timePeriod = new TimePeriod();
    }
    return timePeriod;
  }
View Full Code Here

  }

  private TimePeriod getTimePeriod()
  {
    if (timePeriod == null) {
      timePeriod = new TimePeriod();
    }
    return timePeriod;
  }
View Full Code Here

  private Set<TimesheetDO> timesheets;

  public TimesheetStats(final Date fromDate, final Date toDate)
  {
    this.period = new TimePeriod(fromDate, toDate);
  }
View Full Code Here


  @Transient
  public TimePeriod getTimePeriod()
  {
    return new TimePeriod(startTime, stopTime, marked);
  }
View Full Code Here

    final Date fromDate = DateHelper.parseIsoDate(sa[0], DateHelper.UTC);
    final Date toDate = DateHelper.parseIsoDate(sa[1], DateHelper.UTC);
    if (fromDate == null || toDate == null) {
      return null;
    }
    return new TimePeriod(fromDate, toDate);
  }
View Full Code Here

      indexString = colonPos > 0 ? property.substring(colonPos + 1) : null;
    }
    final Integer idx = NumberHelper.parseInteger(indexString);
    if (property.startsWith("quickSelect:") == true) {
      final Date date = (Date) selectedValue;
      TimePeriod timePeriod = form.scriptParameters.get(idx).getTimePeriodValue();
      if (timePeriod == null) {
        timePeriod = new TimePeriod();
      }
      timePeriod.setFromDate(date);
      final DateHolder dateHolder = new DateHolder(date);
      if (property.endsWith(".month") == true) {
        dateHolder.setEndOfMonth();
      } else if (property.endsWith(".week") == true) {
        dateHolder.setEndOfWeek();
      } else {
        log.error("Property '" + property + "' not supported for selection.");
      }
      timePeriod.setToDate(dateHolder.getDate());
      form.scriptParameters.get(idx).setTimePeriodValue(timePeriod);
      form.datePanel1[idx].markModelAsChanged();
      form.datePanel2[idx].markModelAsChanged();
    } else if (property.startsWith("taskId:") == true) {
      final TaskDO task = taskDao.getById((Integer) selectedValue);
View Full Code Here

        log.warn("PageParameter of type TimePeriod '" + objectType.getName() + "' in wrong format: " + sValue);
        return null;
      }
      final Long fromTime = NumberHelper.parseLong(sValue.substring(0, pos));
      final Long toTime = pos < sValue.length() - 1 ? NumberHelper.parseLong(sValue.substring(pos + 1)) : null;
      return new TimePeriod(fromTime != null ? new Date(fromTime) : null, toTime != null ? new Date(toTime) : null);
    } else {
      log.error("PageParameter of type '" + objectType.getName() + "' not yet supported.");
    }
    return null;
  }
View Full Code Here

  }

  @Transient
  public TimePeriod getTimePeriod()
  {
    return new TimePeriod(startDate, endDate, true);
  }
View Full Code Here

TOP

Related Classes of org.projectforge.calendar.TimePeriod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.