@@ -189,7 +189,7 @@ private void getFeatures(final RoutingContext context, List<String> ids, ApiResp
189189 * Creates or replaces a feature.
190190 */
191191 private void putFeature (final RoutingContext context ) throws HttpException {
192- if (Config . instance . USE_WRITE_FEATURES_EVENT )
192+ if (useWFE ( context ) )
193193 executeWriteFeatures (context , FEATURE ,
194194 toFeatureModificationList (readFeature (context ).withId (getFeatureId (context )), IfNotExists .CREATE , IfExists .REPLACE ,
195195 ConflictResolution .ERROR ), getSpaceContext (context ));
@@ -198,6 +198,10 @@ private void putFeature(final RoutingContext context) throws HttpException {
198198 ConflictResolution .ERROR );
199199 }
200200
201+ private boolean useWFE (RoutingContext context ) {
202+ return Config .instance .USE_WRITE_FEATURES_EVENT && getSpaceId (context ).contains ("drgnstn" );
203+ }
204+
201205 private FeatureModificationList toFeatureModificationList (Feature feature , IfNotExists ifNotExists , IfExists ifExists ,
202206 ConflictResolution conflictResolution ) {
203207 return toFeatureModificationList (new FeatureCollection ().withFeatures (List .of (feature )), ifNotExists , ifExists , conflictResolution );
@@ -230,7 +234,7 @@ private FeatureModificationList toFeatureModificationList(List<String> featureId
230234 */
231235 private void putFeatures (final RoutingContext context ) throws HttpException {
232236 ApiResponseType responseType = getEmptyResponseTypeOr (context , FEATURE_COLLECTION );
233- if (Config . instance . USE_WRITE_FEATURES_EVENT )
237+ if (useWFE ( context ) )
234238 executeWriteFeatures (context , responseType ,
235239 toFeatureModificationList (readFeatureOrFeatureCollection (context ), IfNotExists .CREATE , IfExists .REPLACE , ConflictResolution .ERROR ),
236240 getSpaceContext (context ));
@@ -366,7 +370,7 @@ private Future<Void> updateContentUpdatedAt(Marker marker, Space space) {
366370 * Patches a feature
367371 */
368372 private void patchFeature (final RoutingContext context ) throws HttpException {
369- if (Config . instance . USE_WRITE_FEATURES_EVENT )
373+ if (useWFE ( context ) )
370374 executeWriteFeatures (context , FEATURE ,
371375 toFeatureModificationList (readFeature (context ).withId (getFeatureId (context )), IfNotExists .RETAIN , PATCH , ConflictResolution .ERROR ),
372376 getSpaceContext (context ));
@@ -385,7 +389,7 @@ private void postFeatures(final RoutingContext context) throws HttpException {
385389 ApiResponseType responseType = getEmptyResponseTypeOr (context , FEATURE_COLLECTION );
386390 String contentType = context .parsedHeaders ().contentType ().value ();
387391
388- if (Config . instance . USE_WRITE_FEATURES_EVENT ) {
392+ if (useWFE ( context ) ) {
389393 FeatureModificationList featureModificationList = APPLICATION_VND_HERE_FEATURE_MODIFICATION_LIST .equals (contentType )
390394 ? readFeatureModificationList (context , ifExists , ifNotExists , conflictResolution )
391395 : toFeatureModificationList (readFeatureOrFeatureCollection (context ), ifNotExists , ifExists , conflictResolution );
@@ -404,7 +408,7 @@ private void deleteFeature(final RoutingContext context) throws HttpException {
404408 String featureId = context .pathParam (Path .FEATURE_ID );
405409 final SpaceContext spaceContext = getSpaceContext (context );
406410
407- if (Config . instance . USE_WRITE_FEATURES_EVENT )
411+ if (useWFE ( context ) )
408412 executeDeleteFeatures (context , EMPTY , List .of (featureId ), spaceContext , true );
409413 else
410414 executeConditionalOperationChain (true , context , ApiResponseType .EMPTY , IfExists .DELETE , IfNotExists .RETAIN ,
@@ -426,7 +430,7 @@ private void deleteFeatures(final RoutingContext context) throws HttpException {
426430 sendErrorResponse (context , new DetailedHttpException ("E318406" ));
427431 else {
428432 //Delete features by IDs
429- if (Config . instance . USE_WRITE_FEATURES_EVENT && !eraseContent )
433+ if (useWFE ( context ) && !eraseContent )
430434 executeDeleteFeatures (context , responseType , featureIds , spaceContext , false );
431435 else
432436 executeConditionalOperationChain (false , context , responseType , IfExists .DELETE , IfNotExists .RETAIN , true ,
0 commit comments