Skip to content

GSIP 157

Torben Barsballe edited this page Apr 13, 2017 · 11 revisions

GSIP 157 - Track modified properties in CatalogPostModifyEvent

Overview

Proposal to update the CatalogPostModifyEvent (and associated firePostModifed methods) to track changed values, similar to the current implementation of CatalogModifyEvent.

Proposed By

Torben Barsballe

Assigned to Release

This proposal is for GeoServer 2.12-beta.

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

It would be very useful to have access to the list of values that changed during a Catalog operation in the CatalogPostModifyEvent. This proposal would also bring the CatalogPostModifyEvent up to feature-parity with the CatalogModifyEvent.

Proposal

The CatalogModifyEvent tracks the following information:

  • The CatalogInfo object being changed, before the change is applied
  • A list of properties that will be changed, along with there pre-change and post-change values.

The CatalogPostModifyEvent only tracks the CatalogInfo object after the change has been applied.

There are cases where it would be very useful to have access to the list of changed values in the CatalogPostModifyEvent. To this end, I propose updating the CatalogPostModifyEvent to track this changed values, in the same way as the CatalogModifyEvent.

Backwards Compatibility

This change is not Backwards Compatible, as it involves a number of compatibility-breaking API changes:

  • Public methods getPropertyNames,getOldValues,getNewValues added to CatalogPostModifyEvent interface.
  • The arguments List<String> propertyNames, List oldValues, List newValues have been added to the protected methods beforeSaved and afterSaved of AbstractCatalogFacade.

As a consequence of these API changes, the following updated have been made to associate classes and implementations:

  • The arguments List<String> propertyNames, List oldValues, List newValues have been added to the package private method firePostModified of AbstractCatalogDecorator, AbstractFilteredCatalog, CatalogImpl, and SecureCatalogImpl
  • Public methods getPropertyNames, setPropertyNames, getNewValues, setNewValues, getOldValues, setOldValues added to CatalogPostModifyEventImpl.

Feedback

Voting

Project Steering Committee:

  • Alessio Fabiani:
  • Andrea Aime: +1
  • Ben Caradoc-Davies: +1
  • Brad Hards:
  • Christian Mueller:
  • Ian Turton: +1
  • Jody Garnett: +1
  • Jukka Rahkonen:
  • Kevin Smith: +1
  • Simone Giannecchini:

Links

Clone this wiki locally