private ActiveWidgetLayoutResponse getResponse(WidgetLayoutEntity layoutEntity) throws SystemException {
    String clusterName = null;
    try {
      clusterName = getManagementController().getClusters().getClusterById(layoutEntity.getClusterId()).getClusterName();
    } catch (AmbariException e) {
      throw new SystemException(e.getMessage());
    }
    List<HashMap<String,WidgetResponse>> widgets = new ArrayList<>();
    List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = layoutEntity.getListWidgetLayoutUserWidgetEntity();
    for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : widgetLayoutUserWidgetEntityList) {
      WidgetEntity widgetEntity = widgetLayoutUserWidgetEntity.getWidget();
      HashMap<String, WidgetResponse> widgetInfoMap = new HashMap<>();
      widgetInfoMap.put("WidgetInfo",WidgetResponse.coerce(widgetEntity));
      widgets.add(widgetInfoMap);
    }
   return  new ActiveWidgetLayoutResponse(layoutEntity.getId(), clusterName, layoutEntity.getDisplayName(), layoutEntity.getLayoutName(),
      layoutEntity.getSectionName(), layoutEntity.getScope(), layoutEntity.getUserName(),  widgets);
  }
Returns the response for the active widget layout that should be returned for the active widget layout REST endpoint
@param layoutEntity {@link WidgetLayoutEntity}
@return  {@link ActiveWidgetLayoutResponse}
@throws SystemException
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java