@Override public ResponseEntity<Void> assignSoftwareModules(@PathVariable("distributionSetId") final Long distributionSetId, @RequestBody final List<MgmtSoftwareModuleAssigment> softwareModuleIDs) { distributionSetManagement.assignSoftwareModules(distributionSetId, softwareModuleIDs.stream().map(MgmtSoftwareModuleAssigment::getId).collect(Collectors.toList())); return ResponseEntity.ok().build(); }
private void saveAllAssignments() { manageDistUIState.getAssignedList().forEach((distIdName, softIdNameSet) -> { final List<Long> softIds = softIdNameSet.stream().map(SoftwareModuleIdName::getId) .collect(Collectors.toList()); distributionSetManagement.assignSoftwareModules(distIdName.getId(), softIds); }); int count = 0; for (final Entry<DistributionSetIdName, Set<SoftwareModuleIdName>> entry : manageDistUIState .getAssignedList().entrySet()) { count += entry.getValue().size(); } getNotification().displaySuccess(getI18n().getMessage("message.software.assignment", count)); resetState(); getEventBus().publish(this, SaveActionWindowEvent.SAVED_ASSIGNMENTS); }
private void saveAllAssignments() { manageDistUIState.getAssignedList().forEach((distIdName, softIdNameSet) -> { final List<Long> softIds = softIdNameSet.stream().map(SoftwareModuleIdName::getId) .collect(Collectors.toList()); distributionSetManagement.assignSoftwareModules(distIdName.getId(), softIds); }); int count = 0; for (final Entry<DistributionSetIdName, Set<SoftwareModuleIdName>> entry : manageDistUIState .getAssignedList().entrySet()) { count += entry.getValue().size(); } getNotification().displaySuccess(getI18n().getMessage("message.software.assignment", count)); resetState(); getEventBus().publish(this, SaveActionWindowEvent.SAVED_ASSIGNMENTS); }