Skip to content

Conversation

@SamuelPalaj
Copy link
Contributor

@SamuelPalaj SamuelPalaj commented Jun 5, 2025

Description

  • extracted email functionality to email plugin

Implements NAE-2112

Name Tested on
OS windows 10
Runtime java 21
Dependency Manager Maven 3.9.9
Framework version Spring Boot 3.4.4
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Summary by CodeRabbit

  • Removed Features

    • User invitation and password reset via email are no longer available.
    • All email sending capabilities, including registration and password reset emails, have been removed.
  • Bug Fixes

    • Email attempt tracking and blocking are no longer present.
  • Documentation

    • Updated or removed documentation to reflect the removal of email-related features.

- extracted email functionality to email plugin
@SamuelPalaj SamuelPalaj self-assigned this Jun 5, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 5, 2025

Walkthrough

This change set removes all mail-related functionality from the application. It deletes all code, configuration, interfaces, and tests involved in email sending, mail attempt tracking, and email template management. All endpoints and methods responsible for sending registration, invitation, and password reset emails are removed or commented out. Associated documentation and test files are also deleted or updated accordingly.

Changes

File(s) / Path(s) Change Summary
application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy Removed all email-related imports, dependencies, and methods; commented out invite user methods.
application-engine/src/main/java/com/netgrif/application/engine/auth/web/AuthenticationController.java Removed email-related imports, dependencies, and endpoints for invitation and password reset.
application-engine/src/main/java/com/netgrif/application/engine/configuration/MailConfiguration.java Deleted mail configuration class and all mail service bean definitions.
application-engine/src/main/java/com/netgrif/application/engine/configuration/drools/RuleEngineGlobalsProvider.java Removed a commented-out mail service import.
application-engine/src/main/java/com/netgrif/application/engine/mail/EmailType.java Deleted the email type enumeration.
application-engine/src/main/java/com/netgrif/application/engine/mail/MailAttemptService.java Deleted mail attempt tracking service class.
application-engine/src/main/java/com/netgrif/application/engine/mail/MailService.java Deleted mail service implementation class.
application-engine/src/main/java/com/netgrif/application/engine/mail/domain/MailDraft.java Deleted mail draft data class.
application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailAttemptService.java Deleted mail attempt service interface.
application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailService.java Deleted mail service interface.
application-engine/src/main/java/com/netgrif/application/engine/mail/throwables/NoEmailTypeDefinedException.java Deleted custom exception for undefined email type.
application-engine/src/main/java/com/netgrif/application/engine/startup/runner/MailRunner.java Deleted mail runner startup component.
application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy Removed unused mail-related imports.
application-engine/src/test/java/com/netgrif/application/engine/MailSenderServiceTest.java Deleted mail sender service test class.
docs/javadoc/com/netgrif/application/engine/mail/... (multiple files) Updated or removed Javadoc references to mail classes and interfaces, reflecting code deletions and relocations.
docs/javadoc/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.html Updated Javadoc parameter type for sendMail method.
docs/javadoc/element-list Removed mail-related package entries from Javadoc element list.

Sequence Diagram(s)

No sequence diagrams are generated because the changes solely remove or comment out mail-related functionality and do not introduce or alter any control flow or feature logic.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🔭 Outside diff range comments (1)
application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy (1)

122-122: 💡 Verification agent

🧩 Analysis chain

Critical compilation error: EmailType reference without import.

The code references EmailType.REGISTRATION.getSubject() but according to the changes, the EmailType import has been removed. This will cause a compilation failure.

Either add the missing import or remove/update this test assertion to not depend on EmailType.


🏁 Script executed:

#!/bin/bash
# Verify if EmailType is still available in the codebase
fd -t f -e java -e groovy | xargs grep -l "enum EmailType\|class EmailType" | head -5
rg "EmailType" application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy -A 2 -B 2

Length of output: 404


Fix missing EmailType reference in AuthenticationControllerTest

The test at line 122 still references EmailType, but that enum no longer exists in the codebase. This will cause a compilation failure. Please update or remove this assertion to use the new email‐subject API.

• File:
application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy
• Line 122 (current):

