-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gerald Unterrainer
committed
Aug 12, 2021
1 parent
156e1bb
commit 0ab94e6
Showing
9 changed files
with
50 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
src/main/java/info/unterrainer/commons/httpserver/extensions/delegates/PostDeleteAsync.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package info.unterrainer.commons.httpserver.extensions.delegates; | ||
|
||
import info.unterrainer.commons.httpserver.extensions.AsyncExtensionContext; | ||
import info.unterrainer.commons.rdbutils.entities.BasicJpa; | ||
|
||
public interface PostDeleteAsync { | ||
public interface PostDeleteAsync<P extends BasicJpa> { | ||
|
||
/** | ||
* Allows you to execute code after the deletion of an item. | ||
* <p> | ||
* Since this is asynchronous changing the DTOs will do nothing (runs in | ||
* parallel and the action probably already happened when your code is | ||
* executed). | ||
* | ||
* | ||
* @param asyncCtx a context containing values that have been mapped using | ||
* AsyncExtensionContextMappers | ||
* @param receivedId the ID of the item that was deleted | ||
* @param deletedJpa the JPA that was deleted | ||
*/ | ||
void handle(AsyncExtensionContext asyncCtx, Long receivedId); | ||
void handle(AsyncExtensionContext asyncCtx, Long receivedId, P deletedJpa); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
src/main/java/info/unterrainer/commons/httpserver/extensions/delegates/PreDeleteAsync.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package info.unterrainer.commons.httpserver.extensions.delegates; | ||
|
||
import info.unterrainer.commons.httpserver.extensions.AsyncExtensionContext; | ||
import info.unterrainer.commons.rdbutils.entities.BasicJpa; | ||
|
||
public interface PreDeleteAsync { | ||
public interface PreDeleteAsync<P extends BasicJpa> { | ||
|
||
/** | ||
* Allows you to execute code before deletion of an item. | ||
* <p> | ||
* Since this is asynchronous changing the DTOs will do nothing (runs in | ||
* parallel and the action probably already happened when your code is | ||
* executed). | ||
* | ||
* @param asyncCtx a context containing values that have been mapped using | ||
* AsyncExtensionContextMappers | ||
* @param receivedId the ID of the item that is about to get deleted | ||
* | ||
* @param asyncCtx a context containing values that have been mapped using | ||
* AsyncExtensionContextMappers | ||
* @param receivedId the ID of the item that is about to get deleted | ||
* @param jpaToDelete the JPA to delete | ||
*/ | ||
void handle(AsyncExtensionContext asyncCtx, Long receivedId); | ||
void handle(AsyncExtensionContext asyncCtx, Long receivedId, P jpaToDelete); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters