-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEOS-7403] TransactionPlugin can no longer alter transaction items
- Loading branch information
Showing
15 changed files
with
984 additions
and
91 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
47 changes: 47 additions & 0 deletions
47
src/wfs/src/main/java/org/geoserver/wfs/TransactionPlugin2.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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* (c) 2017 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, available at the root | ||
* application directory. | ||
*/ | ||
package org.geoserver.wfs; | ||
|
||
import org.geoserver.platform.ExtensionPriority; | ||
import org.geoserver.wfs.request.TransactionRequest; | ||
import org.geoserver.wfs.request.TransactionResponse; | ||
|
||
|
||
/** | ||
* A transaction plugin is able to listen to a transaction evolution, perform | ||
* checks and throw exceptions, alter transaction requests, as well as | ||
*/ | ||
public interface TransactionPlugin2 extends TransactionListener, ExtensionPriority { | ||
/** | ||
* Check/alter the transaction request elements | ||
*/ | ||
TransactionRequest beforeTransaction(TransactionRequest request) | ||
throws WFSException; | ||
|
||
/** | ||
* Say the last word before we actually commit the transaction | ||
*/ | ||
void beforeCommit(TransactionRequest request) throws WFSException; | ||
|
||
/** | ||
* Notification the transaction ended | ||
* | ||
* @param request | ||
* the originating transaction request | ||
* @param result | ||
* {@code null} if {@code committed == false}, the transaction result object to be | ||
* sent back to the client otherwise. | ||
* | ||
* @param committed | ||
* true if the transaction was successful, false if the transaction was aborted for | ||
* any reason | ||
*/ | ||
void afterTransaction(TransactionRequest request, TransactionResponse result, boolean committed); | ||
|
||
@Override | ||
default int getPriority() { | ||
return ExtensionPriority.LOWEST; | ||
} | ||
} |
Oops, something went wrong.