Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support workspace-based methods getStyles, getStyleNames #61

Closed
bernardvb0101 opened this issue Apr 20, 2023 · 6 comments
Closed

Support workspace-based methods getStyles, getStyleNames #61

bernardvb0101 opened this issue Apr 20, 2023 · 6 comments
Assignees
Milestone

Comments

@bernardvb0101
Copy link

bernardvb0101 commented Apr 20, 2023

These 3 commands:
styles <- gsman$getStyles()
stylenames <- gsman$getStyleNames()
style <- gsman$getStyle("capitals")

The above only return the "default" (pre-installed) styles that are on geoserver. The new styles that were created by the user do not show up when you for instance use this:

"stylenames <- gsman$getStyleNames()"

There are styles that I created on my instance of geoserver but these new styles are not included in the list returned by the "stylenames" variable (the new styles I created are associated with a workspace). Only the standard/default styles that come pre-installed with geoserver are part of the list returned by the "stylenames" variable.

So I am doing something wrong here or is it a bug?

@bernardvb0101 bernardvb0101 changed the title Styles command only work on styles that don't have a workspace and datastore Styles commands (getsStyles, getStyleNames, getStyle) only work on styles that don't have a workspace associated with them. Apr 20, 2023
@eblondel eblondel self-assigned this Apr 25, 2023
@eblondel eblondel added this to the 0.6 milestone Apr 25, 2023
@eblondel
Copy link
Owner

Thanks @bernardvb0101 indeed we miss these methods. I'll look at it ASAP

@eblondel eblondel changed the title Styles commands (getsStyles, getStyleNames, getStyle) only work on styles that don't have a workspace associated with them. Support workspace-based methods getStyles, getStyleNames Apr 25, 2023
eblondel added a commit that referenced this issue Apr 25, 2023
@eblondel
Copy link
Owner

I've pushed some code to support ws parameter in getStyles, and getStyleNames. For getStyle however this parameter was already supported.

@bernardvb0101
Copy link
Author

bernardvb0101 commented Apr 25, 2023 via email

@eblondel
Copy link
Owner

@bernardvb0101 were you able to test this new feature? can we close this?

@bernardvb0101
Copy link
Author

@eblondel Thank you! I have tested it and it works fine now. So the use is to do this and then it works as expected:
styles <- gsman$getStyles(ws="YourworkspaceName")
stylenames <- gsman$getStyleNames(ws="YourworkspaceName")

@kikislater
Copy link

Could be use to test platform as well. Some Geoserver's version doesn't have a valid generic style which could cause error during import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants