-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.5
-
Component/s: Layouts & Widgets
-
Tags:
-
Impact type:API added
For the Android Client, I would like to reuse the Widgets and Layouts definitions.
The idea is to leverage Studio ability to generate custom layouts and have Android Client transparently benefit from it.
JAXRS Resource
There is current a JAXRS resource ( WebLayoutResource ) that can be used to export JSON definition of the Widgets.
In order to make this more consistent, I would like to refactor so that :
- the WebLayoutResource exports LayoutDefinitions
- the WidgetResource exports WidgetDefinitions
=> rename the existing resource and create a new one
NB : The other solution would be to put everything in the same resource, but I would be messy
LayoutDefinition export scope
Most of the code is already there in JSONLayoutExporter.
But there are some needed changes :
Also export WidgetDefinition that is not part of the Layout
Currently for Layout that don't include a Local definition of the Widget, the WidgetDefinition is not exported.
=> I guess we must refetch it from WebLayoutManager instead of throwing an exception
Extend scope of the export
At least from the Android Client point of view, there are some additional informations that would be needed :
- translate the labels from the server side
- export flatten vocabularies with translations for directory widgets