Skip to content

Commit

Permalink
add post event
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Oct 14, 2024
1 parent bc69a0e commit 269e7c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@

import java.util.Map;
import org.apache.gravitino.annotation.DeveloperApi;
import org.apache.gravitino.exceptions.ValidateException;
import org.apache.gravitino.exceptions.ForbiddenException;
import org.apache.gravitino.listener.api.event.PostEvent;
import org.apache.gravitino.listener.api.event.Event;
import org.apache.gravitino.listener.api.event.PreEvent;

/**
Expand Down Expand Up @@ -108,6 +109,7 @@ enum Mode {
*/
default void onPostEvent(PostEvent postEvent) throws RuntimeException {}

default void onPostEvent(Event postEvent) throws RuntimeException {}
/**
* Handles pre events generated before the operation.
*
Expand All @@ -116,10 +118,10 @@ default void onPostEvent(PostEvent postEvent) throws RuntimeException {}
* to SYNC to process pre events.
*
* @param preEvent The pre event to be processed.
* @throws ValidateException The operation will be skipped if and only if throwing
* ValidateException, the other exception will be ignored.
* @throws ForbiddenException The operation will be skipped if and only if throwing {@code
* org.apache.gravitino.exceptions.ForbiddenException}, the other exception will be ignored.
*/
default void onPreEvent(PreEvent preEvent) throws ValidateException {}
default void onPreEvent(PreEvent preEvent) throws ForbiddenException {}

/**
* Specifies the default operational mode for event processing by the plugin. The default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.apache.commons.lang3.StringUtils;
import org.apache.gravitino.UserPrincipal;
import org.apache.gravitino.audit.FilesetAuditConstants;
Expand Down

0 comments on commit 269e7c6

Please sign in to comment.