Search in sources :

Example 1 with CreateMountpoint

use of com.zimbra.cs.redolog.op.CreateMountpoint in project zm-mailbox by Zimbra.

the class Mailbox method createMountpoint.

public Mountpoint createMountpoint(OperationContext octxt, int folderId, String name, String ownerId, int remoteId, String remoteUuid, MailItem.Type view, int flags, Color color, boolean showReminders) throws ServiceException {
    CreateMountpoint redoRecorder = new CreateMountpoint(mId, folderId, name, ownerId, remoteId, remoteUuid, view, flags, color, showReminders);
    boolean success = false;
    try {
        beginTransaction("createMountpoint", octxt, redoRecorder);
        CreateMountpoint redoPlayer = (CreateMountpoint) currentChange().getRedoPlayer();
        int mptId = getNextItemId(redoPlayer == null ? ID_AUTO_INCREMENT : redoPlayer.getId());
        String uuid = redoPlayer == null ? UUIDUtil.generateUUID() : redoPlayer.getUuid();
        Mountpoint mpt = Mountpoint.create(mptId, uuid, getFolderById(folderId), name, ownerId, remoteId, remoteUuid, view, flags, color, showReminders, null);
        redoRecorder.setIdAndUuid(mpt.getId(), mpt.getUuid());
        success = true;
        return mpt;
    } finally {
        endTransaction(success);
    }
}
Also used : RefreshMountpoint(com.zimbra.cs.redolog.op.RefreshMountpoint) CreateMountpoint(com.zimbra.cs.redolog.op.CreateMountpoint) RefreshMountpoint(com.zimbra.cs.redolog.op.RefreshMountpoint) TargetConstraint(com.zimbra.cs.mailbox.MailItem.TargetConstraint) CreateMountpoint(com.zimbra.cs.redolog.op.CreateMountpoint) CreateMountpoint(com.zimbra.cs.redolog.op.CreateMountpoint)

Aggregations

TargetConstraint (com.zimbra.cs.mailbox.MailItem.TargetConstraint)1 CreateMountpoint (com.zimbra.cs.redolog.op.CreateMountpoint)1 RefreshMountpoint (com.zimbra.cs.redolog.op.RefreshMountpoint)1