docs: public static void saveAllAssignments(final ManagementUIState managementUIState,
              final ActionTypeOptionGroupAssignmentLayout actionTypeOptionGroupLayout,
              final MaintenanceWindowLayout maintenanceWindowLayout, final DeploymentManagement deploymentManagement,
              final UINotification notification, final UIEventBus eventBus, final VaadinMessageSource i18n,
              final Object eventSource) {
          final Set<TargetIdName> itemIds = managementUIState.getAssignedList().keySet();
          Long distId;
          List<TargetIdName> targetIdSetList;
          List<TargetIdName> tempIdList;
          final ActionType actionType = ((AbstractActionTypeOptionGroupLayout.ActionTypeOption) actionTypeOptionGroupLayout
                  .getActionTypeOptionGroup().getValue()).getActionType();
          final long forcedTimeStamp = actionTypeOptionGroupLayout.getActionTypeOptionGroup()
                  .getValue() == AbstractActionTypeOptionGroupLayout.ActionTypeOption.AUTO_FORCED
                          ? actionTypeOptionGroupLayout.getForcedTimeDateField().getValue().getTime()
                          : RepositoryModelConstants.NO_FORCE_TIME;
  
          final Map<Long, List<TargetIdName>> saveAssignedList = Maps.newHashMapWithExpectedSize(itemIds.size());
  
          for (final TargetIdName itemId : itemIds) {
              final DistributionSetIdName distitem = managementUIState.getAssignedList().get(itemId);
              distId = distitem.getId();
  
              if (saveAssignedList.containsKey(distId)) {
                  targetIdSetList = saveAssignedList.get(distId);
              } else {
                  targetIdSetList = new ArrayList<>();
              }
              targetIdSetList.add(itemId);
              saveAssignedList.put(distId, targetIdSetList);
          }
  
          final String maintenanceSchedule = maintenanceWindowLayout.getMaintenanceSchedule();
          final String maintenanceDuration = maintenanceWindowLayout.getMaintenanceDuration();
          final String maintenanceTimeZone = maintenanceWindowLayout.getMaintenanceTimeZone();
  
          for (final Map.Entry<Long, List<TargetIdName>> mapEntry : saveAssignedList.entrySet()) {
              tempIdList = saveAssignedList.get(mapEntry.getKey());
              final DistributionSetAssignmentResult distributionSetAssignmentResult = deploymentManagement
                      .assignDistributionSet(mapEntry.getKey(),
                              tempIdList.stream().map(t -> maintenanceWindowLayout.isEnabled()
                                      ? new TargetWithActionType(t.getControllerId(), actionType, forcedTimeStamp,
                                              maintenanceSchedule, maintenanceDuration, maintenanceTimeZone)
                                      : new TargetWithActionType(t.getControllerId(), actionType, forcedTimeStamp))
                                      .collect(Collectors.toList()));
              if (distributionSetAssignmentResult.getAssigned() > 0) {
                  notification.displaySuccess(
                          i18n.getMessage("message.target.assignment", distributionSetAssignmentResult.getAssigned()));
              }
              if (distributionSetAssignmentResult.getAlreadyAssigned() > 0) {
                  notification.displaySuccess(i18n.getMessage("message.target.alreadyAssigned",
                          distributionSetAssignmentResult.getAlreadyAssigned()));
              }
          }
          refreshPinnedDetails(saveAssignedList, managementUIState, eventBus, eventSource);
          managementUIState.getAssignedList().clear();
          notification.displaySuccess(i18n.getMessage("message.target.ds.assign.success"));
          eventBus.publish(eventSource, SaveActionWindowEvent.SAVED_ASSIGNMENTS);
      }