use of de.metas.ui.web.window.datatypes.json.JSONQuickInputLayoutDescriptor in project metasfresh-webui-api by metasfresh.
the class WindowQuickInputRestController method getLayout.
@GetMapping("/layout")
public JSONQuickInputLayoutDescriptor getLayout(//
@PathVariable("windowId") final String windowIdStr, //
@PathVariable("documentId") final String documentIdStr_NOTUSED, //
@PathVariable("tabId") final String tabIdStr) {
userSession.assertLoggedIn();
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentEntityDescriptor includedDocumentDescriptor = documentsCollection.getDocumentEntityDescriptor(windowId).getIncludedEntityByDetailId(DetailId.fromJson(tabIdStr));
final QuickInputDescriptor quickInputDescriptor = quickInputDescriptors.getQuickInputEntityDescriptor(includedDocumentDescriptor);
if (quickInputDescriptor == null) {
return null;
}
final QuickInputLayoutDescriptor layout = quickInputDescriptor.getLayout();
return JSONQuickInputLayoutDescriptor.fromNullable(layout, newJSONOptions());
}
Aggregations