On Tue, Jul 15, 2014 at 8:29 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> On Tue, Jul 15, 2014 at 4:26 PM, Justin Deoliveira <
> jdeol...@boundlessgeo.com> wrote:
>
>> I looked briefly at this and unfortunately I didn't think it was that
>> trivial. Basically we would need to side step the normal restconfig
>> "DataFormat" classes, but at the same time we probably still want to parse
>> the style to ensure it is valid. Which to do cleanly we would have to load
>> the entire request payload into a buffer (be it memory or file or both) so
>> we can read it twice. Which I guess isn't a big deal since styles are
>> generally not huge documents.
>>
>> All in all I would prefer to defer on this for now. But I will try to
>> find some time in the next few days to try out a patch, and if it does turn
>> out to be straight forward perhaps we can consider including it.
>>
>> Acceptable?
>>
>>
> Sure. I was really just thinking about a "reformat" or "prettyprint" url
> parameter in the request that
> would be used to check if we want to just parse and check if the style is
> well formed, or
> if we want to take the parsed version and rewrite the style to pretty
> print it while we save it
> on disk (in POST/PUT requests, that is)
>
> OK, so what I ended up doing was adding a parameter named "raw" to
PUT/POST requests. Defaulting to false but when set to true simply streams
the style payload directly to disk:


https://github.com/jdeolive/geoserver/blob/style-plug/doc/en/user/source/rest/api/styles.rst#raw

Does that sound ok?


> Cheers
> Andrea
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>



-- 
Justin Deoliveira
VP Engineering | Boundless <http://boundlessgeo.com/>
jdeol...@boundlessgeo.com
@boundlessgeo <http://twitter.com/boundlessgeo/>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to