Tabnine Logo
DistributionSet.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.eclipse.hawkbit.repository.model.DistributionSet

Best Java code snippets using org.eclipse.hawkbit.repository.model.DistributionSet.getName (Showing top 20 results out of 315)

origin: eclipse/hawkbit

@Override
protected String getDeletedEntityName(final Long entityId) {
  final Optional<DistributionSet> distribution = distributionSetManagement.get(entityId);
  if (distribution.isPresent()) {
    return distribution.get().getName();
  }
  return "";
}
origin: eclipse/hawkbit

@Override
protected String getDeletedEntityName(final Long entityId) {
  final Optional<DistributionSet> distribution = distributionSetManagement.get(entityId);
  if (distribution.isPresent()) {
    return distribution.get().getName();
  }
  return "";
}
origin: org.eclipse.hawkbit/hawkbit-ui

@Override
protected String getDeletedEntityName(final Long entityId) {
  final Optional<DistributionSet> distribution = distributionSetManagement.get(entityId);
  if (distribution.isPresent()) {
    return distribution.get().getName();
  }
  return "";
}
origin: org.eclipse.hawkbit/hawkbit-ui

@Override
protected String getDeletedEntityName(final Long entityId) {
  final Optional<DistributionSet> distribution = distributionSetManagement.get(entityId);
  if (distribution.isPresent()) {
    return distribution.get().getName();
  }
  return "";
}
origin: org.eclipse.hawkbit/hawkbit-ui

/**
 * Constructor.
 * 
 * @param distributionSet
 *            the distributionSet
 */
public DistributionSetIdName(final DistributionSet distributionSet) {
  this(distributionSet.getId(), distributionSet.getName(), distributionSet.getVersion());
}
origin: eclipse/hawkbit

/**
 * Constructor.
 * 
 * @param distributionSet
 *            the distributionSet
 */
public DistributionSetIdName(final DistributionSet distributionSet) {
  this(distributionSet.getId(), distributionSet.getName(), distributionSet.getVersion());
}
origin: org.eclipse.hawkbit/hawkbit-ui

private void handleSmToDsAssignment(final Set<Long> softwareModulesIdList, final long distId) {
  final Optional<DistributionSet> distributionSet = distributionSetManagement.get(distId);
  if (!distributionSet.isPresent()) {
    getNotification().displayWarning(getI18n().getMessage("distributionset.not.exists"));
    return;
  }
  distributionSet.ifPresent(ds -> {
    selectDroppedEntities(ds.getId());
    final Set<SoftwareModule> softwareModules = getAssignableSoftwareModules(softwareModulesIdList, ds);
    if (softwareModules.isEmpty()) {
      return;
    }
    assignSoftwareModulesToDs(softwareModules, ds);
    openConfirmationWindowForAssignment(ds.getName(),
        softwareModules.stream().map(SoftwareModuleIdName::new)
            .toArray(size -> new SoftwareModuleIdName[size]));
  });
}
origin: eclipse/hawkbit

private void handleSmToDsAssignment(final Set<Long> softwareModulesIdList, final long distId) {
  final Optional<DistributionSet> distributionSet = distributionSetManagement.get(distId);
  if (!distributionSet.isPresent()) {
    getNotification().displayWarning(getI18n().getMessage("distributionset.not.exists"));
    return;
  }
  distributionSet.ifPresent(ds -> {
    selectDroppedEntities(ds.getId());
    final Set<SoftwareModule> softwareModules = getAssignableSoftwareModules(softwareModulesIdList, ds);
    if (softwareModules.isEmpty()) {
      return;
    }
    assignSoftwareModulesToDs(softwareModules, ds);
    openConfirmationWindowForAssignment(ds.getName(),
        softwareModules.stream().map(SoftwareModuleIdName::new)
            .toArray(size -> new SoftwareModuleIdName[size]));
  });
}
origin: eclipse/hawkbit

public static String distributionSetUpdateValidFieldsOnly(final DistributionSet set) throws JSONException {
  set.getModules().stream().map(module -> {
    try {
      return new JSONObject().put("id", module.getId());
    } catch (final JSONException e) {
      e.printStackTrace();
      return null;
    }
  }).collect(Collectors.toList());
  return new JSONObject().put("name", set.getName()).put("description", set.getDescription())
      .put("version", set.getVersion()).put("requiredMigrationStep", set.isRequiredMigrationStep())
      .toString();
}
origin: org.eclipse.hawkbit/hawkbit-ui

private void populateValuesOfDistribution(final Long editDistId) {
  final Optional<DistributionSet> distSet = distributionSetManagement.getWithDetails(editDistId);
  if (!distSet.isPresent()) {
    return;
  }
  distNameTextField.setValue(distSet.get().getName());
  distVersionTextField.setValue(distSet.get().getVersion());
  if (distSet.get().getType().isDeleted()) {
    distsetTypeNameComboBox.addItem(distSet.get().getType().getId());
  }
  distsetTypeNameComboBox.setValue(distSet.get().getType().getId());
  distsetTypeNameComboBox.setEnabled(false);
  reqMigStepCheckbox.setValue(distSet.get().isRequiredMigrationStep());
  descTextArea.setValue(distSet.get().getDescription());
}
origin: eclipse/hawkbit

