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

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

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

origin: org.eclipse.hawkbit/hawkbit-ui

stringBuilder.append(HTML_LI_CLOSE_TAG);
stringBuilder.append(HTML_LI_OPEN_TAG);
stringBuilder.append(" DistributionSet Type : ").append((distributionSet.getType()).getName());
stringBuilder.append(HTML_LI_CLOSE_TAG);
stringBuilder.append(HTML_LI_OPEN_TAG);
origin: eclipse/hawkbit

stringBuilder.append(HTML_LI_CLOSE_TAG);
stringBuilder.append(HTML_LI_OPEN_TAG);
stringBuilder.append(" DistributionSet Type : ").append((distributionSet.getType()).getName());
stringBuilder.append(HTML_LI_CLOSE_TAG);
stringBuilder.append(HTML_LI_OPEN_TAG);
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: 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

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

/**
 * Populate software module table.
 * 
 * @param distributionSet
 */
public void populateModule(final DistributionSet distributionSet) {
  removeAllItems();
  if (distributionSet != null) {
    if (isUnassignSoftModAllowed && permissionChecker.hasUpdateRepositoryPermission()) {
      try {
        isTargetAssigned = false;
      } catch (final EntityReadOnlyException exception) {
        isTargetAssigned = true;
        LOG.info("Target already assigned for the distribution set: " + distributionSet.getName(),
            exception);
      }
    }
    final Set<SoftwareModuleType> swModuleMandatoryTypes = distributionSet.getType().getMandatoryModuleTypes();
    final Set<SoftwareModuleType> swModuleOptionalTypes = distributionSet.getType().getOptionalModuleTypes();
    if (!CollectionUtils.isEmpty(swModuleMandatoryTypes)) {
      swModuleMandatoryTypes.forEach(swModule -> setSwModuleProperties(swModule, true, distributionSet));
    }
    if (!CollectionUtils.isEmpty(swModuleOptionalTypes)) {
      swModuleOptionalTypes.forEach(swModule -> setSwModuleProperties(swModule, false, distributionSet));
    }
    setAmountOfTableRows(getContainerDataSource().size());
  }
}
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

/**
 * Populate software module table.
 * 
 * @param distributionSet
 */
public void populateModule(final DistributionSet distributionSet) {
  removeAllItems();
  if (distributionSet != null) {
    if (isUnassignSoftModAllowed && permissionChecker.hasUpdateRepositoryPermission()) {
      try {
        isTargetAssigned = false;
      } catch (final EntityReadOnlyException exception) {
        isTargetAssigned = true;
        LOG.info("Target already assigned for the distribution set: " + distributionSet.getName(),
            exception);
      }
    }
    final Set<SoftwareModuleType> swModuleMandatoryTypes = distributionSet.getType().getMandatoryModuleTypes();
    final Set<SoftwareModuleType> swModuleOptionalTypes = distributionSet.getType().getOptionalModuleTypes();
    if (!CollectionUtils.isEmpty(swModuleMandatoryTypes)) {
      swModuleMandatoryTypes.forEach(swModule -> setSwModuleProperties(swModule, true, distributionSet));
    }
    if (!CollectionUtils.isEmpty(swModuleOptionalTypes)) {
      swModuleOptionalTypes.forEach(swModule -> setSwModuleProperties(swModule, false, distributionSet));
    }
    setAmountOfTableRows(getContainerDataSource().size());
  }
}
origin: org.eclipse.hawkbit/hawkbit-ui

protected void populateDetails() {
  if (getSelectedBaseEntity() != null) {
    updateDistributionSetDetailsLayout(getSelectedBaseEntity().getType().getName(),
        getSelectedBaseEntity().isRequiredMigrationStep());
  } else {
    updateDistributionSetDetailsLayout(null, null);
  }
}
origin: eclipse/hawkbit

