/** Return a BwDuration populated from the String duration. * * @return BwDuration * @throws CalFacadeException */ @NoProxy public BwDuration makeDurationBean() throws CalFacadeException { return BwDuration.makeDuration(getDuration()); }
/** Return a value based on this value plus a duration. * * @param val * @return BwDateTime * @throws CalFacadeException */ public BwDateTime addDuration(final BwDuration val) throws CalFacadeException { return addDuration(val.makeDuration().getDuration()); }
public BwDuration makeDurationBean() throws CalFacadeException { String duration = ref.getDuration(); if (duration == null) { duration = getTarget().getDuration(); } return BwDuration.makeDuration(duration); }
/** Generate a recurrence instance for the given master event * based on the recurrenceId and the date/time info in the master. * * @param master event * @param recurrenceId for the instance. * @return instance object filled in. * @throws CalFacadeException */ public static BwRecurrenceInstance fromRecurrencId(final BwEvent master, String recurrenceId) throws CalFacadeException { final String stzid = master.getDtstart().getTzid(); final boolean dateOnly = master.getDtstart().getDateType(); final BwDateTime rstart = BwDateTime.makeBwDateTime(dateOnly, recurrenceId, stzid); final BwDateTime rend = rstart.addDuration( BwDuration.makeDuration(master.getDuration())); final BwRecurrenceInstance ri = new BwRecurrenceInstance(); ri.setDtstart(rstart); ri.setDtend(rend); ri.setRecurrenceId(ri.getDtstart().getDate()); ri.setMaster(master); return ri; }