What we mean is modifying SecureObjects.secure to take
an additional class parameter. So that when a reader implements both
FeatureIterator and Iterator the calling code is explicit as to what wrapper
it wants. Ie.

SecureObjects.secure(it, policy)

Goes to:

SecureObjects.secure(it, policy, FeatureIterator.class)

That way the SecuredObjectFactory implementations don't have to guess as to
what interface the client wants to wrap. Look at DefaultSecuredDataFactory
to see what I mean.

However, as Andrea stated a less invasive solution would just be to modify
SecuredIterator so that it implements both Iterator and FeatureIterator. And
then we would remove SecuredFeatureIterator. And i guess the same would go
for SimpleFeatureIterator as well.

All in all the second solution is going to be the most straight forward so
it's probably your best bet.

Hope that helps.

-Justin

On Tue, Apr 12, 2011 at 3:46 AM, <[email protected]> wrote:

> Hi Andrea , I am unsure by what you mean by passing down the interface.
>
>
>
> Would you be able to be more specific? I am unsure how the code works as i
> was not able to replicate the issue on my local machine J
>
>
>
> I tried the following
>
>
>
> return (FeatureIterator)
> SecuredObjects.secure((FeatureIterator)delegate.features(), policy);
>
>
>
>    FeatureCollection
> fc=(FeatureCollection)SecuredObjects.secure(delegate.features(), policy);
>
>         return fc.features();
>
>
>
> both to no avail.
>
>
>
> I am just taking shots in the dark.  Once again thanks :D
>
>
>
> IMappingFeatureIterator extends Iterator<Feature>, FeatureIterator<Feature>
>
>
>
> This might be the cause but I am unsure why it would cause an error casting
> to FeatureIterator.
>
>
>
>
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of
> *Andrea Aime
> *Sent:* Monday, 11 April 2011 11:58 PM
> *To:* Justin Deoliveira
> *Cc:* Tey, Victor (CESRE, Kensington); Geotools-Devel list
> *Subject:* Re: [Geotools-devel] ava.lang.ClassCastException:
> org.geoserver.security.decorators.SecuredIterator
>
>
>
> On Mon, Apr 11, 2011 at 4:39 PM, Justin Deoliveira <[email protected]>
> wrote:
>
> Hi Victor,
>
>
>
> I believe this is a more specifically a geoserver issue... you should
> probably move the conversation there. As for the fix I still think modifying
> the SecuredObject* interfaces in geoserver to explicitly pass down the
> interface is the most robust option. But that is something for discussion on
> geoserver-devel.
>
>
>
> Passing down the interface might be an option, another one could be a
> security wrapper that implements
>
> both interfaces, so that we don't even have to decide
>
>
>
> Cheers
>
> Andrea
>
>
>
>
> --
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
>
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584 962313
> fax:      +39 0584 962313
> mob:    +39 333 8128928
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -------------------------------------------------------
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to