use of org.finos.waltz.model.usage_info.UsageInfo in project waltz by khartec.
the class DataTypeUsageEndpoint method saveRoute.
private List<DataTypeUsage> saveRoute(Request request, Response response) throws IOException {
WebUtilities.requireRole(userRoleService, request, SystemRole.LOGICAL_DATA_FLOW_EDITOR);
String user = WebUtilities.getUsername(request);
EntityReference ref = WebUtilities.getEntityReference(request);
Long dataTypeId = WebUtilities.getLong(request, "typeId");
UsageInfo[] usages = WebUtilities.readBody(request, UsageInfo[].class);
dataTypeUsageService.save(ref, dataTypeId, newArrayList(usages), user);
return dataTypeUsageService.findForEntityAndDataType(ref, dataTypeId);
}
Aggregations