SetAppointment redoRecorder = new SetAppointment(getId());
SetAppointment redoRecorder = new SetAppointment(getId(), attachmentsIndexingEnabled());
    public synchronized int setAppointment(OperationContext octxt, int folderId, SetAppointmentData defaultInv, SetAppointmentData exceptions[])    throws ServiceException {        SetAppointment redoRecorder = new SetAppointment(getId());        SetAppointment redoPlayer = (octxt == null ? null : (SetAppointment) octxt.player);                boolean success = false;        try {            beginTransaction("setAppointment", octxt, redoRecorder);            // allocate IDs for all of the passed-in invites (and the appointment!) if necessary            if (redoPlayer == null || redoPlayer.getAppointmentId() == 0) {                assert(defaultInv.mInv.getMailItemId() == 0);                int mailItemId = getNextItemId(Mailbox.ID_AUTO_INCREMENT);                defaultInv.mInv.setInviteId(mailItemId);                if (exceptions != null) {                    for (SetAppointmentData sad : exceptions) {                        mailItemId = getNextItemId(Mailbox.ID_AUTO_INCREMENT);                        sad.mInv.setMailItemId(mailItemId);                    }                }            } else {                // id already set before we stored the invite in the redoRecorder!!!            }                        redoRecorder.setData(defaultInv, exceptions);            // handle the DEFAULT appointment            short volumeId =                redoPlayer == null ? Volume.getCurrentMessageVolume().getId()                                   : redoPlayer.getVolumeId();            Appointment appt = getAppointmentByUid(defaultInv.mInv.getUid());            if (appt == null) {                 // ONLY create an appointment if this is a REQUEST method...otherwise don't.                if (defaultInv.mInv.getMethod().equals("REQUEST") || defaultInv.mInv.getMethod().equals("PUBLISH")) {                    appt = createAppointment(folderId, volumeId, "",                            defaultInv.mInv.getUid(), defaultInv.mPm, defaultInv.mInv);                } else {//                  mLog.info("Mailbox " + getId()+" Message "+getId()+" SKIPPING Invite "+method+" b/c not a REQUEST and no Appointment could be found");                    return 0; // for now, just ignore this Invitation                }            } else {                ZOrganizer originalOrganizer = appt.getDefaultInvite().getOrganizer();                appt.removeAllInvites();                 appt.processNewInvite(originalOrganizer,                                      defaultInv.mPm,                                      defaultInv.mInv,                                      defaultInv.mForce, folderId, volumeId);            }            redoRecorder.setAppointmentAttrs(appt.getId(),                                             appt.getFolderId(),                                             volumeId);            // handle the exceptions!            if (exceptions != null) {                ZOrganizer originalOrganizer = appt.getDefaultInvite().getOrganizer();                for (SetAppointmentData sad : exceptions) {                    appt.processNewInvite(originalOrganizer, sad.mPm, sad.mInv, sad.mForce, folderId, volumeId);                }            }                        success = true;                        return appt.getId();                    } finally {            endTransaction(success);        }    }