protected void populateDetails() {
  if (getSelectedBaseEntity() != null) {
    updateDistributionSetDetailsLayout(getSelectedBaseEntity().getType().getName(),
        getSelectedBaseEntity().isRequiredMigrationStep());
  } else {
    updateDistributionSetDetailsLayout(null, null);
  }
}
origin: eclipse/hawkbit

static MgmtDistributionSet toResponse(final DistributionSet distributionSet) {
  if (distributionSet == null) {
    return null;
  }
  final MgmtDistributionSet response = new MgmtDistributionSet();
  MgmtRestModelMapper.mapNamedToNamed(response, distributionSet);
  response.setDsId(distributionSet.getId());
  response.setVersion(distributionSet.getVersion());
  response.setComplete(distributionSet.isComplete());
  response.setType(distributionSet.getType().getKey());
  response.setDeleted(distributionSet.isDeleted());
  distributionSet.getModules()
      .forEach(module -> response.getModules().add(MgmtSoftwareModuleMapper.toResponse(module)));
  response.setRequiredMigrationStep(distributionSet.isRequiredMigrationStep());
  response.add(linkTo(methodOn(MgmtDistributionSetRestApi.class).getDistributionSet(response.getDsId()))
      .withSelfRel());
  return response;
}
origin: eclipse/hawkbit

static void addLinks(final DistributionSet distributionSet, final MgmtDistributionSet response) {
  response.add(linkTo(methodOn(MgmtDistributionSetRestApi.class).getAssignedSoftwareModules(response.getDsId(),
      MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE,
      MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE, null))
          .withRel(MgmtRestConstants.DISTRIBUTIONSET_V1_MODULE));
  response.add(linkTo(methodOn(MgmtDistributionSetTypeRestApi.class)
      .getDistributionSetType(distributionSet.getType().getId())).withRel("type"));
  response.add(linkTo(methodOn(MgmtDistributionSetRestApi.class).getMetadata(response.getDsId(),
      MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE,
      MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE, null, null)).withRel("metadata"));
}
origin: org.eclipse.hawkbit/hawkbit-ui

  return false;
