@Override public String toString() { return toStringHelper(this) .add("title", title) .add("authorUsername", authorUsername.getOrNull()) .add("authorFullname", authorFullname) .add("icon", icon) .add("countItems", countItems) .toString(); } }
@Override public PreRenderedMailNotificationQueueItem create(ContentEntityObject contentEntityObject, ConfluenceUser recipient, ConfluenceUser sender, String templateLocation, String templateName, String subject, NotificationContext context) { PreRenderedMailNotificationQueueItem.Builder builder = PreRenderedMailNotificationQueueItem.with(recipient, templateName, subject).andSender(sender) .andTemplateLocation(templateLocation).andContext(context.getMap()); Maybe<PluginDataSourceFactory> pluginFactory = imageDataSourceFactory.forPlugin("com.atlassian.confluence.plugins.confluence-mentions-plugin"); if (pluginFactory.isDefined()) { Maybe<DataSource> mention_icon = pluginFactory.get().resourceFromModuleByName("mention-icon", "mention-icon"); if (mention_icon.isDefined()) { context.addTemplateImage(mention_icon.get()); } } String mentionExcerpt = (String) context.get("contentHtml"); for (DataSource resource : InlineTasksUtils.getRequiredResources(imageDataSourceFactory, mentionExcerpt)) { context.addTemplateImage(resource); } builder.andRelatedBodyParts(context.getTemplateImageDataSources()).andRelatedBodyParts(imagesUsedByChromeTemplate()); return builder.render(); }
final ServerConfiguration configuration, final Maybe<Either<NotificationAddress, RoleRecipient>> roleRecipient) { if (roleRecipient.isEmpty() || roleRecipient.get().isLeft()) { return MaybeNot.becauseOf( "This factory exposes content, thus recipient has to be provided in order to perform a VIEW permission check."); final RoleRecipient recipient = roleRecipient.get().right().get(); final ConfluenceUser recipientUser = userAccessor.getUserByKey(recipient.getUserKey());