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);
}
}
Aggregations