I believe changing workspace is allowed via UI right? If so, I don't see a reason to disallow from REST, provided it ends up behaving the same (see if the UI code moves only the style or also the symbols associated).
Cheers Andrea On Thu, Jul 11, 2019 at 10:43 AM Niels Charlier <[email protected]> wrote: > Hello, > > At the moment it is not possible to change the workspace of a style with > a REST put request. This is explicitly prevented by a block of code: > > > https://github.com/geoserver/geoserver/blob/master/src/restconfig/src/main/java/org/geoserver/rest/catalog/StyleController.java#L474 > > However, when this check is removed, it seems to work fine to change the > workspace of a style this way. After all this is already allowed in the > GUI, which does nothing special to implement it. It is the low level > GeoServerResourcePersister that handles moving all the files to a > different directory when a style workspace is changed. This is why it > works fine with rest too. > > So, could the block of code preventing this perhaps be removed? > > One issue is however that is not possible to remove the workspace from a > style. The rest services only changes specified properties, ignoring > nulls, so it is not possible to change something back to null via the > rest in general I think. > > Kind Regards > > Niels > > > > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- *Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.*
_______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