private void populateValuesOfDistribution(final Long editDistId) {
  final Optional<DistributionSet> distSet = distributionSetManagement.getWithDetails(editDistId);
  if (!distSet.isPresent()) {
    return;
  }
  distNameTextField.setValue(distSet.get().getName());
  distVersionTextField.setValue(distSet.get().getVersion());
  if (distSet.get().getType().isDeleted()) {
    distsetTypeNameComboBox.addItem(distSet.get().getType().getId());
  }
  distsetTypeNameComboBox.setValue(distSet.get().getType().getId());
  distsetTypeNameComboBox.setEnabled(false);
  reqMigStepCheckbox.setValue(distSet.get().isRequiredMigrationStep());
  descTextArea.setValue(distSet.get().getDescription());
}
origin: eclipse/hawkbit

public static JSONObject distributionSetCreateValidFieldsOnly(final DistributionSet set) throws JSONException {
  final List<JSONObject> modules = set.getModules().stream().map(module -> {
    try {
      return new JSONObject().put("id", module.getId());
    } catch (final JSONException e) {
      e.printStackTrace();
      return null;
    }
  }).collect(Collectors.toList());
  return new JSONObject().put("name", set.getName()).put("description", set.getDescription())
      .put("type", set.getType() == null ? null : set.getType().getKey()).put("version", set.getVersion())
      .put("requiredMigrationStep", set.isRequiredMigrationStep()).put("modules", new JSONArray(modules));
}
origin: eclipse/hawkbit

public static JSONObject distributionSet(final DistributionSet set) throws JSONException {
  final List<JSONObject> modules = set.getModules().stream().map(module -> {
    try {
      return new JSONObject().put("id", module.getId());
    } catch (final JSONException e) {
      e.printStackTrace();
      return null;
    }
  }).collect(Collectors.toList());
  return new JSONObject().put("name", set.getName()).put("description", set.getDescription())
      .put("type", set.getType() == null ? null : set.getType().getKey()).put("id", Long.MAX_VALUE)
      .put("version", set.getVersion()).put("createdAt", "0").put("updatedAt", "0")
      .put("createdBy", "fghdfkjghdfkjh").put("updatedBy", "fghdfkjghdfkjh")
      .put("requiredMigrationStep", set.isRequiredMigrationStep()).put("modules", new JSONArray(modules));
}
origin: org.eclipse.hawkbit/hawkbit-ui

private void assignTargetToDs(final Item item, final List<Target> targetDetailsList) {
  if (item == null || item.getItemProperty("id") == null) {
    return;
  }
  if (targetDetailsList.isEmpty()) {
    getNotification().displayWarning(getI18n().getMessage(TARGETS_NOT_EXISTS));
    return;
  }
  final Long distId = (Long) item.getItemProperty("id").getValue();
  selectDroppedEntities(distId);
  final Optional<DistributionSet> findDistributionSetById = distributionSetManagement.get(distId);
  if (!findDistributionSetById.isPresent()) {
    getNotification().displayWarning(getI18n().getMessage(DISTRIBUTIONSET_NOT_EXISTS));
    return;
  }
  addNewDistributionToAssignmentList(targetDetailsList, findDistributionSetById.get());
  openConfirmationWindowForAssignment(findDistributionSetById.get().getName(), targetDetailsList);
}
origin: org.eclipse.hawkbit/hawkbit-ui

private void populateDistributionDtls(final VerticalLayout layout, final DistributionSet distributionSet) {
  layout.removeAllComponents();
  layout.addComponent(SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("label.dist.details.name"),
      distributionSet == null ? "" : distributionSet.getName()));
  layout.addComponent(
      SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("label.dist.details.version"),
          distributionSet == null ? "" : distributionSet.getVersion()));
  if (distributionSet == null) {
    return;
  }
  distributionSet.getModules()
      .forEach(module -> layout.addComponent(getSWModlabel(module.getType().getName(), module)));
}
origin: eclipse/hawkbit

private void populateDistributionDtls(final VerticalLayout layout, final DistributionSet distributionSet) {
  layout.removeAllComponents();
  layout.addComponent(SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("label.dist.details.name"),
      distributionSet == null ? "" : distributionSet.getName()));
  layout.addComponent(
      SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("label.dist.details.version"),
          distributionSet == null ? "" : distributionSet.getVersion()));
  if (distributionSet == null) {
    return;
  }
  distributionSet.getModules()
      .forEach(module -> layout.addComponent(getSWModlabel(module.getType().getName(), module)));
}
origin: org.eclipse.hawkbit/hawkbit-ui

