Well, it looks like it was un-deprecated in 2019
<https://github.com/geoserver/geoserver/commit/9acd9939f6e2452d69432c277b525af3d1f4f500#diff-edeb363841a79844713af33cb2bfa7e1d44441e1e7ed348fddb4e8a7b81fdd51L37-L44>
but still nobody calls it. For me it's ok if we have a single extension to
listen to reloads (GeoServerLifecycleHandler), especially cause
implementers just need to supply a spring bean and not manually add the
listener to the catalog.
Just wondering if someone ever noticed these CatalogListeners implementing
`reloaded()` will never be called.

git show 9acd9939f6e2452d69432c277b525af3d1f4f500 -- `find . -name
CatalogListener.java`
commit 9acd9939f6e2452d69432c277b525af3d1f4f500
Author: Andrea Aime <andrea.a...@gmail.com>
Date:   Sun Apr 28 15:14:56 2019 +0200

    Deprecated API checkpoint on main, more deprecated API yet to remove

diff --git
a/src/main/src/main/java/org/geoserver/catalog/event/CatalogListener.java
b/src/main/src/main/java/org/geoserver/catalog/event/CatalogListener.java
index 6dba393d702..c3d28df435b 100644
---
a/src/main/src/main/java/org/geoserver/catalog/event/CatalogListener.java
+++
b/src/main/src/main/java/org/geoserver/catalog/event/CatalogListener.java
@@ -34,12 +34,6 @@ public interface CatalogListener {
     /** Handles the event of a post modification to an object in the
catalog. */
     void handlePostModifyEvent(CatalogPostModifyEvent event) throws
CatalogException;

-    /**
-     * A callback notifying when GeoServer configuration has been reloaded.
-     *
-     * <p>This method will be removed in recent version as the idea of a
"reload" will not exist.
-     *
-     * @deprecated.
-     */
+    /** A callback notifying when GeoServer configuration has been
reloaded. */
     void reloaded();
 }

*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Gabriel Roldán*
Geospatial Developer



On Mon, May 20, 2024 at 1:30 AM Jody Garnett <jody.garn...@gmail.com> wrote:

> What does happen on catalogue reload? can we restore the event?
>
> --
> Jody Garnett
>
>
> On Sun, May 19, 2024 at 5:27 PM Gabriel Roldan <
> gabriel.rol...@camptocamp.com> wrote:
>
>> Hey all,
>>
>> tried to live-test a CatalogListener.reloaded() implementation, turns out
>> I can't find any caller in the codebase:
>>
>> grep "\.reloaded()" -R --include=*.java
>> wms/src/test/java/org/geoserver/wms/capabilities/GetCapabilitiesLegendURLTest.java:
>>        ((LegendSampleImpl)
>> GeoServerExtensions.bean(LegendSample.class)).reloaded();
>>
>> Is it supposed to be replaced by GeoServerLifecycleHandler.onReload(), or
>> at some point we stopped calling it?
>> There seems to be a couple implementations out there with non-empty
>> bodies:
>> - LayerGroupContainmentCache$CatalogChangeListener
>> - LegendSampleImpl
>> - MimeTypeCacheClearingListener
>> - WFSConfiguration'\s anonymous inner class
>>
>>
>> TIA,
>> gabe
>> *camptocamp*
>> INNOVATIVE SOLUTIONS
>> BY OPEN SOURCE EXPERTS
>>
>> *Gabriel Roldán*
>> Geospatial Developer
>>
>> _______________________________________________
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
>
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to