Пример #1
0
 private void showOrHidePopupAndNotification(final String message) {
   if (null != managementUIState.getAssignedList()
       && !managementUIState.getAssignedList().isEmpty()) {
     eventBus.publish(this, ManagementUIEvent.UPDATE_COUNT);
   }
   if (null != message) {
     uiNotification.displayValidationError(message);
   }
 }
Пример #2
0
 private String validate(
     final Set<TargetIdName> targetDetailsList,
     final DistributionSetIdName distributionSetIdName) {
   String pendingActionMessage = null;
   for (final TargetIdName trgtNameId : targetDetailsList) {
     if (null != trgtNameId) {
       if (managementUIState.getAssignedList().keySet().contains(trgtNameId)
           && managementUIState.getAssignedList().get(trgtNameId).equals(distributionSetIdName)) {
         pendingActionMessage =
             getPendingActionMessage(
                 pendingActionMessage,
                 trgtNameId.getControllerId(),
                 HawkbitCommonUtil.getDistributionNameAndVersion(
                     distributionSetIdName.getName(), distributionSetIdName.getVersion()));
       } else {
         managementUIState.getAssignedList().put(trgtNameId, distributionSetIdName);
       }
     }
   }
   return pendingActionMessage;
 }