if (!ds.getType().containsModuleType(sm.getType())) {
origin: eclipse/hawkbit

  return false;
if (!ds.getType().containsModuleType(sm.getType())) {
origin: eclipse/hawkbit

@Test
@Description("Handles the GET request of retrieving a single distribution set type within SP. Required Permission: READ_REPOSITORY")
public void deleteDistributionSetType() throws Exception {
  final DistributionSetType testType = distributionSetTypeManagement.update(entityFactory.distributionSetType()
      .update(testdataFactory.createDistributionSet().getType().getId()).description("Desc1234"));
  mockMvc.perform(delete(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}",
      testType.getId())).andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
      .andDo(this.document.document(pathParameters(
          parameterWithName("distributionSetTypeId").description(ApiModelPropertiesGeneric.ITEM_ID))));
}
origin: eclipse/hawkbit

@Test
@Description("Handles the GET request of retrieving all distribution set types within SP with a defined page size and offset, sortet by name in descending order and filtered down to all targets which name starts with 'a'. Required Permission: READ_REPOSITORY.")
public void getDistributionSetTypesWithParameters() throws Exception {
  distributionSetTypeManagement.update(entityFactory.distributionSetType()
      .update(testdataFactory.createDistributionSet().getType().getId()).description("Desc1234"));
  mockMvc.perform(get(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING).accept(MediaType.APPLICATION_JSON)
      .param("offset", "1").param("limit", "2").param("sort", "name:DESC").param("q", "name==a*"))
      .andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
      .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
      .andDo(this.document.document(getFilterRequestParamter()));
}
origin: eclipse/hawkbit

public void putDistributionSetType() throws Exception {
  final DistributionSetType testType = distributionSetTypeManagement.update(entityFactory.distributionSetType()
      .update(testdataFactory.createDistributionSet().getType().getId()).description("Desc1234"));
  final String body = new JSONObject().put("description", "an updated desription").toString();
origin: eclipse/hawkbit

@Test
@Description("Handles the GET request of retrieving all distribution set types within SP. Required Permission: READ_REPOSITORY.")
public void getDistributionSetTypes() throws Exception {
  distributionSetTypeManagement.update(entityFactory.distributionSetType()
      .update(testdataFactory.createDistributionSet().getType().getId()).description("Desc1234"));
  mockMvc.perform(
      get(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING).accept(MediaType.APPLICATION_JSON))
      .andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
      .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
      .andExpect(jsonPath("$.total", equalTo(4)))
      .andDo(this.document.document(responseFields(
          fieldWithPath("size").type(JsonFieldType.NUMBER).description(ApiModelPropertiesGeneric.SIZE),
          fieldWithPath("total").description(ApiModelPropertiesGeneric.TOTAL_ELEMENTS),
          fieldWithPath("content").description(MgmtApiModelProperties.TARGET_LIST),
          fieldWithPath("content[].createdBy").description(ApiModelPropertiesGeneric.CREATED_BY),
          fieldWithPath("content[].createdAt").description(ApiModelPropertiesGeneric.CREATED_AT),
          fieldWithPath("content[].description").description(ApiModelPropertiesGeneric.DESCRPTION),
          fieldWithPath("content[].key").description(MgmtApiModelProperties.DS_TYPE_KEY),
          fieldWithPath("content[].id").description(ApiModelPropertiesGeneric.ITEM_ID),
          fieldWithPath("content[].lastModifiedAt")
              .description(ApiModelPropertiesGeneric.LAST_MODIFIED_AT).type("Number"),
          fieldWithPath("content[].lastModifiedBy")
              .description(ApiModelPropertiesGeneric.LAST_MODIFIED_BY).type("String"),
          fieldWithPath("content[].name").description(ApiModelPropertiesGeneric.NAME),
          fieldWithPath("content[]._links.self").ignored())));
}
origin: eclipse/hawkbit

@Test
@Description("Handles the DELETE request for a single distribution set type within SP. Required Permission: DELETE_REPOSITORY.")
public void getDistributionSetType() throws Exception {
  final DistributionSetType testType = distributionSetTypeManagement.update(entityFactory.distributionSetType()
      .update(testdataFactory.createDistributionSet().getType().getId()).description("Desc1234"));
  mockMvc.perform(get(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}",
      testType.getId()).accept(MediaType.APPLICATION_JSON)).andDo(MockMvcResultPrinter.print())
      .andExpect(status().isOk())
      .andDo(this.document.document(
          pathParameters(parameterWithName("distributionSetTypeId")
              .description(ApiModelPropertiesGeneric.ITEM_ID)),
          responseFields(fieldWithPath("createdBy").description(ApiModelPropertiesGeneric.CREATED_BY),
              fieldWithPath("createdAt").description(ApiModelPropertiesGeneric.CREATED_AT),
              fieldWithPath("description").description(ApiModelPropertiesGeneric.DESCRPTION),
              fieldWithPath("key").description(MgmtApiModelProperties.DS_TYPE_KEY),
              fieldWithPath("id").description(ApiModelPropertiesGeneric.ITEM_ID),
              fieldWithPath("lastModifiedAt").description(ApiModelPropertiesGeneric.LAST_MODIFIED_AT)
                  .type("Number"),
              fieldWithPath("lastModifiedBy").description(ApiModelPropertiesGeneric.LAST_MODIFIED_BY)
                  .type("String"),
              fieldWithPath("name").description(ApiModelPropertiesGeneric.NAME),
              fieldWithPath("deleted").description(ApiModelPropertiesGeneric.DELETED),
              fieldWithPath("_links.self").ignored(),
              fieldWithPath("_links.mandatorymodules")
                  .description(MgmtApiModelProperties.LINK_TO_MANDATORY_SMT),
              fieldWithPath("_links.optionalmodules")
                  .description(MgmtApiModelProperties.LINK_TO_OPTIONAL_SMT))));
}
org.eclipse.hawkbit.repository.modelDistributionSetgetType

Popular methods of DistributionSet

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JTable (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best IntelliJ plugins
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