use of de.metas.ui.web.view.json.JSONViewLayout in project metasfresh-webui-api by metasfresh.
the class ViewRestController method getViewLayout.
@GetMapping("/layout")
public ResponseEntity<JSONViewLayout> getViewLayout(@PathVariable(PARAM_WindowId) final String windowIdStr, @RequestParam(name = PARAM_ViewDataType, required = true) final JSONViewDataType viewDataType, @RequestParam(name = "profileId", required = false) final String profileIdStr, final WebRequest request) {
userSession.assertLoggedIn();
final WindowId windowId = WindowId.fromJson(windowIdStr);
final ViewLayout viewLayout = viewsRepo.getViewLayout(windowId, viewDataType, ViewProfileId.fromJson(profileIdStr));
return ETagResponseEntityBuilder.ofETagAware(request, viewLayout).includeLanguageInETag().cacheMaxAge(userSession.getHttpCacheMaxAge()).jsonOptions(() -> newJSONOptions()).toJson(JSONViewLayout::of);
}
Aggregations