[Geoserver-devel] GeoServerNodeInfo outside of wicket UI

Hi folks,

I have a need where I would like to get access to data provided via GEOSERVER_NODE_OPTS but in a module that doesn’t depend on the UI modules. Currently it looks like all the infrastructure for parsing and representing the parameter lives in the web modules. While I could just add a dependency on web-core I was thinking it potentially made sense to move some of that stuff info main.

What I am thinking is this:

  • Introduce an interface named something like GeoServerNodeData that would be the “data object” for the properties stored in the node opts parameter. It would also come with a default implementation that does all the non-UI bits of what DefaultGeoServerNodeInfo does now.

  • Update GeoServerNodeInfo adding an accessor to get at the “node data”. Something like:

      interface GeoServerNodeInfo {
          GeoServerNodeData getData();
      }
    
    
  • Update GeoServerNodeInfo.getId() to call through to getData(), and/or perhaps deprecate it?

      interface GeoServerNodeInfo {
          default String getId() {
             return getData().getId();
          }
      }
    
    

Does that make sense? If folks are ok with the idea I’ll whip up a patch. I am happy to do a proposal as well but I think the changes for this one should be pretty minimal and non-distruptive.

Thanks!

-Justin

That sounds fine, you just need this at the java level right, no rest api access for node info.

···

On 30 January 2017 at 08:23, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi folks,

I have a need where I would like to get access to data provided via GEOSERVER_NODE_OPTS but in a module that doesn’t depend on the UI modules. Currently it looks like all the infrastructure for parsing and representing the parameter lives in the web modules. While I could just add a dependency on web-core I was thinking it potentially made sense to move some of that stuff info main.

What I am thinking is this:

  • Introduce an interface named something like GeoServerNodeData that would be the “data object” for the properties stored in the node opts parameter. It would also come with a default implementation that does all the non-UI bits of what DefaultGeoServerNodeInfo does now.

  • Update GeoServerNodeInfo adding an accessor to get at the “node data”. Something like:

      interface GeoServerNodeInfo {
          GeoServerNodeData getData();
      }
    
    
  • Update GeoServerNodeInfo.getId() to call through to getData(), and/or perhaps deprecate it?

      interface GeoServerNodeInfo {
          default String getId() {
             return getData().getId();
          }
      }
    
    

Does that make sense? If folks are ok with the idea I’ll whip up a patch. I am happy to do a proposal as well but I think the changes for this one should be pretty minimal and non-distruptive.

Thanks!

-Justin


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.com.366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

Hey Jody,

Correct, I just need it at the java level, no apis required at this time.

-Justin

···


Jody Garnett

On 30 January 2017 at 08:23, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi folks,

I have a need where I would like to get access to data provided via GEOSERVER_NODE_OPTS but in a module that doesn’t depend on the UI modules. Currently it looks like all the infrastructure for parsing and representing the parameter lives in the web modules. While I could just add a dependency on web-core I was thinking it potentially made sense to move some of that stuff info main.

What I am thinking is this:

  • Introduce an interface named something like GeoServerNodeData that would be the “data object” for the properties stored in the node opts parameter. It would also come with a default implementation that does all the non-UI bits of what DefaultGeoServerNodeInfo does now.

  • Update GeoServerNodeInfo adding an accessor to get at the “node data”. Something like:

      interface GeoServerNodeInfo {
          GeoServerNodeData getData();
      }
    
    
  • Update GeoServerNodeInfo.getId() to call through to getData(), and/or perhaps deprecate it?

      interface GeoServerNodeInfo {
          default String getId() {
             return getData().getId();
          }
      }
    
    

Does that make sense? If folks are ok with the idea I’ll whip up a patch. I am happy to do a proposal as well but I think the changes for this one should be pretty minimal and non-distruptive.

Thanks!

-Justin


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Excellent - bring it on :slight_smile:

···

On 30 January 2017 at 08:23, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi folks,

I have a need where I would like to get access to data provided via GEOSERVER_NODE_OPTS but in a module that doesn’t depend on the UI modules. Currently it looks like all the infrastructure for parsing and representing the parameter lives in the web modules. While I could just add a dependency on web-core I was thinking it potentially made sense to move some of that stuff info main.

What I am thinking is this:

  • Introduce an interface named something like GeoServerNodeData that would be the “data object” for the properties stored in the node opts parameter. It would also come with a default implementation that does all the non-UI bits of what DefaultGeoServerNodeInfo does now.

  • Update GeoServerNodeInfo adding an accessor to get at the “node data”. Something like:

      interface GeoServerNodeInfo {
          GeoServerNodeData getData();
      }
    
    
  • Update GeoServerNodeInfo.getId() to call through to getData(), and/or perhaps deprecate it?

      interface GeoServerNodeInfo {
          default String getId() {
             return getData().getId();
          }
      }
    
    

Does that make sense? If folks are ok with the idea I’ll whip up a patch. I am happy to do a proposal as well but I think the changes for this one should be pretty minimal and non-distruptive.

Thanks!

-Justin


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.com.366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

You asked for it :stuck_out_tongue:

https://github.com/geoserver/geoserver/pull/2079

···


Jody Garnett

On 30 January 2017 at 08:23, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi folks,

I have a need where I would like to get access to data provided via GEOSERVER_NODE_OPTS but in a module that doesn’t depend on the UI modules. Currently it looks like all the infrastructure for parsing and representing the parameter lives in the web modules. While I could just add a dependency on web-core I was thinking it potentially made sense to move some of that stuff info main.

What I am thinking is this:

  • Introduce an interface named something like GeoServerNodeData that would be the “data object” for the properties stored in the node opts parameter. It would also come with a default implementation that does all the non-UI bits of what DefaultGeoServerNodeInfo does now.

  • Update GeoServerNodeInfo adding an accessor to get at the “node data”. Something like:

      interface GeoServerNodeInfo {
          GeoServerNodeData getData();
      }
    
    
  • Update GeoServerNodeInfo.getId() to call through to getData(), and/or perhaps deprecate it?

      interface GeoServerNodeInfo {
          default String getId() {
             return getData().getId();
          }
      }
    
    

Does that make sense? If folks are ok with the idea I’ll whip up a patch. I am happy to do a proposal as well but I think the changes for this one should be pretty minimal and non-distruptive.

Thanks!

-Justin


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel