@Test void messageReIndexUsingMailboxIdShouldFailWhenMailboxNotFound() { MailboxId mailboxId = InMemoryId.of(42); MessageUid uid = MessageUid.of(36); assertThatThrownBy(() -> reIndexer.reIndex(mailboxId, uid)) .isInstanceOf(MailboxNotFoundException.class); }
@Override public Task reIndex(MailboxPath path, RunningOptions runningOptions) throws MailboxException { MailboxSession mailboxSession = mailboxManager.createSystemSession(path.getUser()); MailboxId mailboxId = mailboxManager.getMailbox(path, mailboxSession).getId(); return new SingleMailboxReindexingTask(reIndexerPerformer, mailboxId, runningOptions); }
ReIndexerImpl implements ReIndexer { @Override public Task reIndex(MailboxPath path, RunningOptions runningOptions) throws MailboxException { MailboxSession mailboxSession = mailboxManager.createSystemSession(path.getUser()); MailboxId mailboxId = mailboxManager.getMailbox(path, mailboxSession).getId(); return new SingleMailboxReindexingTask(reIndexerPerformer, mailboxId, runningOptions); } }
ReIndexerImpl implements ReIndexer { @Override public Task reIndex(MailboxPath path, RunningOptions runningOptions) throws MailboxException { MailboxSession mailboxSession = mailboxManager.createSystemSession(path.getUser()); MailboxId mailboxId = mailboxManager.getMailbox(path, mailboxSession).getId(); return new SingleMailboxReindexingTask(reIndexerPerformer, mailboxId, runningOptions); } @Inject  ReIndexerImpl(ReIndexerPerformer reIndexerPerformer, MailboxManager mailboxManager, MailboxSessionMapperFactory mapperFactory); }
ReIndexerImpl implements ReIndexer { @Override public Task reIndex(MailboxPath path, RunningOptions runningOptions) throws MailboxException { MailboxSession mailboxSession = mailboxManager.createSystemSession(path.getUser()); MailboxId mailboxId = mailboxManager.getMailbox(path, mailboxSession).getId(); return new SingleMailboxReindexingTask(reIndexerPerformer, mailboxId, runningOptions); } @Inject  ReIndexerImpl(ReIndexerPerformer reIndexerPerformer, MailboxManager mailboxManager, MailboxSessionMapperFactory mapperFactory); @Override Task reIndex(MailboxPath path, RunningOptions runningOptions); @Override Task reIndex(MailboxId mailboxId, RunningOptions runningOptions); @Override Task reIndex(RunningOptions runningOptions); @Override Task reIndex(Username username, RunningOptions runningOptions); @Override Task reIndex(MailboxPath path, MessageUid uid); @Override Task reIndex(MailboxId mailboxId, MessageUid uid); @Override Task reIndex(ReIndexingExecutionFailures previousFailures, RunningOptions runningOptions); }
ReIndexerImpl implements ReIndexer { @Override public Task reIndex(MailboxPath path, RunningOptions runningOptions) throws MailboxException { MailboxSession mailboxSession = mailboxManager.createSystemSession(path.getUser()); MailboxId mailboxId = mailboxManager.getMailbox(path, mailboxSession).getId(); return new SingleMailboxReindexingTask(reIndexerPerformer, mailboxId, runningOptions); } @Inject  ReIndexerImpl(ReIndexerPerformer reIndexerPerformer, MailboxManager mailboxManager, MailboxSessionMapperFactory mapperFactory); @Override Task reIndex(MailboxPath path, RunningOptions runningOptions); @Override Task reIndex(MailboxId mailboxId, RunningOptions runningOptions); @Override Task reIndex(RunningOptions runningOptions); @Override Task reIndex(Username username, RunningOptions runningOptions); @Override Task reIndex(MailboxPath path, MessageUid uid); @Override Task reIndex(MailboxId mailboxId, MessageUid uid); @Override Task reIndex(ReIndexingExecutionFailures previousFailures, RunningOptions runningOptions);  }