protected BwCalendar getEntityCollection(
      final String path,
      final int nonSchedAccess,
      final boolean scheduling,
      final boolean alwaysReturn)
      throws CalFacadeException {
    int desiredAccess;

    if (!scheduling) {
      desiredAccess = nonSchedAccess;
    } else {
      desiredAccess = privAny;
    }

    BwCalendar cal = getCollection(path, desiredAccess, alwaysReturn | scheduling);
    if (cal == null) {
      return cal;
    }

    if (!cal.getCalendarCollection()) {
      throwException(new CalFacadeAccessException());
    }

    if (!scheduling) {
      return cal;
    }

    CurrentAccess ca;

    if ((cal.getCalType() == BwCalendar.calTypeInbox)
        || (cal.getCalType() == BwCalendar.calTypePendingInbox)) {
      ca = access.checkAccess(cal, privScheduleDeliver, true);
      if (!ca.getAccessAllowed()) {
        // try old style
        ca = access.checkAccess(cal, privScheduleRequest, alwaysReturn);
      }
    } else if (cal.getCalType() == BwCalendar.calTypeOutbox) {
      ca = access.checkAccess(cal, privScheduleSend, true);
      if (!ca.getAccessAllowed()) {
        // try old style
        ca = access.checkAccess(cal, privScheduleReply, alwaysReturn);
      }
    } else {
      throw new CalFacadeAccessException();
    }

    if (!ca.getAccessAllowed()) {
      return null;
    }

    return cal;
  }
  /* Post processing of event. Return null or throw exception for no access
   */
  protected CoreEventInfo postGetEvent(
      final BwEvent ev, final int desiredAccess, final boolean nullForNoAccess, final Filters f)
      throws CalFacadeException {
    if (ev == null) {
      return null;
    }

    CurrentAccess ca = access.checkAccess(ev, desiredAccess, nullForNoAccess);

    if (!ca.getAccessAllowed()) {
      return null;
    }

    return postGetEvent(ev, f, ca);
  }