tlaverty wrote:
> I'm trying to wriite a WFS transaction plugin to determine the 'damaged' area
> as a result of the transaction. I've got a prototype version that does what
> I need, but it's tightly coupled to the core WFS code (in Transaction.java).
> I'm trying to move the logic into a proper pluging (in the beforeTransaction
> and afterTransaction event handlers). These event handlers are passed a
> TransactionType.
> 
> I've been able to get much of what I need from the transactiontype, but now
> I need to access the same store (postgres) that will be used for the
> transaction. It looks to me like the key is to be able to access the
> 'catalog' and catalog.getFeatureTypeInfo. I've looked at code in vain to see
> how I get access to this context from within my handler, can someone please
> provide an hint?

Well, since your plugin is declared in Spring, you can add a dependency
to the "catalog" bean declared in the main module spring context, which
  is the catalog (the spring beans declared in each module are available
to all other modules to use).

However, I'm not sure why you want to access the store, that might not
be a good idea, if there is any feature type transformation in the pipe,
accessing the store directly will bypass it. As a rule of thumb always
try to use FeatureSource/FeatureStore instead (so access the 
featuretypeinfo and then grab the feature source, eventually cast to
FeatureStore if you need write access).

Cheers
Andrea

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to