Thoughts on ways to enhance the Post Processing Model
The post processors are defined so that custom operations can be implemented by an implementer.
The List of modifications, may or may not reflect any changes that have taken place as part of a series of SlingPostProcessor interactions. Any changes that occur in a Processor SHOULD be reflected in the list, but the list itself is utilized as an abstraction for reporting.
PostResponse is populated with what the Operation believes should be sent as a response. If the Operation is accurately trying to reflect what was modified it would use the List of modifications which it receives after calling all of the SlingPostProcessors which in themselves do not guarantee an accurate reporting of everything that was modified.
Why is this a problem? Let's say I want to have add a SlingPostProcessor that does one of the following
Each SlingPostProcessor and each PostOperation is responsible for modifying the repository. ** expound on this **
Change the List<Modification> from a list of what occurred to a list of what needs to be done. This would have the Post Operation iterate through the Post Processors and then, as a final step, take the list of modifications and execute those steps to the ResourceProvider.
A modification may not want to be transmitted back to the end requestor. If I have a service which is tracking changes, I may not want the data that I am adding be reported back. Therefore the Modification object should be able to track whether the modification should be reported