assert EmailType.REGISTRATION.getSubject().equalsIgnoreCase(message.getSubject())

• Action:
– Replace with a call to the new email-subject provider (e.g. the new enum or service)
– Or remove/update the assertion if the subject is now determined differently

♻️ Duplicate comments (2)
docs/javadoc/com/netgrif/application/engine/mail/domain/MailDraft.MailDraftBuilder.html (1)

122-122: Same inconsistency as MailDraft.html.

This documentation change also shows package relocation rather than removal, which contradicts the stated goal of extracting email functionality into a separate plugin.

Likely an incorrect or invalid review comment.

docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.MailDraftBuilder.html (1)

6-6: Consistent documentation updates showing relocation.

All references to MailDraft.MailDraftBuilder have been updated to reflect the package relocation. However, this continues the pattern of showing class relocation rather than removal, which contradicts the PR's stated goal.

Also applies to: 25-25, 98-98

Likely an incorrect or invalid review comment.

🧹 Nitpick comments (1)
application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy (1)

94-95: Remove unused mail configuration property.

This mail configuration property appears to be unused after the removal of mail functionality and should be cleaned up for consistency with the email plugin extraction.

-    @Value('${nae.mail.from}')
-    private String mailFrom
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb581e3 and 19761ce.

📒 Files selected for processing (22)
  • application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy (1 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/auth/web/AuthenticationController.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/MailConfiguration.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/drools/RuleEngineGlobalsProvider.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/EmailType.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/MailAttemptService.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/MailService.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/domain/MailDraft.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailAttemptService.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailService.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/mail/throwables/NoEmailTypeDefinedException.java (0 hunks)
  • application-engine/src/main/java/com/netgrif/application/engine/startup/runner/MailRunner.java (0 hunks)
  • application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy (1 hunks)
  • application-engine/src/test/java/com/netgrif/application/engine/MailSenderServiceTest.java (0 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/MailService.html (4 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/domain/MailDraft.MailDraftBuilder.html (1 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/domain/MailDraft.html (1 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.MailDraftBuilder.html (3 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html (6 hunks)
  • docs/javadoc/com/netgrif/application/engine/mail/interfaces/IMailService.html (2 hunks)
  • docs/javadoc/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.html (2 hunks)
  • docs/javadoc/element-list (0 hunks)
💤 Files with no reviewable changes (13)
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/drools/RuleEngineGlobalsProvider.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/throwables/NoEmailTypeDefinedException.java
  • docs/javadoc/element-list
  • application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailAttemptService.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/EmailType.java
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/MailConfiguration.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/MailAttemptService.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/interfaces/IMailService.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/domain/MailDraft.java
  • application-engine/src/main/java/com/netgrif/application/engine/startup/runner/MailRunner.java
  • application-engine/src/main/java/com/netgrif/application/engine/auth/web/AuthenticationController.java
  • application-engine/src/main/java/com/netgrif/application/engine/mail/MailService.java
  • application-engine/src/test/java/com/netgrif/application/engine/MailSenderServiceTest.java
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build
🔇 Additional comments (9)
docs/javadoc/com/netgrif/application/engine/mail/domain/MailDraft.html (1)

128-128: Inconsistency: Documentation shows relocation instead of removal.

The PR objectives state that email functionality is being extracted into a separate plugin and the AI summary indicates removal of all mail-related functionality. However, this documentation change shows the MailDraft class being moved to com.netgrif.application.engine.objects.mail package rather than being removed entirely.

#!/bin/bash
# Verify if MailDraft class still exists in the new package location
fd -t f -e java MailDraft | head -10
ast-grep --pattern 'class MailDraft {
  $$$
}'

Likely an incorrect or invalid review comment.

application-engine/src/test/groovy/com/netgrif/application/engine/auth/AuthenticationControllerTest.groovy (1)

10-10: LGTM: Import statement cleanup.

Removed the trailing semicolon from the IUser import statement.

docs/javadoc/com/netgrif/application/engine/mail/MailService.html (2)

517-523: Anchor ID updated correctly for sendMail detail.

The <a id="sendMail(com.netgrif.application.engine.objects.mail.MailDraft)"> now reflects the new fully qualified type. Ensure all summary links target this anchor.


537-543: Anchor ID updated correctly for buildEmail detail.

The <a id="buildEmail(com.netgrif.application.engine.objects.mail.MailDraft)"> matches the summary link. Documentation navigation remains consistent.

docs/javadoc/com/netgrif/application/engine/mail/interfaces/IMailService.html (1)

233-237: Anchor ID updated correctly for sendMail in interface detail.

The <a id="sendMail(com.netgrif.application.engine.objects.mail.MailDraft)"> is accurate. Confirm that the summary table’s link matches this new ID.

docs/javadoc/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.html (1)

6900-6900: Javadoc anchor ID correctly updated
The <a id="sendMail(com.netgrif.application.engine.objects.mail.MailDraft)"> now matches the new package name and aligns with the method signature link.

docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html (3)

6-6: Update confirmed: Title tag now reflects relocated package path
The <title> element has been correctly updated to use com.netgrif.application.engine.objects.mail.MailDraft.


25-25: Update confirmed: JavaScript document title updated
The parent.document.title assignment now matches the new package path.


98-98: Update confirmed: Header <h2> displays new package path
The main header title attribute and text have been updated to com.netgrif.application.engine.objects.mail.MailDraft.

Comment on lines 268 to 272
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Broken link: Inconsistent MailDraft reference in sendMail summary.

Similar to above, the summary for sendMail still links to domain/MailDraft.html and mentions the old package. It must be updated to:

- (<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a> mailDraft)
+ (<a href="../objects/mail/MailDraft.html" title="class in com.netgrif.application.engine.objects.mail.MailDraft">MailDraft</a> mailDraft)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code>
<span class="memberNameLink">
<a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">
sendMail
</a>
</span>&#8203;
(
<a href="../objects/mail/MailDraft.html"
title="class in com.netgrif.application.engine.objects.mail.MailDraft">
MailDraft
</a>&nbsp;mailDraft
)
</code></th>
<td class="colLast">&nbsp;</td>
</tr>
🤖 Prompt for AI Agents
In docs/javadoc/com/netgrif/application/engine/mail/MailService.html around
lines 268 to 272, the sendMail method's summary incorrectly links to the old
package path domain/MailDraft.html for the MailDraft parameter. Update the
hyperlink and any package references to point to the correct, current package
location of MailDraft to fix the broken link and ensure consistency.

Comment on lines 259 to 262
<td class="colFirst"><code>protected javax.mail.internet.MimeMessage</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildEmail(com.netgrif.application.engine.mail.domain.MailDraft)">buildEmail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;draft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildEmail(com.netgrif.application.engine.objects.mail.MailDraft)">buildEmail</a></span>&#8203;(<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;draft)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Broken link: Inconsistent MailDraft reference in buildEmail summary.

The <a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a> still points to the old package. It should reference the relocated class in com.netgrif.application.engine.objects.mail.
Update to something like:

- (<a href="domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a> draft)
+ (<a href="../objects/mail/MailDraft.html" title="class in com.netgrif.application.engine.objects.mail.MailDraft">MailDraft</a> draft)
🤖 Prompt for AI Agents
In docs/javadoc/com/netgrif/application/engine/mail/MailService.html around
lines 259 to 262, the hyperlink for the MailDraft class in the buildEmail method
points to the old package location. Update the href attribute to reference the
new package path com/netgrif/application/engine/objects/mail/MailDraft.html to
ensure the link correctly points to the relocated class.

Comment on lines 153 to 157
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Broken link: Inconsistent MailDraft reference in sendMail summary.

The method signature still links to the old domain/MailDraft.html and package path. It must point to the new location:

- (<a href="../domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a> mailDraft)
+ (<a href="../../objects/mail/MailDraft.html" title="class in com.netgrif.application.engine.objects.mail.MailDraft">MailDraft</a> mailDraft)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row">
<code>
<span class="memberNameLink">
<a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">
sendMail
</a>
</span>&#8203;
(<a href="../../objects/mail/MailDraft.html"
title="class in com.netgrif.application.engine.objects.mail.MailDraft">
MailDraft
</a>&nbsp;mailDraft)
</code>
</th>
<td class="colLast">&nbsp;</td>
</tr>
🤖 Prompt for AI Agents
In docs/javadoc/com/netgrif/application/engine/mail/interfaces/IMailService.html
around lines 153 to 157, the sendMail method's MailDraft link points to the
outdated domain/MailDraft.html path. Update the href attribute in the anchor tag
to reflect the new package path for MailDraft, ensuring the link correctly
references the current location of the MailDraft class in the documentation.

<tr id="i341" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../../../../../mail/domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../../../../../mail/domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Broken MailDraft link: update href and title to new package
The <a href> still points to mail/domain/MailDraft.html and uses the old package in its title. It should reference the new objects/mail path and package.
Apply this diff:

-<a href="../../../../../mail/domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>
+<a href="../../../../../objects/mail/MailDraft.html" title="class in com.netgrif.application.engine.objects.mail.MailDraft">MailDraft</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../../../../../mail/domain/MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../../../../../objects/mail/MailDraft.html" title="class in com.netgrif.application.engine.objects.mail.MailDraft">MailDraft</a>&nbsp;mailDraft)</code></th>
🤖 Prompt for AI Agents
In
docs/javadoc/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.html
at line 2741, the hyperlink for MailDraft uses an outdated href and title
pointing to mail/domain/MailDraft.html and the old package. Update the href
attribute to point to the new path objects/mail/MailDraft.html and change the
title attribute to reflect the new package
com.netgrif.application.engine.objects.mail.domain to fix the broken link.

<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">ActionDelegate.</span><code><span class="memberNameLink"><a href="../../../petrinet/domain/dataset/logic/action/ActionDelegate.html#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">ActionDelegate.</span><code><span class="memberNameLink"><a href="../../../petrinet/domain/dataset/logic/action/ActionDelegate.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix title attribute on MailDraft link
The anchor’s title still references the old package. Please update it to the new path.

-<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>
+<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<th class="colSecond" scope="row"><span class="typeNameLabel">ActionDelegate.</span><code><span class="memberNameLink"><a href="../../../petrinet/domain/dataset/logic/action/ActionDelegate.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">ActionDelegate.</span><code><span class="memberNameLink"><a href="../../../petrinet/domain/dataset/logic/action/ActionDelegate.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>&nbsp;mailDraft)</code></th>
🤖 Prompt for AI Agents
In
docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html
at line 191, the anchor tag's title attribute for the MailDraft link references
an outdated package path. Update the title attribute to reflect the new, correct
package path for MailDraft to ensure accurate documentation links.

<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix title attribute on MailDraft link
The anchor’s title still references the old package. Please update it to the new path.

-<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>
+<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>&nbsp;mailDraft)</code></th>
🤖 Prompt for AI Agents
In
docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html
at line 147, the anchor tag for MailDraft has a `title` attribute pointing to
the old package path. Update the `title` attribute to reflect the new package
path for MailDraft to ensure accurate documentation references.

<tr class="altColor">
<td class="colFirst"><code>protected javax.mail.internet.MimeMessage</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#buildEmail(com.netgrif.application.engine.mail.domain.MailDraft)">buildEmail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;draft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#buildEmail(com.netgrif.application.engine.objects.mail.MailDraft)">buildEmail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;draft)</code></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix title attribute on MailDraft link
The anchor’s title still references the old package. Please update it to the new path.

-<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>
+<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<th class="colSecond" scope="row"><span class="typeNameLabel">MailService.</span><code><span class="memberNameLink"><a href="../../MailService.html#buildEmail(com.netgrif.application.engine.objects.mail.MailDraft)">buildEmail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;draft)</code></th>
<th class="colSecond" scope="row">
<span class="typeNameLabel">MailService.</span>
<code>
<span class="memberNameLink">
<a href="../../MailService.html#buildEmail(com.netgrif.application.engine.objects.mail.MailDraft)">
buildEmail
</a>
</span>&#8203;(
<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">
MailDraft
</a>&nbsp;draft)
</code>
</th>
🤖 Prompt for AI Agents
In
docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html
at line 142, the anchor tag for MailDraft has a title attribute pointing to the
old package path. Update the title attribute to reflect the new package path for
MailDraft to ensure accurate documentation references.

<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><span class="typeNameLabel">IMailService.</span><code><span class="memberNameLink"><a href="../../interfaces/IMailService.html#sendMail(com.netgrif.application.engine.mail.domain.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
<th class="colSecond" scope="row"><span class="typeNameLabel">IMailService.</span><code><span class="memberNameLink"><a href="../../interfaces/IMailService.html#sendMail(com.netgrif.application.engine.objects.mail.MailDraft)">sendMail</a></span>&#8203;(<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>&nbsp;mailDraft)</code></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix title attribute on MailDraft link
The anchor’s title still references the old package. Please update it to the new path.

-<a href="../MailDraft.html" title="class in com.netgrif.application.engine.mail.domain">MailDraft</a>
+<a href="../MailDraft.html" title="class in com.netgrif.application.engine.objects.mail">MailDraft</a>
🤖 Prompt for AI Agents
In
docs/javadoc/com/netgrif/application/engine/mail/domain/class-use/MailDraft.html
at line 169, the anchor tag for MailDraft has a title attribute referencing the
old package path. Update the title attribute to reflect the new package path for
MailDraft to ensure accurate documentation links.

Comment on lines +1294 to +1310
// MessageResource inviteUser(String email) {
// NewUserRequest newUserRequest = new NewUserRequest()
// newUserRequest.email = email
// newUserRequest.groups = new HashSet<>()
// newUserRequest.processRoles = new HashSet<>()
// return inviteUser(newUserRequest)
// }
//
// MessageResource inviteUser(NewUserRequest newUserRequest) {
// IUser user = registrationService.createNewUser(newUserRequest)
// if (user == null)
// return MessageResource.successMessage("Done")
// mailService.sendRegistrationEmail(user)
//
// mailAttemptService.mailAttempt(newUserRequest.email)
// return MessageResource.successMessage("Done")
// }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove commented-out code that references deleted services.

The commented-out inviteUser methods reference mailService and mailAttemptService that have been removed as part of the email functionality extraction. This dead code should be removed entirely rather than left commented out.

-//    MessageResource inviteUser(String email) {
-//        NewUserRequest newUserRequest = new NewUserRequest()
-//        newUserRequest.email = email
-//        newUserRequest.groups = new HashSet<>()
-//        newUserRequest.processRoles = new HashSet<>()
-//        return inviteUser(newUserRequest)
-//    }
-//
-//    MessageResource inviteUser(NewUserRequest newUserRequest) {
-//        IUser user = registrationService.createNewUser(newUserRequest)
-//        if (user == null)
-//            return MessageResource.successMessage("Done")
-//        mailService.sendRegistrationEmail(user)
-//
-//        mailAttemptService.mailAttempt(newUserRequest.email)
-//        return MessageResource.successMessage("Done")
-//    }

If invitation functionality is needed in the future with the email plugin, these methods should be reimplemented to work with the new plugin architecture rather than restored from commented code.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// MessageResource inviteUser(String email) {
// NewUserRequest newUserRequest = new NewUserRequest()
// newUserRequest.email = email
// newUserRequest.groups = new HashSet<>()
// newUserRequest.processRoles = new HashSet<>()
// return inviteUser(newUserRequest)
// }
//
// MessageResource inviteUser(NewUserRequest newUserRequest) {
// IUser user = registrationService.createNewUser(newUserRequest)
// if (user == null)
// return MessageResource.successMessage("Done")
// mailService.sendRegistrationEmail(user)
//
// mailAttemptService.mailAttempt(newUserRequest.email)
// return MessageResource.successMessage("Done")
// }
🤖 Prompt for AI Agents
In
application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy
between lines 1294 and 1310, remove the entire block of commented-out inviteUser
methods that reference mailService and mailAttemptService, as these services
have been removed and the code is now dead. Delete this commented code
completely to clean up the file, and if invitation functionality is needed
later, reimplement it using the new email plugin architecture instead of
restoring this old code.

@machacjozef machacjozef changed the base branch from release/7.0.0-rev2 to release/7.0.0-rev4 July 8, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants