use of de.metas.ui.web.process.json.JSONProcessLayout in project metasfresh-webui-api by metasfresh.
the class ProcessRestController method getLayout.
@RequestMapping(value = "/{processId}/layout", method = RequestMethod.GET)
public ResponseEntity<JSONProcessLayout> getLayout(@PathVariable("processId") final String adProcessIdStr, final WebRequest request) {
userSession.assertLoggedIn();
final ProcessId processId = ProcessId.fromJson(adProcessIdStr);
final IProcessInstancesRepository instancesRepository = getRepository(processId);
final ProcessDescriptor descriptor = instancesRepository.getProcessDescriptor(processId);
return ETagResponseEntityBuilder.ofETagAware(request, descriptor).includeLanguageInETag().cacheMaxAge(userSession.getHttpCacheMaxAge()).map(ProcessDescriptor::getLayout).jsonOptions(() -> newJSONOptions()).toJson(JSONProcessLayout::of);
}
Aggregations