Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From JSONObject to classes serialized with Jackson. Work-in-progress etc. The idea is that LayerOutput could be used for data included in listing while LayerExtendedOutput could be used to add more metadata for the listing. Similar thing is currently done for the admin-layereditor backend with https://github.com/oskariorg/oskari-server/blob/master/service-map/src/main/java/org/oskari/maplayer/model/MapLayerAdminOutput.java
Now that we have cleared out the old admin functionalities we can concentrate on what OpenLayers and the "end-user" needs for the layers instead of throwing in everything to accommodate using the same layer object for both admin and "normal" users. This would allow us to streamline OskariLayer class, possible get rid of OskariLayerWorker and make the response format easier to see from the code (improving developer experience).
We might need to work even more on reducing the output and move things around since there are some things that rely on having options or attributes for layerlisting BUT they can be a HUGE json-fragment with vector styles included etc that are mostly only needed when the layer is actually added to the map (not when it's being listed for users to choose from).
Note! After oskariorg/oskari-frontend#2222 we should be able to remove even more things from layer listing and get the values from DescribeLayer when the layer is added to map.