This is an automated email from the ASF dual-hosted git repository.

mcgilman pushed a commit to branch NIFI-14996
in repository https://gitbox.apache.org/repos/asf/nifi-api.git

commit 2a4275866dde292d5b7c7e67f177333f178d6f43
Author: Matt Gilman <[email protected]>
AuthorDate: Mon Oct 6 09:45:29 2025 -0400

    NIFI-14996: Updating the BulletinRepository API to support methods for 
clearing component bulletins.
---
 .../apache/nifi/reporting/BulletinRepository.java  | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/main/java/org/apache/nifi/reporting/BulletinRepository.java 
b/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
index 1bf5768..62c6f0c 100644
--- a/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
+++ b/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
@@ -16,6 +16,8 @@
  */
 package org.apache.nifi.reporting;
 
+import java.util.Collection;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -106,4 +108,25 @@ public interface BulletinRepository {
      * @return the max ID of any bulletin that has been added, or -1 if no 
bulletins have been added
      */
     long getMaxBulletinId();
+
+    /**
+     * Clears bulletins for the specified component that were created on or 
before the given timestamp.
+     *
+     * @param sourceId the ID of the source component whose bulletins should 
be cleared
+     * @param fromTimestamp the timestamp from which bulletins should be 
cleared (inclusive)
+     * @return the number of bulletins that were cleared
+     * @throws IllegalArgumentException if the sourceId is null or empty or if 
fromTimestamp is null
+     */
+    int clearBulletinsForComponent(String sourceId, Date fromTimestamp) throws 
IllegalArgumentException;
+
+    /**
+     * Clears bulletins for the specified components that were created on or 
before the given timestamp.
+     *
+     * @param sourceIds the collection of source component IDs whose bulletins 
should be cleared
+     * @param fromTimestamp the timestamp from which bulletins should be 
cleared (inclusive)
+     * @return the total number of bulletins that were cleared across all 
specified components
+     * @throws IllegalArgumentException if sourceIds is null or empty, if any 
sourceId is null or empty,
+     *                                  if fromTimestamp is null
+     */
+    int clearBulletinsForComponents(Collection<String> sourceIds, Date 
fromTimestamp) throws IllegalArgumentException;
 }

Reply via email to