@Test public void ownerShouldHaveFullRightsViaMayProperties() throws Exception { MailboxPath inbox = MailboxPath.forUser(user, "inbox"); Optional<MailboxId> mailboxId = mailboxManager.createMailbox(inbox, mailboxSession); Mailbox retrievedMailbox = sut.builder() .id(mailboxId.get()) .session(mailboxSession) .build() .get(); softly.assertThat(retrievedMailbox.isMayAddItems()).isTrue(); softly.assertThat(retrievedMailbox.isMayCreateChild()).isTrue(); softly.assertThat(retrievedMailbox.isMayDelete()).isTrue(); softly.assertThat(retrievedMailbox.isMayReadItems()).isTrue(); softly.assertThat(retrievedMailbox.isMayRemoveItems()).isTrue(); softly.assertThat(retrievedMailbox.isMayRename()).isTrue(); }
public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); MailboxBuilder builder(); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); MailboxBuilder builder();  }