@Override
public void saveOrUpdate() {
  final String name = distNameTextField.getValue();
  final String version = distVersionTextField.getValue();
  final Long distSetTypeId = (Long) distsetTypeNameComboBox.getValue();
  final String desc = descTextArea.getValue();
  final boolean isMigStepReq = reqMigStepCheckbox.getValue();
  final DistributionSetType distributionSetType = distributionSetTypeManagement.get(distSetTypeId)
      .orElseThrow(() -> new EntityNotFoundException(DistributionSetType.class, distSetTypeId));
  final DistributionSet newDist = distributionSetManagement
      .create(entityFactory.distributionSet().create().name(name).version(version).description(desc)
          .type(distributionSetType).requiredMigrationStep(isMigStepReq));
  eventBus.publish(this, new DistributionTableEvent(BaseEntityEventType.ADD_ENTITY, newDist));
  notificationMessage.displaySuccess(i18n.getMessage("message.new.dist.save.success",
      new Object[] { newDist.getName(), newDist.getVersion() }));
  distributionSetTable.setValue(Sets.newHashSet(newDist.getId()));
}
origin: eclipse/hawkbit

@Override
public void saveOrUpdate() {
  if (isDuplicate(editDistId)) {
    return;
  }
  final boolean isMigStepReq = reqMigStepCheckbox.getValue();
  final Long distSetTypeId = (Long) distsetTypeNameComboBox.getValue();
  distributionSetTypeManagement.get(distSetTypeId).ifPresent(type -> {
    final DistributionSet currentDS = distributionSetManagement.update(entityFactory.distributionSet()
        .update(editDistId).name(distNameTextField.getValue()).description(descTextArea.getValue())
        .version(distVersionTextField.getValue()).requiredMigrationStep(isMigStepReq));
    notificationMessage.displaySuccess(i18n.getMessage("message.new.dist.save.success",
        new Object[] { currentDS.getName(), currentDS.getVersion() }));
    // update table row+details layout
    eventBus.publish(this, new DistributionTableEvent(BaseEntityEventType.UPDATED_ENTITY, currentDS));
  });
}
origin: eclipse/hawkbit

private void unassignSW(final ClickEvent event, final DistributionSet distributionSet,
    final Set<SoftwareModule> alreadyAssignedSwModules) {
  final SoftwareModule unAssignedSw = getSoftwareModule(event.getButton().getId(), alreadyAssignedSwModules);
  if (distributionSetManagement.isInUse(distributionSet.getId())) {
    uiNotification.displayValidationError(i18n.getMessage("message.error.notification.ds.target.assigned",
        distributionSet.getName(), distributionSet.getVersion()));
  } else {
    final DistributionSet newDistributionSet = distributionSetManagement
        .unassignSoftwareModule(distributionSet.getId(), unAssignedSw.getId());
    manageDistUIState.setLastSelectedEntityId(newDistributionSet.getId());
    eventBus.publish(this, new DistributionTableEvent(BaseEntityEventType.SELECTED_ENTITY, newDistributionSet));
    eventBus.publish(this, DistributionsUIEvent.ORDER_BY_DISTRIBUTION);
    uiNotification.displaySuccess(i18n.getMessage("message.sw.unassigned", unAssignedSw.getName()));
  }
}
origin: org.eclipse.hawkbit/hawkbit-ui

private void unassignSW(final ClickEvent event, final DistributionSet distributionSet,
    final Set<SoftwareModule> alreadyAssignedSwModules) {
  final SoftwareModule unAssignedSw = getSoftwareModule(event.getButton().getId(), alreadyAssignedSwModules);
  if (distributionSetManagement.isInUse(distributionSet.getId())) {
    uiNotification.displayValidationError(i18n.getMessage("message.error.notification.ds.target.assigned",
        distributionSet.getName(), distributionSet.getVersion()));
  } else {
    final DistributionSet newDistributionSet = distributionSetManagement
        .unassignSoftwareModule(distributionSet.getId(), unAssignedSw.getId());
    manageDistUIState.setLastSelectedEntityId(newDistributionSet.getId());
    eventBus.publish(this, new DistributionTableEvent(BaseEntityEventType.SELECTED_ENTITY, newDistributionSet));
    eventBus.publish(this, DistributionsUIEvent.ORDER_BY_DISTRIBUTION);
    uiNotification.displaySuccess(i18n.getMessage("message.sw.unassigned", unAssignedSw.getName()));
  }
}
org.eclipse.hawkbit.repository.modelDistributionSetgetName

Popular methods of DistributionSet

  • getModules
  • getId
  • getType
  • getVersion
  • isRequiredMigrationStep
  • findFirstModuleByType
  • getDescription
  • isComplete
  • getAutoAssignFilters
  • getCreatedAt
  • getLastModifiedAt
  • getTenant
  • getLastModifiedAt,
  • getTenant,
  • isDeleted

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now