Search in sources :

Example 1 with UsageInfo

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);
}
Also used : EntityReference(org.finos.waltz.model.EntityReference) UsageInfo(org.finos.waltz.model.usage_info.UsageInfo)

Aggregations

EntityReference (org.finos.waltz.model.EntityReference)1 UsageInfo (org.finos.waltz.model.usage_info.UsageInfo)1