repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/HawkbitUIErrorHandler.java | HawkbitUIErrorHandler.buildNotification | protected HawkbitErrorNotificationMessage buildNotification(final Throwable ex) {
LOG.error("Error in UI: ", ex);
final String errorMessage = extractMessageFrom(ex);
final VaadinMessageSource i18n = SpringContextHelper.getBean(VaadinMessageSource.class);
return new HawkbitErrorNotific... | java | protected HawkbitErrorNotificationMessage buildNotification(final Throwable ex) {
LOG.error("Error in UI: ", ex);
final String errorMessage = extractMessageFrom(ex);
final VaadinMessageSource i18n = SpringContextHelper.getBean(VaadinMessageSource.class);
return new HawkbitErrorNotific... | [
"protected",
"HawkbitErrorNotificationMessage",
"buildNotification",
"(",
"final",
"Throwable",
"ex",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Error in UI: \"",
",",
"ex",
")",
";",
"final",
"String",
"errorMessage",
"=",
"extractMessageFrom",
"(",
"ex",
")",
";",
... | Method to build a notification based on an exception.
@param ex
the throwable
@return a hawkbit error notification message | [
"Method",
"to",
"build",
"a",
"notification",
"based",
"on",
"an",
"exception",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/HawkbitUIErrorHandler.java#L98-L106 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSoftwareModuleManagement.java | JpaSoftwareModuleManagement.assertMetaDataQuota | private void assertMetaDataQuota(final Long moduleId, final int requested) {
final int maxMetaData = quotaManagement.getMaxMetaDataEntriesPerSoftwareModule();
QuotaHelper.assertAssignmentQuota(moduleId, requested, maxMetaData, SoftwareModuleMetadata.class,
SoftwareModule.class, softwareM... | java | private void assertMetaDataQuota(final Long moduleId, final int requested) {
final int maxMetaData = quotaManagement.getMaxMetaDataEntriesPerSoftwareModule();
QuotaHelper.assertAssignmentQuota(moduleId, requested, maxMetaData, SoftwareModuleMetadata.class,
SoftwareModule.class, softwareM... | [
"private",
"void",
"assertMetaDataQuota",
"(",
"final",
"Long",
"moduleId",
",",
"final",
"int",
"requested",
")",
"{",
"final",
"int",
"maxMetaData",
"=",
"quotaManagement",
".",
"getMaxMetaDataEntriesPerSoftwareModule",
"(",
")",
";",
"QuotaHelper",
".",
"assertAs... | Asserts the meta data quota for the software module with the given ID.
@param moduleId
The software module ID.
@param requested
Number of meta data entries to be created. | [
"Asserts",
"the",
"meta",
"data",
"quota",
"for",
"the",
"software",
"module",
"with",
"the",
"given",
"ID",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSoftwareModuleManagement.java#L548-L552 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/specifications/ActionSpecifications.java | ActionSpecifications.hasTargetAssignedArtifact | public static Specification<JpaAction> hasTargetAssignedArtifact(final String controllerId, final String sha1Hash) {
return (actionRoot, query, criteriaBuilder) -> {
final Join<JpaAction, JpaDistributionSet> dsJoin = actionRoot.join(JpaAction_.distributionSet);
final SetJoin<JpaDistribut... | java | public static Specification<JpaAction> hasTargetAssignedArtifact(final String controllerId, final String sha1Hash) {
return (actionRoot, query, criteriaBuilder) -> {
final Join<JpaAction, JpaDistributionSet> dsJoin = actionRoot.join(JpaAction_.distributionSet);
final SetJoin<JpaDistribut... | [
"public",
"static",
"Specification",
"<",
"JpaAction",
">",
"hasTargetAssignedArtifact",
"(",
"final",
"String",
"controllerId",
",",
"final",
"String",
"sha1Hash",
")",
"{",
"return",
"(",
"actionRoot",
",",
"query",
",",
"criteriaBuilder",
")",
"->",
"{",
"fin... | Specification which joins all necessary tables to retrieve the dependency
between a target and a local file assignment through the assigned action
of the target. All actions are included, not only active actions.
@param controllerId
the target to verify if the given artifact is currently
assigned or had been assigned
... | [
"Specification",
"which",
"joins",
"all",
"necessary",
"tables",
"to",
"retrieve",
"the",
"dependency",
"between",
"a",
"target",
"and",
"a",
"local",
"file",
"assignment",
"through",
"the",
"assigned",
"action",
"of",
"the",
"target",
".",
"All",
"actions",
"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/specifications/ActionSpecifications.java#L51-L61 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/AbstractMetadataPopupLayout.java | AbstractMetadataPopupLayout.getWindow | public CommonDialogWindow getWindow(final E entity, final String metaDatakey) {
selectedEntity = entity;
metadataWindow = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getMetadataCaption())
.content(this).cancelButtonClickListener(event -> onCancel())
.... | java | public CommonDialogWindow getWindow(final E entity, final String metaDatakey) {
selectedEntity = entity;
metadataWindow = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getMetadataCaption())
.content(this).cancelButtonClickListener(event -> onCancel())
.... | [
"public",
"CommonDialogWindow",
"getWindow",
"(",
"final",
"E",
"entity",
",",
"final",
"String",
"metaDatakey",
")",
"{",
"selectedEntity",
"=",
"entity",
";",
"metadataWindow",
"=",
"new",
"WindowBuilder",
"(",
"SPUIDefinitions",
".",
"CREATE_UPDATE_WINDOW",
")",
... | Returns metadata popup.
@param entity
entity for which metadata data is displayed
@param metaDatakey
metadata key to be selected
@return {@link CommonDialogWindow} | [
"Returns",
"metadata",
"popup",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/AbstractMetadataPopupLayout.java#L131-L145 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/upload/UploadProgressButtonLayout.java | UploadProgressButtonLayout.restoreState | public void restoreState() {
if (artifactUploadState.areAllUploadsFinished()) {
artifactUploadState.clearUploadTempData();
hideUploadProgressButton();
upload.setEnabled(true);
} else if (artifactUploadState.isAtLeastOneUploadInProgress()) {
showUploadProgr... | java | public void restoreState() {
if (artifactUploadState.areAllUploadsFinished()) {
artifactUploadState.clearUploadTempData();
hideUploadProgressButton();
upload.setEnabled(true);
} else if (artifactUploadState.isAtLeastOneUploadInProgress()) {
showUploadProgr... | [
"public",
"void",
"restoreState",
"(",
")",
"{",
"if",
"(",
"artifactUploadState",
".",
"areAllUploadsFinished",
"(",
")",
")",
"{",
"artifactUploadState",
".",
"clearUploadTempData",
"(",
")",
";",
"hideUploadProgressButton",
"(",
")",
";",
"upload",
".",
"setE... | Is called when view is shown to the user | [
"Is",
"called",
"when",
"view",
"is",
"shown",
"to",
"the",
"user"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/upload/UploadProgressButtonLayout.java#L165-L173 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/ConfirmationDialog.java | ConfirmationDialog.buttonClick | @Override
public void buttonClick(final ClickEvent event) {
if (window.getParent() != null) {
isImplicitClose = true;
UI.getCurrent().removeWindow(window);
}
callback.response(event.getSource().equals(okButton));
} | java | @Override
public void buttonClick(final ClickEvent event) {
if (window.getParent() != null) {
isImplicitClose = true;
UI.getCurrent().removeWindow(window);
}
callback.response(event.getSource().equals(okButton));
} | [
"@",
"Override",
"public",
"void",
"buttonClick",
"(",
"final",
"ClickEvent",
"event",
")",
"{",
"if",
"(",
"window",
".",
"getParent",
"(",
")",
"!=",
"null",
")",
"{",
"isImplicitClose",
"=",
"true",
";",
"UI",
".",
"getCurrent",
"(",
")",
".",
"remo... | TenantAwareEvent handler for button clicks.
@param event
the click event. | [
"TenantAwareEvent",
"handler",
"for",
"button",
"clicks",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/ConfirmationDialog.java#L295-L302 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java | AbstractTable.getTableValue | @SuppressWarnings("unchecked")
public static <T> Set<T> getTableValue(final Table table) {
final Object value = table.getValue();
Set<T> idsReturn;
if (value == null) {
idsReturn = Collections.emptySet();
} else if (value instanceof Collection) {
final Collect... | java | @SuppressWarnings("unchecked")
public static <T> Set<T> getTableValue(final Table table) {
final Object value = table.getValue();
Set<T> idsReturn;
if (value == null) {
idsReturn = Collections.emptySet();
} else if (value instanceof Collection) {
final Collect... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"Set",
"<",
"T",
">",
"getTableValue",
"(",
"final",
"Table",
"table",
")",
"{",
"final",
"Object",
"value",
"=",
"table",
".",
"getValue",
"(",
")",
";",
"Set",
"<"... | Gets the selected item id or in multiselect mode the selected ids.
@param table
the table to retrieve the selected ID(s)
@return the ID(s) which are selected in the table | [
"Gets",
"the",
"selected",
"item",
"id",
"or",
"in",
"multiselect",
"mode",
"the",
"selected",
"ids",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java#L141-L155 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java | AbstractTable.getSelectedEntitiesByTransferable | public Set<Long> getSelectedEntitiesByTransferable(final TableTransferable transferable) {
final Set<Long> selectedEntities = getTableValue(this);
final Set<Long> ids = new HashSet<>();
final Long transferableData = (Long) transferable.getData(SPUIDefinitions.ITEMID);
if (transferableDat... | java | public Set<Long> getSelectedEntitiesByTransferable(final TableTransferable transferable) {
final Set<Long> selectedEntities = getTableValue(this);
final Set<Long> ids = new HashSet<>();
final Long transferableData = (Long) transferable.getData(SPUIDefinitions.ITEMID);
if (transferableDat... | [
"public",
"Set",
"<",
"Long",
">",
"getSelectedEntitiesByTransferable",
"(",
"final",
"TableTransferable",
"transferable",
")",
"{",
"final",
"Set",
"<",
"Long",
">",
"selectedEntities",
"=",
"getTableValue",
"(",
"this",
")",
";",
"final",
"Set",
"<",
"Long",
... | Return the entity which should be deleted by a transferable
@param transferable
the table transferable
@return set of entities id which will deleted | [
"Return",
"the",
"entity",
"which",
"should",
"be",
"deleted",
"by",
"a",
"transferable"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java#L291-L305 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java | AbstractTable.selectEntity | public void selectEntity(final Long entityId) {
E entity = null;
if (entityId != null) {
entity = findEntityByTableValue(entityId).orElse(null);
}
setLastSelectedEntityId(entityId);
publishSelectedEntityEvent(entity);
} | java | public void selectEntity(final Long entityId) {
E entity = null;
if (entityId != null) {
entity = findEntityByTableValue(entityId).orElse(null);
}
setLastSelectedEntityId(entityId);
publishSelectedEntityEvent(entity);
} | [
"public",
"void",
"selectEntity",
"(",
"final",
"Long",
"entityId",
")",
"{",
"E",
"entity",
"=",
"null",
";",
"if",
"(",
"entityId",
"!=",
"null",
")",
"{",
"entity",
"=",
"findEntityByTableValue",
"(",
"entityId",
")",
".",
"orElse",
"(",
"null",
")",
... | Finds the entity object of the given entity ID and performs the
publishing of the BaseEntityEventType.SELECTED_ENTITY event
@param entityId
ID of the current entity | [
"Finds",
"the",
"entity",
"object",
"of",
"the",
"given",
"entity",
"ID",
"and",
"performs",
"the",
"publishing",
"of",
"the",
"BaseEntityEventType",
".",
"SELECTED_ENTITY",
"event"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/AbstractTable.java#L615-L623 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java | GroupsLegendLayout.reset | public void reset() {
totalTargetsLabel.setVisible(false);
populateGroupsLegendByTargetCounts(Collections.emptyList());
if (groupsLegend.getComponentCount() > MAX_GROUPS_TO_BE_DISPLAYED) {
groupsLegend.getComponent(MAX_GROUPS_TO_BE_DISPLAYED).setVisible(false);
}
} | java | public void reset() {
totalTargetsLabel.setVisible(false);
populateGroupsLegendByTargetCounts(Collections.emptyList());
if (groupsLegend.getComponentCount() > MAX_GROUPS_TO_BE_DISPLAYED) {
groupsLegend.getComponent(MAX_GROUPS_TO_BE_DISPLAYED).setVisible(false);
}
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"totalTargetsLabel",
".",
"setVisible",
"(",
"false",
")",
";",
"populateGroupsLegendByTargetCounts",
"(",
"Collections",
".",
"emptyList",
"(",
")",
")",
";",
"if",
"(",
"groupsLegend",
".",
"getComponentCount",
"(",
... | Resets the display of the legend and total targets. | [
"Resets",
"the",
"display",
"of",
"the",
"legend",
"and",
"total",
"targets",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java#L78-L84 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java | GroupsLegendLayout.populateTotalTargets | public void populateTotalTargets(final Long totalTargets) {
if (totalTargets == null) {
totalTargetsLabel.setVisible(false);
} else {
totalTargetsLabel.setVisible(true);
totalTargetsLabel.setValue(getTotalTargetMessage(totalTargets));
}
} | java | public void populateTotalTargets(final Long totalTargets) {
if (totalTargets == null) {
totalTargetsLabel.setVisible(false);
} else {
totalTargetsLabel.setVisible(true);
totalTargetsLabel.setValue(getTotalTargetMessage(totalTargets));
}
} | [
"public",
"void",
"populateTotalTargets",
"(",
"final",
"Long",
"totalTargets",
")",
"{",
"if",
"(",
"totalTargets",
"==",
"null",
")",
"{",
"totalTargetsLabel",
".",
"setVisible",
"(",
"false",
")",
";",
"}",
"else",
"{",
"totalTargetsLabel",
".",
"setVisible... | Displays the total targets or hides the label when null is supplied.
@param totalTargets
null to hide the label or a count to be displayed as total
targets message | [
"Displays",
"the",
"total",
"targets",
"or",
"hides",
"the",
"label",
"when",
"null",
"is",
"supplied",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java#L141-L148 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java | GroupsLegendLayout.populateGroupsLegendByTargetCounts | public void populateGroupsLegendByTargetCounts(final List<Long> listOfTargetCountPerGroup) {
loadingLabel.setVisible(false);
for (int i = 0; i < getGroupsWithoutToBeContinuedLabel(listOfTargetCountPerGroup.size()); i++) {
final Component component = groupsLegend.getComponent(i);
... | java | public void populateGroupsLegendByTargetCounts(final List<Long> listOfTargetCountPerGroup) {
loadingLabel.setVisible(false);
for (int i = 0; i < getGroupsWithoutToBeContinuedLabel(listOfTargetCountPerGroup.size()); i++) {
final Component component = groupsLegend.getComponent(i);
... | [
"public",
"void",
"populateGroupsLegendByTargetCounts",
"(",
"final",
"List",
"<",
"Long",
">",
"listOfTargetCountPerGroup",
")",
"{",
"loadingLabel",
".",
"setVisible",
"(",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getGroupsWithout... | Populates the legend based on a list of anonymous groups. They can't have
unassigned targets.
@param listOfTargetCountPerGroup
list of target counts | [
"Populates",
"the",
"legend",
"based",
"on",
"a",
"list",
"of",
"anonymous",
"groups",
".",
"They",
"can",
"t",
"have",
"unassigned",
"targets",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java#L157-L178 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java | GroupsLegendLayout.populateGroupsLegendByValidation | public void populateGroupsLegendByValidation(final RolloutGroupsValidation validation,
final List<RolloutGroupCreate> groups) {
loadingLabel.setVisible(false);
if (validation == null) {
return;
}
final List<Long> targetsPerGroup = validation.getTargetsPerGroup();
... | java | public void populateGroupsLegendByValidation(final RolloutGroupsValidation validation,
final List<RolloutGroupCreate> groups) {
loadingLabel.setVisible(false);
if (validation == null) {
return;
}
final List<Long> targetsPerGroup = validation.getTargetsPerGroup();
... | [
"public",
"void",
"populateGroupsLegendByValidation",
"(",
"final",
"RolloutGroupsValidation",
"validation",
",",
"final",
"List",
"<",
"RolloutGroupCreate",
">",
"groups",
")",
"{",
"loadingLabel",
".",
"setVisible",
"(",
"false",
")",
";",
"if",
"(",
"validation",... | Populates the legend based on a groups validation and a list of groups
that is used for resolving their names. Positions of the groups in the
groups list and the validation need to be in correct order. Can have
unassigned targets that are displayed on top of the groups list which
results in one group less to be display... | [
"Populates",
"the",
"legend",
"based",
"on",
"a",
"groups",
"validation",
"and",
"a",
"list",
"of",
"groups",
"that",
"is",
"used",
"for",
"resolving",
"their",
"names",
".",
"Positions",
"of",
"the",
"groups",
"in",
"the",
"groups",
"list",
"and",
"the",
... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java#L216-L250 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java | GroupsLegendLayout.populateGroupsLegendByGroups | public void populateGroupsLegendByGroups(final List<RolloutGroup> groups) {
loadingLabel.setVisible(false);
for (int i = 0; i < getGroupsWithoutToBeContinuedLabel(groups.size()); i++) {
final Component component = groupsLegend.getComponent(i);
final Label label = (Label) compone... | java | public void populateGroupsLegendByGroups(final List<RolloutGroup> groups) {
loadingLabel.setVisible(false);
for (int i = 0; i < getGroupsWithoutToBeContinuedLabel(groups.size()); i++) {
final Component component = groupsLegend.getComponent(i);
final Label label = (Label) compone... | [
"public",
"void",
"populateGroupsLegendByGroups",
"(",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
")",
"{",
"loadingLabel",
".",
"setVisible",
"(",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getGroupsWithoutToBeContinuedLabe... | Populates the legend based on a list of groups.
@param groups
List of groups with their name | [
"Populates",
"the",
"legend",
"based",
"on",
"a",
"list",
"of",
"groups",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/GroupsLegendLayout.java#L258-L277 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java | FilterByStatusLayout.getTargetFilterStatuses | private void getTargetFilterStatuses() {
unknown = SPUIComponentProvider.getButton(UIComponentIdProvider.UNKNOWN_STATUS_ICON,
TargetUpdateStatus.UNKNOWN.toString(),
i18n.getMessage(UIMessageIdProvider.TOOLTIP_TARGET_STATUS_UNKNOWN),
SPUIDefinitions.SP_BUTTON_STATU... | java | private void getTargetFilterStatuses() {
unknown = SPUIComponentProvider.getButton(UIComponentIdProvider.UNKNOWN_STATUS_ICON,
TargetUpdateStatus.UNKNOWN.toString(),
i18n.getMessage(UIMessageIdProvider.TOOLTIP_TARGET_STATUS_UNKNOWN),
SPUIDefinitions.SP_BUTTON_STATU... | [
"private",
"void",
"getTargetFilterStatuses",
"(",
")",
"{",
"unknown",
"=",
"SPUIComponentProvider",
".",
"getButton",
"(",
"UIComponentIdProvider",
".",
"UNKNOWN_STATUS_ICON",
",",
"TargetUpdateStatus",
".",
"UNKNOWN",
".",
"toString",
"(",
")",
",",
"i18n",
".",
... | Get - status of FILTER. | [
"Get",
"-",
"status",
"of",
"FILTER",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java#L154-L189 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java | FilterByStatusLayout.applyStatusBtnStyle | private void applyStatusBtnStyle() {
unknown.addStyleName("unknownBtn");
inSync.addStyleName("inSynchBtn");
pending.addStyleName("pendingBtn");
error.addStyleName("errorBtn");
registered.addStyleName("registeredBtn");
overdue.addStyleName("overdueBtn");
} | java | private void applyStatusBtnStyle() {
unknown.addStyleName("unknownBtn");
inSync.addStyleName("inSynchBtn");
pending.addStyleName("pendingBtn");
error.addStyleName("errorBtn");
registered.addStyleName("registeredBtn");
overdue.addStyleName("overdueBtn");
} | [
"private",
"void",
"applyStatusBtnStyle",
"(",
")",
"{",
"unknown",
".",
"addStyleName",
"(",
"\"unknownBtn\"",
")",
";",
"inSync",
".",
"addStyleName",
"(",
"\"inSynchBtn\"",
")",
";",
"pending",
".",
"addStyleName",
"(",
"\"pendingBtn\"",
")",
";",
"error",
... | Apply - status style. | [
"Apply",
"-",
"status",
"style",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java#L194-L201 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java | FilterByStatusLayout.processOverdueFilterStatus | private void processOverdueFilterStatus() {
overdueBtnClicked = !overdueBtnClicked;
managementUIState.getTargetTableFilters().setOverdueFilterEnabled(overdueBtnClicked);
if (overdueBtnClicked) {
buttonClicked.addStyleName(BTN_CLICKED);
eventBus.publish(this, TargetFilter... | java | private void processOverdueFilterStatus() {
overdueBtnClicked = !overdueBtnClicked;
managementUIState.getTargetTableFilters().setOverdueFilterEnabled(overdueBtnClicked);
if (overdueBtnClicked) {
buttonClicked.addStyleName(BTN_CLICKED);
eventBus.publish(this, TargetFilter... | [
"private",
"void",
"processOverdueFilterStatus",
"(",
")",
"{",
"overdueBtnClicked",
"=",
"!",
"overdueBtnClicked",
";",
"managementUIState",
".",
"getTargetTableFilters",
"(",
")",
".",
"setOverdueFilterEnabled",
"(",
"overdueBtnClicked",
")",
";",
"if",
"(",
"overdu... | Process - OVERDUE. | [
"Process",
"-",
"OVERDUE",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java#L264-L276 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java | FilterByStatusLayout.processCommonFilterStatus | private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) {
if (buttonPressed) {
buttonClicked.addStyleName(BTN_CLICKED);
managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status);
eventBus.publish(this, Targ... | java | private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) {
if (buttonPressed) {
buttonClicked.addStyleName(BTN_CLICKED);
managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status);
eventBus.publish(this, Targ... | [
"private",
"void",
"processCommonFilterStatus",
"(",
"final",
"TargetUpdateStatus",
"status",
",",
"final",
"boolean",
"buttonPressed",
")",
"{",
"if",
"(",
"buttonPressed",
")",
"{",
"buttonClicked",
".",
"addStyleName",
"(",
"BTN_CLICKED",
")",
";",
"managementUIS... | Process - COMMON PROCESS.
@param status
as enum
@param buttonReset
as t|F | [
"Process",
"-",
"COMMON",
"PROCESS",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java#L286-L298 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootController.java | DdiRootController.checkAndCancelExpiredAction | private void checkAndCancelExpiredAction(final Action action) {
if (action != null && action.hasMaintenanceSchedule() && action.isMaintenanceScheduleLapsed()) {
try {
controllerManagement.cancelAction(action.getId());
} catch (final CancelActionNotAllowedException e) {
... | java | private void checkAndCancelExpiredAction(final Action action) {
if (action != null && action.hasMaintenanceSchedule() && action.isMaintenanceScheduleLapsed()) {
try {
controllerManagement.cancelAction(action.getId());
} catch (final CancelActionNotAllowedException e) {
... | [
"private",
"void",
"checkAndCancelExpiredAction",
"(",
"final",
"Action",
"action",
")",
"{",
"if",
"(",
"action",
"!=",
"null",
"&&",
"action",
".",
"hasMaintenanceSchedule",
"(",
")",
"&&",
"action",
".",
"isMaintenanceScheduleLapsed",
"(",
")",
")",
"{",
"t... | If the action has a maintenance schedule defined but is no longer valid,
cancel the action.
@param action
is the {@link Action} to check. | [
"If",
"the",
"action",
"has",
"a",
"maintenance",
"schedule",
"defined",
"but",
"is",
"no",
"longer",
"valid",
"cancel",
"the",
"action",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootController.java#L575-L583 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/DefineGroupsLayout.java | DefineGroupsLayout.populateByRollout | public void populateByRollout(final Rollout rollout) {
if (rollout == null) {
return;
}
removeAllRows();
final List<RolloutGroup> groups = rolloutGroupManagement
.findByRollout(PageRequest.of(0, quotaManagement.getMaxRolloutGroupsPerRollout()), rollout.getId... | java | public void populateByRollout(final Rollout rollout) {
if (rollout == null) {
return;
}
removeAllRows();
final List<RolloutGroup> groups = rolloutGroupManagement
.findByRollout(PageRequest.of(0, quotaManagement.getMaxRolloutGroupsPerRollout()), rollout.getId... | [
"public",
"void",
"populateByRollout",
"(",
"final",
"Rollout",
"rollout",
")",
"{",
"if",
"(",
"rollout",
"==",
"null",
")",
"{",
"return",
";",
"}",
"removeAllRows",
"(",
")",
";",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
"=",
"rolloutGroupMa... | Populate groups by rollout
@param rollout
the rollout | [
"Populate",
"groups",
"by",
"rollout"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/DefineGroupsLayout.java#L235-L252 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/DefineGroupsLayout.java | DefineGroupsLayout.setGroupsValidation | private void setGroupsValidation(final RolloutGroupsValidation validation) {
final int runningValidation = runningValidationsCounter.getAndSet(0);
if (runningValidation > 1) {
validateRemainingTargets();
return;
}
groupsValidation = validation;
final int... | java | private void setGroupsValidation(final RolloutGroupsValidation validation) {
final int runningValidation = runningValidationsCounter.getAndSet(0);
if (runningValidation > 1) {
validateRemainingTargets();
return;
}
groupsValidation = validation;
final int... | [
"private",
"void",
"setGroupsValidation",
"(",
"final",
"RolloutGroupsValidation",
"validation",
")",
"{",
"final",
"int",
"runningValidation",
"=",
"runningValidationsCounter",
".",
"getAndSet",
"(",
"0",
")",
";",
"if",
"(",
"runningValidation",
">",
"1",
")",
"... | YOU SHOULD NOT CALL THIS METHOD MANUALLY. It's only for the callback.
Only 1 runningValidation should be executed. If this runningValidation is
done, then this method is called. Maybe then a new runningValidation is
executed. | [
"YOU",
"SHOULD",
"NOT",
"CALL",
"THIS",
"METHOD",
"MANUALLY",
".",
"It",
"s",
"only",
"for",
"the",
"callback",
".",
"Only",
"1",
"runningValidation",
"should",
"be",
"executed",
".",
"If",
"this",
"runningValidation",
"is",
"done",
"then",
"this",
"method",... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/DefineGroupsLayout.java#L314-L350 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java | JpaControllerManagement.getMinPollingTime | @Override
public String getMinPollingTime() {
return systemSecurityContext.runAsSystem(() -> tenantConfigurationManagement
.getConfigurationValue(TenantConfigurationKey.MIN_POLLING_TIME_INTERVAL, String.class).getValue());
} | java | @Override
public String getMinPollingTime() {
return systemSecurityContext.runAsSystem(() -> tenantConfigurationManagement
.getConfigurationValue(TenantConfigurationKey.MIN_POLLING_TIME_INTERVAL, String.class).getValue());
} | [
"@",
"Override",
"public",
"String",
"getMinPollingTime",
"(",
")",
"{",
"return",
"systemSecurityContext",
".",
"runAsSystem",
"(",
"(",
")",
"->",
"tenantConfigurationManagement",
".",
"getConfigurationValue",
"(",
"TenantConfigurationKey",
".",
"MIN_POLLING_TIME_INTERV... | Returns the configured minimum polling interval.
@return current {@link TenantConfigurationKey#MIN_POLLING_TIME_INTERVAL}. | [
"Returns",
"the",
"configured",
"minimum",
"polling",
"interval",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java#L190-L194 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/CountMessageLabel.java | CountMessageLabel.onEvent | @EventBusListenerMethod(scope = EventScope.UI)
public void onEvent(final PinUnpinEvent event) {
final Optional<Long> pinnedDist = managementUIState.getTargetTableFilters().getPinnedDistId();
if (event == PinUnpinEvent.PIN_DISTRIBUTION && pinnedDist.isPresent()) {
displayCountLabel(pinne... | java | @EventBusListenerMethod(scope = EventScope.UI)
public void onEvent(final PinUnpinEvent event) {
final Optional<Long> pinnedDist = managementUIState.getTargetTableFilters().getPinnedDistId();
if (event == PinUnpinEvent.PIN_DISTRIBUTION && pinnedDist.isPresent()) {
displayCountLabel(pinne... | [
"@",
"EventBusListenerMethod",
"(",
"scope",
"=",
"EventScope",
".",
"UI",
")",
"public",
"void",
"onEvent",
"(",
"final",
"PinUnpinEvent",
"event",
")",
"{",
"final",
"Optional",
"<",
"Long",
">",
"pinnedDist",
"=",
"managementUIState",
".",
"getTargetTableFilt... | TenantAwareEvent Listener for Pinning Distribution.
@param event | [
"TenantAwareEvent",
"Listener",
"for",
"Pinning",
"Distribution",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/CountMessageLabel.java#L103-L113 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/VaadinMessageSource.java | VaadinMessageSource.getMessage | public String getMessage(final Locale local, final String code, final Object... args) {
try {
return source.getMessage(code, args, local);
} catch (final NoSuchMessageException ex) {
LOG.error("Failed to retrieve message!", ex);
return code;
}
} | java | public String getMessage(final Locale local, final String code, final Object... args) {
try {
return source.getMessage(code, args, local);
} catch (final NoSuchMessageException ex) {
LOG.error("Failed to retrieve message!", ex);
return code;
}
} | [
"public",
"String",
"getMessage",
"(",
"final",
"Locale",
"local",
",",
"final",
"String",
"code",
",",
"final",
"Object",
"...",
"args",
")",
"{",
"try",
"{",
"return",
"source",
".",
"getMessage",
"(",
"code",
",",
"args",
",",
"local",
")",
";",
"}"... | Tries to resolve the message based on the provided Local. Returns message
code if fitting message could not be found.
@param local
to determinate the Language.
@param code
the code to lookup up.
@param args
Array of arguments that will be filled in for params within
the message.
@return the resolved message, or the m... | [
"Tries",
"to",
"resolve",
"the",
"message",
"based",
"on",
"the",
"provided",
"Local",
".",
"Returns",
"message",
"code",
"if",
"fitting",
"message",
"could",
"not",
"be",
"found",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/VaadinMessageSource.java#L75-L82 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.verifyRolloutGroupConditions | public static void verifyRolloutGroupConditions(final RolloutGroupConditions conditions) {
if (conditions.getSuccessCondition() == null) {
throw new ValidationException("Rollout group is missing success condition");
}
if (conditions.getSuccessAction() == null) {
throw new... | java | public static void verifyRolloutGroupConditions(final RolloutGroupConditions conditions) {
if (conditions.getSuccessCondition() == null) {
throw new ValidationException("Rollout group is missing success condition");
}
if (conditions.getSuccessAction() == null) {
throw new... | [
"public",
"static",
"void",
"verifyRolloutGroupConditions",
"(",
"final",
"RolloutGroupConditions",
"conditions",
")",
"{",
"if",
"(",
"conditions",
".",
"getSuccessCondition",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"ValidationException",
"(",
"\"Rollout ... | Verifies that the required success condition and action are actually set.
@param conditions
input conditions and actions | [
"Verifies",
"that",
"the",
"required",
"success",
"condition",
"and",
"action",
"are",
"actually",
"set",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L38-L45 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.verifyRolloutGroupHasConditions | public static RolloutGroup verifyRolloutGroupHasConditions(final RolloutGroup group) {
if (group.getTargetPercentage() < 1F || group.getTargetPercentage() > 100F) {
throw new ValidationException("Target percentage has to be between 1 and 100");
}
if (group.getSuccessCondition() == n... | java | public static RolloutGroup verifyRolloutGroupHasConditions(final RolloutGroup group) {
if (group.getTargetPercentage() < 1F || group.getTargetPercentage() > 100F) {
throw new ValidationException("Target percentage has to be between 1 and 100");
}
if (group.getSuccessCondition() == n... | [
"public",
"static",
"RolloutGroup",
"verifyRolloutGroupHasConditions",
"(",
"final",
"RolloutGroup",
"group",
")",
"{",
"if",
"(",
"group",
".",
"getTargetPercentage",
"(",
")",
"<",
"1F",
"||",
"group",
".",
"getTargetPercentage",
"(",
")",
">",
"100F",
")",
... | Verifies that the group has the required success condition and action and
a falid target percentage.
@param group
the input group
@return the verified group | [
"Verifies",
"that",
"the",
"group",
"has",
"the",
"required",
"success",
"condition",
"and",
"action",
"and",
"a",
"falid",
"target",
"percentage",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L55-L67 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.verifyRolloutGroupParameter | public static void verifyRolloutGroupParameter(final int amountGroup, final QuotaManagement quotaManagement) {
if (amountGroup <= 0) {
throw new ValidationException("The amount of groups cannot be lower than zero");
} else if (amountGroup > quotaManagement.getMaxRolloutGroupsPerRollout()) {
... | java | public static void verifyRolloutGroupParameter(final int amountGroup, final QuotaManagement quotaManagement) {
if (amountGroup <= 0) {
throw new ValidationException("The amount of groups cannot be lower than zero");
} else if (amountGroup > quotaManagement.getMaxRolloutGroupsPerRollout()) {
... | [
"public",
"static",
"void",
"verifyRolloutGroupParameter",
"(",
"final",
"int",
"amountGroup",
",",
"final",
"QuotaManagement",
"quotaManagement",
")",
"{",
"if",
"(",
"amountGroup",
"<=",
"0",
")",
"{",
"throw",
"new",
"ValidationException",
"(",
"\"The amount of g... | Verify if the supplied amount of groups is in range
@param amountGroup
amount of groups
@param quotaManagement
to retrieve maximum number of groups allowed | [
"Verify",
"if",
"the",
"supplied",
"amount",
"of",
"groups",
"is",
"in",
"range"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L77-L85 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.verifyRolloutInStatus | public static void verifyRolloutInStatus(final Rollout rollout, final Rollout.RolloutStatus status) {
if (!rollout.getStatus().equals(status)) {
throw new RolloutIllegalStateException("Rollout is not in status " + status.toString());
}
} | java | public static void verifyRolloutInStatus(final Rollout rollout, final Rollout.RolloutStatus status) {
if (!rollout.getStatus().equals(status)) {
throw new RolloutIllegalStateException("Rollout is not in status " + status.toString());
}
} | [
"public",
"static",
"void",
"verifyRolloutInStatus",
"(",
"final",
"Rollout",
"rollout",
",",
"final",
"Rollout",
".",
"RolloutStatus",
"status",
")",
"{",
"if",
"(",
"!",
"rollout",
".",
"getStatus",
"(",
")",
".",
"equals",
"(",
"status",
")",
")",
"{",
... | Verifies that the Rollout is in the required status.
@param rollout
the Rollout
@param status
the Status | [
"Verifies",
"that",
"the",
"Rollout",
"is",
"in",
"the",
"required",
"status",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L136-L140 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.getGroupsByStatusIncludingGroup | public static List<Long> getGroupsByStatusIncludingGroup(final List<RolloutGroup> groups,
final RolloutGroup.RolloutGroupStatus status, final RolloutGroup group) {
return groups.stream().filter(innerGroup -> innerGroup.getStatus().equals(status) || innerGroup.equals(group))
.map(Roll... | java | public static List<Long> getGroupsByStatusIncludingGroup(final List<RolloutGroup> groups,
final RolloutGroup.RolloutGroupStatus status, final RolloutGroup group) {
return groups.stream().filter(innerGroup -> innerGroup.getStatus().equals(status) || innerGroup.equals(group))
.map(Roll... | [
"public",
"static",
"List",
"<",
"Long",
">",
"getGroupsByStatusIncludingGroup",
"(",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
",",
"final",
"RolloutGroup",
".",
"RolloutGroupStatus",
"status",
",",
"final",
"RolloutGroup",
"group",
")",
"{",
"return",... | Filters the groups of a Rollout to match a specific status and adds a
group to the result.
@param rollout
the rollout
@param status
the required status for the groups
@param group
the group to add
@return list of groups | [
"Filters",
"the",
"groups",
"of",
"a",
"Rollout",
"to",
"match",
"a",
"specific",
"status",
"and",
"adds",
"a",
"group",
"to",
"the",
"result",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L154-L158 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.getAllGroupsTargetFilter | public static String getAllGroupsTargetFilter(final List<RolloutGroup> groups) {
if (groups.stream().anyMatch(group -> StringUtils.isEmpty(group.getTargetFilterQuery()))) {
return "";
}
return "(" + groups.stream().map(RolloutGroup::getTargetFilterQuery).distinct().sorted()
... | java | public static String getAllGroupsTargetFilter(final List<RolloutGroup> groups) {
if (groups.stream().anyMatch(group -> StringUtils.isEmpty(group.getTargetFilterQuery()))) {
return "";
}
return "(" + groups.stream().map(RolloutGroup::getTargetFilterQuery).distinct().sorted()
... | [
"public",
"static",
"String",
"getAllGroupsTargetFilter",
"(",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
")",
"{",
"if",
"(",
"groups",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"group",
"->",
"StringUtils",
".",
"isEmpty",
"(",
"group",
".... | Creates an RSQL expression that matches all targets in the provided
groups. Links all target filter queries with OR.
@param groups
the rollout groups
@return RSQL string without base filter of the Rollout. Can be an empty
string. | [
"Creates",
"an",
"RSQL",
"expression",
"that",
"matches",
"all",
"targets",
"in",
"the",
"provided",
"groups",
".",
"Links",
"all",
"target",
"filter",
"queries",
"with",
"OR",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L169-L176 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.getOverlappingWithGroupsTargetFilter | public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups,
final RolloutGroup group) {
final String groupFilter = group.getTargetFilterQuery();
// when any previous group has the same filter as the target group the
// overlap i... | java | public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups,
final RolloutGroup group) {
final String groupFilter = group.getTargetFilterQuery();
// when any previous group has the same filter as the target group the
// overlap i... | [
"public",
"static",
"String",
"getOverlappingWithGroupsTargetFilter",
"(",
"final",
"String",
"baseFilter",
",",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
",",
"final",
"RolloutGroup",
"group",
")",
"{",
"final",
"String",
"groupFilter",
"=",
"group",
"... | Creates an RSQL Filter that matches all targets that are in the provided
group and in the provided groups.
@param baseFilter
the base filter from the rollout
@param groups
the rollout groups
@param group
the target group
@return RSQL string without base filter of the Rollout. Can be an empty
string. | [
"Creates",
"an",
"RSQL",
"Filter",
"that",
"matches",
"all",
"targets",
"that",
"are",
"in",
"the",
"provided",
"group",
"and",
"in",
"the",
"provided",
"groups",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L191-L212 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPTargetAttributesLayout.java | SPTargetAttributesLayout.decorate | private void decorate(final Map<String, String> controllerAttibs) {
final VaadinMessageSource i18n = SpringContextHelper.getBean(VaadinMessageSource.class);
final Label title = new Label(i18n.getMessage("label.target.controller.attrs"), ContentMode.HTML);
title.addStyleName(SPUIDefinitions.TEXT_... | java | private void decorate(final Map<String, String> controllerAttibs) {
final VaadinMessageSource i18n = SpringContextHelper.getBean(VaadinMessageSource.class);
final Label title = new Label(i18n.getMessage("label.target.controller.attrs"), ContentMode.HTML);
title.addStyleName(SPUIDefinitions.TEXT_... | [
"private",
"void",
"decorate",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"controllerAttibs",
")",
"{",
"final",
"VaadinMessageSource",
"i18n",
"=",
"SpringContextHelper",
".",
"getBean",
"(",
"VaadinMessageSource",
".",
"class",
")",
";",
"final",
... | Custom Decorate.
@param controllerAttibs | [
"Custom",
"Decorate",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPTargetAttributesLayout.java#L47-L58 | train |
eclipse/hawkbit | hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SystemSecurityContext.java | SystemSecurityContext.runAsSystemAsTenant | @SuppressWarnings({ "squid:S2221", "squid:S00112" })
public <T> T runAsSystemAsTenant(final Callable<T> callable, final String tenant) {
final SecurityContext oldContext = SecurityContextHolder.getContext();
try {
LOG.debug("entering system code execution");
return tenantAwar... | java | @SuppressWarnings({ "squid:S2221", "squid:S00112" })
public <T> T runAsSystemAsTenant(final Callable<T> callable, final String tenant) {
final SecurityContext oldContext = SecurityContextHolder.getContext();
try {
LOG.debug("entering system code execution");
return tenantAwar... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"squid:S2221\"",
",",
"\"squid:S00112\"",
"}",
")",
"public",
"<",
"T",
">",
"T",
"runAsSystemAsTenant",
"(",
"final",
"Callable",
"<",
"T",
">",
"callable",
",",
"final",
"String",
"tenant",
")",
"{",
"final",
"SecurityC... | The callable API throws a Exception and not a specific one | [
"The",
"callable",
"API",
"throws",
"a",
"Exception",
"and",
"not",
"a",
"specific",
"one"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SystemSecurityContext.java#L91-L112 | train |
eclipse/hawkbit | hawkbit-http-security/src/main/java/org/eclipse/hawkbit/security/AbstractHttpControllerAuthenticationFilter.java | AbstractHttpControllerAuthenticationFilter.createTenantSecruityTokenVariables | protected DmfTenantSecurityToken createTenantSecruityTokenVariables(final HttpServletRequest request) {
final String requestURI = request.getRequestURI();
if (pathExtractor.match(request.getContextPath() + CONTROLLER_REQUEST_ANT_PATTERN, requestURI)) {
LOG.debug("retrieving principal from U... | java | protected DmfTenantSecurityToken createTenantSecruityTokenVariables(final HttpServletRequest request) {
final String requestURI = request.getRequestURI();
if (pathExtractor.match(request.getContextPath() + CONTROLLER_REQUEST_ANT_PATTERN, requestURI)) {
LOG.debug("retrieving principal from U... | [
"protected",
"DmfTenantSecurityToken",
"createTenantSecruityTokenVariables",
"(",
"final",
"HttpServletRequest",
"request",
")",
"{",
"final",
"String",
"requestURI",
"=",
"request",
".",
"getRequestURI",
"(",
")",
";",
"if",
"(",
"pathExtractor",
".",
"match",
"(",
... | Extracts tenant and controllerId from the request URI as path variables.
@param request
the Http request to extract the path variables.
@return the extracted {@link PathVariables} or {@code null} if the
request does not match the pattern and no variables could be
extracted | [
"Extracts",
"tenant",
"and",
"controllerId",
"from",
"the",
"request",
"URI",
"as",
"path",
"variables",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-http-security/src/main/java/org/eclipse/hawkbit/security/AbstractHttpControllerAuthenticationFilter.java#L134-L164 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/BaseAmqpService.java | BaseAmqpService.convertMessage | @SuppressWarnings("unchecked")
public <T> T convertMessage(@NotNull final Message message, final Class<T> clazz) {
checkMessageBody(message);
message.getMessageProperties().getHeaders().put(AbstractJavaTypeMapper.DEFAULT_CLASSID_FIELD_NAME,
clazz.getName());
return (T) rabbit... | java | @SuppressWarnings("unchecked")
public <T> T convertMessage(@NotNull final Message message, final Class<T> clazz) {
checkMessageBody(message);
message.getMessageProperties().getHeaders().put(AbstractJavaTypeMapper.DEFAULT_CLASSID_FIELD_NAME,
clazz.getName());
return (T) rabbit... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"convertMessage",
"(",
"@",
"NotNull",
"final",
"Message",
"message",
",",
"final",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"checkMessageBody",
"(",
"message",
")",
";",
... | Is needed to convert a incoming message to is originally object type.
@param message
the message to convert.
@param clazz
the class of the originally object.
@return the converted object | [
"Is",
"needed",
"to",
"convert",
"a",
"incoming",
"message",
"to",
"is",
"originally",
"object",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/BaseAmqpService.java#L60-L66 | train |
eclipse/hawkbit | hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/PermissionUtils.java | PermissionUtils.createAllAuthorityList | public static List<GrantedAuthority> createAllAuthorityList() {
return SpPermission.getAllAuthorities().stream().map(SimpleGrantedAuthority::new).collect(Collectors.toList());
} | java | public static List<GrantedAuthority> createAllAuthorityList() {
return SpPermission.getAllAuthorities().stream().map(SimpleGrantedAuthority::new).collect(Collectors.toList());
} | [
"public",
"static",
"List",
"<",
"GrantedAuthority",
">",
"createAllAuthorityList",
"(",
")",
"{",
"return",
"SpPermission",
".",
"getAllAuthorities",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
"(",
"SimpleGrantedAuthority",
"::",
"new",
")",
".",
"collect... | Returns all authorities.
@return a list of {@link GrantedAuthority} | [
"Returns",
"all",
"authorities",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/PermissionUtils.java#L31-L33 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.getButton | public static Button getButton(final String id, final String buttonName, final String buttonDesc,
final String style, final boolean setStyle, final Resource icon,
final Class<? extends SPUIButtonDecorator> buttonDecoratorclassName) {
Button button = null;
SPUIButtonDecorator butt... | java | public static Button getButton(final String id, final String buttonName, final String buttonDesc,
final String style, final boolean setStyle, final Resource icon,
final Class<? extends SPUIButtonDecorator> buttonDecoratorclassName) {
Button button = null;
SPUIButtonDecorator butt... | [
"public",
"static",
"Button",
"getButton",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"buttonName",
",",
"final",
"String",
"buttonDesc",
",",
"final",
"String",
"style",
",",
"final",
"boolean",
"setStyle",
",",
"final",
"Resource",
"icon",
",",
... | Get Button - Factory Approach for decoration.
@param id
as string
@param buttonName
as string
@param buttonDesc
as string
@param style
string as string
@param setStyle
string as boolean
@param icon
as image
@param buttonDecoratorclassName
as decorator
@return Button as UI | [
"Get",
"Button",
"-",
"Factory",
"Approach",
"for",
"decoration",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L139-L155 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.getPinButtonStyle | public static String getPinButtonStyle() {
final StringBuilder pinStyle = new StringBuilder(ValoTheme.BUTTON_BORDERLESS_COLORED);
pinStyle.append(' ');
pinStyle.append(ValoTheme.BUTTON_SMALL);
pinStyle.append(' ');
pinStyle.append(ValoTheme.BUTTON_ICON_ONLY);
pinStyle.app... | java | public static String getPinButtonStyle() {
final StringBuilder pinStyle = new StringBuilder(ValoTheme.BUTTON_BORDERLESS_COLORED);
pinStyle.append(' ');
pinStyle.append(ValoTheme.BUTTON_SMALL);
pinStyle.append(' ');
pinStyle.append(ValoTheme.BUTTON_ICON_ONLY);
pinStyle.app... | [
"public",
"static",
"String",
"getPinButtonStyle",
"(",
")",
"{",
"final",
"StringBuilder",
"pinStyle",
"=",
"new",
"StringBuilder",
"(",
"ValoTheme",
".",
"BUTTON_BORDERLESS_COLORED",
")",
";",
"pinStyle",
".",
"append",
"(",
"'",
"'",
")",
";",
"pinStyle",
"... | Get the style required.
@return String | [
"Get",
"the",
"style",
"required",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L162-L171 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.getDistributionSetInfo | public static Panel getDistributionSetInfo(final DistributionSet distributionSet, final String caption,
final String style1, final String style2) {
return new DistributionSetInfoPanel(distributionSet, caption, style1, style2);
} | java | public static Panel getDistributionSetInfo(final DistributionSet distributionSet, final String caption,
final String style1, final String style2) {
return new DistributionSetInfoPanel(distributionSet, caption, style1, style2);
} | [
"public",
"static",
"Panel",
"getDistributionSetInfo",
"(",
"final",
"DistributionSet",
"distributionSet",
",",
"final",
"String",
"caption",
",",
"final",
"String",
"style1",
",",
"final",
"String",
"style2",
")",
"{",
"return",
"new",
"DistributionSetInfoPanel",
"... | Get DistributionSet Info Panel.
@param distributionSet
as DistributionSet
@param caption
as string
@param style1
as string
@param style2
as string
@return Panel | [
"Get",
"DistributionSet",
"Info",
"Panel",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L186-L189 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.createNameValueLabel | public static Label createNameValueLabel(final String label, final String... values) {
final String valueStr = StringUtils.arrayToDelimitedString(values, " ");
final Label nameValueLabel = new Label(getBoldHTMLText(label) + valueStr, ContentMode.HTML);
nameValueLabel.setSizeFull();
nameV... | java | public static Label createNameValueLabel(final String label, final String... values) {
final String valueStr = StringUtils.arrayToDelimitedString(values, " ");
final Label nameValueLabel = new Label(getBoldHTMLText(label) + valueStr, ContentMode.HTML);
nameValueLabel.setSizeFull();
nameV... | [
"public",
"static",
"Label",
"createNameValueLabel",
"(",
"final",
"String",
"label",
",",
"final",
"String",
"...",
"values",
")",
"{",
"final",
"String",
"valueStr",
"=",
"StringUtils",
".",
"arrayToDelimitedString",
"(",
"values",
",",
"\" \"",
")",
";",
"f... | Method to CreateName value labels.
@param label
as string
@param values
as string
@return Label | [
"Method",
"to",
"CreateName",
"value",
"labels",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L200-L207 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.getDetailTabLayout | public static VerticalLayout getDetailTabLayout() {
final VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.setImmediate(true);
return layout;
} | java | public static VerticalLayout getDetailTabLayout() {
final VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.setImmediate(true);
return layout;
} | [
"public",
"static",
"VerticalLayout",
"getDetailTabLayout",
"(",
")",
"{",
"final",
"VerticalLayout",
"layout",
"=",
"new",
"VerticalLayout",
"(",
")",
";",
"layout",
".",
"setSpacing",
"(",
"true",
")",
";",
"layout",
".",
"setMargin",
"(",
"true",
")",
";"... | Layout of tabs in detail tabsheet.
@return VerticalLayout | [
"Layout",
"of",
"tabs",
"in",
"detail",
"tabsheet",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L289-L295 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java | SPUIComponentProvider.getLink | public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon,
final String targetOpen, final String style) {
final Link link = new Link(name, new ExternalResource(resource));
link.setId(id);
link.setIcon(icon);
link.setDescript... | java | public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon,
final String targetOpen, final String style) {
final Link link = new Link(name, new ExternalResource(resource));
link.setId(id);
link.setIcon(icon);
link.setDescript... | [
"public",
"static",
"Link",
"getLink",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"name",
",",
"final",
"String",
"resource",
",",
"final",
"FontAwesome",
"icon",
",",
"final",
"String",
"targetOpen",
",",
"final",
"String",
"style",
")",
"{",
"... | Method to create a link.
@param id
of the link
@param name
of the link
@param resource
path of the link
@param icon
of the link
@param targetOpen
specify how the link should be open (f. e. new windows =
_blank)
@param style
chosen style of the link. Might be {@code null} if no style
should be used
@return a link UI co... | [
"Method",
"to",
"create",
"a",
"link",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L316-L331 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java | SoftwareModuleAddUpdateWindow.createUpdateSoftwareModuleWindow | public CommonDialogWindow createUpdateSoftwareModuleWindow(final Long baseSwModuleId) {
this.baseSwModuleId = baseSwModuleId;
resetComponents();
populateTypeNameCombo();
populateValuesOfSwModule();
return createWindow();
} | java | public CommonDialogWindow createUpdateSoftwareModuleWindow(final Long baseSwModuleId) {
this.baseSwModuleId = baseSwModuleId;
resetComponents();
populateTypeNameCombo();
populateValuesOfSwModule();
return createWindow();
} | [
"public",
"CommonDialogWindow",
"createUpdateSoftwareModuleWindow",
"(",
"final",
"Long",
"baseSwModuleId",
")",
"{",
"this",
".",
"baseSwModuleId",
"=",
"baseSwModuleId",
";",
"resetComponents",
"(",
")",
";",
"populateTypeNameCombo",
"(",
")",
";",
"populateValuesOfSw... | Creates window for update software module.
@param baseSwModuleId
id of the software module to edit.
@return reference of {@link com.vaadin.ui.Window} to update software
module. | [
"Creates",
"window",
"for",
"update",
"software",
"module",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java#L208-L214 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java | SoftwareModuleAddUpdateWindow.populateValuesOfSwModule | private void populateValuesOfSwModule() {
if (baseSwModuleId == null) {
return;
}
editSwModule = Boolean.TRUE;
softwareModuleManagement.get(baseSwModuleId).ifPresent(swModule -> {
nameTextField.setValue(swModule.getName());
versionTextField.setValue(sw... | java | private void populateValuesOfSwModule() {
if (baseSwModuleId == null) {
return;
}
editSwModule = Boolean.TRUE;
softwareModuleManagement.get(baseSwModuleId).ifPresent(swModule -> {
nameTextField.setValue(swModule.getName());
versionTextField.setValue(sw... | [
"private",
"void",
"populateValuesOfSwModule",
"(",
")",
"{",
"if",
"(",
"baseSwModuleId",
"==",
"null",
")",
"{",
"return",
";",
"}",
"editSwModule",
"=",
"Boolean",
".",
"TRUE",
";",
"softwareModuleManagement",
".",
"get",
"(",
"baseSwModuleId",
")",
".",
... | fill the data of a softwareModule in the content of the window | [
"fill",
"the",
"data",
"of",
"a",
"softwareModule",
"in",
"the",
"content",
"of",
"the",
"window"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java#L299-L312 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/client/SuggestionsSelectList.java | SuggestionsSelectList.addItems | public void addItems(final List<SuggestTokenDto> suggestions, final VTextField textFieldWidget,
final PopupPanel popupPanel, final TextFieldSuggestionBoxServerRpc suggestionServerRpc) {
for (int index = 0; index < suggestions.size(); index++) {
final SuggestTokenDto suggestToken = sugges... | java | public void addItems(final List<SuggestTokenDto> suggestions, final VTextField textFieldWidget,
final PopupPanel popupPanel, final TextFieldSuggestionBoxServerRpc suggestionServerRpc) {
for (int index = 0; index < suggestions.size(); index++) {
final SuggestTokenDto suggestToken = sugges... | [
"public",
"void",
"addItems",
"(",
"final",
"List",
"<",
"SuggestTokenDto",
">",
"suggestions",
",",
"final",
"VTextField",
"textFieldWidget",
",",
"final",
"PopupPanel",
"popupPanel",
",",
"final",
"TextFieldSuggestionBoxServerRpc",
"suggestionServerRpc",
")",
"{",
"... | Adds suggestions to the suggestion menu bar.
@param suggestions
the suggestions to be added
@param textFieldWidget
the text field which the suggestion is attached to to bring
back the focus after selection
@param popupPanel
pop-up panel where the menu bar is shown to hide it after
selection
@param suggestionServerRpc
... | [
"Adds",
"suggestions",
"to",
"the",
"suggestion",
"menu",
"bar",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/client/SuggestionsSelectList.java#L55-L79 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SpringContextHelper.java | SpringContextHelper.getBean | public static <T> T getBean(final String beanName, final Class<T> beanClazz) {
return context.getBean(beanName, beanClazz);
} | java | public static <T> T getBean(final String beanName, final Class<T> beanClazz) {
return context.getBean(beanName, beanClazz);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"getBean",
"(",
"final",
"String",
"beanName",
",",
"final",
"Class",
"<",
"T",
">",
"beanClazz",
")",
"{",
"return",
"context",
".",
"getBean",
"(",
"beanName",
",",
"beanClazz",
")",
";",
"}"
] | method to return a certain bean by its class and name.
@param beanName
name of the beand which should be returned from the
application context
@param beanClazz
class of the bean which should be returned from the
application context
@return the requested bean | [
"method",
"to",
"return",
"a",
"certain",
"bean",
"by",
"its",
"class",
"and",
"name",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SpringContextHelper.java#L69-L71 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDistributionSetManagement.java | JpaDistributionSetManagement.getDsFilterNameAndVersionEntries | private static String[] getDsFilterNameAndVersionEntries(final String filterString) {
final int semicolonIndex = filterString.indexOf(':');
final String dsFilterName = semicolonIndex != -1 ? filterString.substring(0, semicolonIndex)
: (filterString + "%");
final String dsFilterV... | java | private static String[] getDsFilterNameAndVersionEntries(final String filterString) {
final int semicolonIndex = filterString.indexOf(':');
final String dsFilterName = semicolonIndex != -1 ? filterString.substring(0, semicolonIndex)
: (filterString + "%");
final String dsFilterV... | [
"private",
"static",
"String",
"[",
"]",
"getDsFilterNameAndVersionEntries",
"(",
"final",
"String",
"filterString",
")",
"{",
"final",
"int",
"semicolonIndex",
"=",
"filterString",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"final",
"String",
"dsFilterName",
"=",... | field when the semicolon is present | [
"field",
"when",
"the",
"semicolon",
"is",
"present"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDistributionSetManagement.java#L658-L666 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java | TargetTagFilterButtons.validate | private Boolean validate(final DragAndDropEvent event) {
final Transferable transferable = event.getTransferable();
final Component compsource = transferable.getSourceComponent();
if (!(compsource instanceof AbstractTable)) {
uiNotification.displayValidationError(getI18n().getMessage... | java | private Boolean validate(final DragAndDropEvent event) {
final Transferable transferable = event.getTransferable();
final Component compsource = transferable.getSourceComponent();
if (!(compsource instanceof AbstractTable)) {
uiNotification.displayValidationError(getI18n().getMessage... | [
"private",
"Boolean",
"validate",
"(",
"final",
"DragAndDropEvent",
"event",
")",
"{",
"final",
"Transferable",
"transferable",
"=",
"event",
".",
"getTransferable",
"(",
")",
";",
"final",
"Component",
"compsource",
"=",
"transferable",
".",
"getSourceComponent",
... | Validate the drop.
@param event
DragAndDropEvent reference
@return Boolean | [
"Validate",
"the",
"drop",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java#L163-L187 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java | TargetTagFilterButtons.hasTargetUpdatePermission | private boolean hasTargetUpdatePermission() {
if (!permChecker.hasUpdateTargetPermission()) {
uiNotification.displayValidationError(
getI18n().getMessage("message.permission.insufficient", SpPermission.UPDATE_TARGET));
return false;
}
return true;
... | java | private boolean hasTargetUpdatePermission() {
if (!permChecker.hasUpdateTargetPermission()) {
uiNotification.displayValidationError(
getI18n().getMessage("message.permission.insufficient", SpPermission.UPDATE_TARGET));
return false;
}
return true;
... | [
"private",
"boolean",
"hasTargetUpdatePermission",
"(",
")",
"{",
"if",
"(",
"!",
"permChecker",
".",
"hasUpdateTargetPermission",
"(",
")",
")",
"{",
"uiNotification",
".",
"displayValidationError",
"(",
"getI18n",
"(",
")",
".",
"getMessage",
"(",
"\"message.per... | validate the update permission.
@return boolean | [
"validate",
"the",
"update",
"permission",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java#L194-L202 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java | AbstractGrid.refreshContainer | @Override
public void refreshContainer() {
final Indexed container = getContainerDataSource();
if (hasGeneratedPropertySupport()
&& getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
((LazyQueryContainer) getGeneratedPropertySupport().getRawC... | java | @Override
public void refreshContainer() {
final Indexed container = getContainerDataSource();
if (hasGeneratedPropertySupport()
&& getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
((LazyQueryContainer) getGeneratedPropertySupport().getRawC... | [
"@",
"Override",
"public",
"void",
"refreshContainer",
"(",
")",
"{",
"final",
"Indexed",
"container",
"=",
"getContainerDataSource",
"(",
")",
";",
"if",
"(",
"hasGeneratedPropertySupport",
"(",
")",
"&&",
"getGeneratedPropertySupport",
"(",
")",
".",
"getRawCont... | Refresh the container. | [
"Refresh",
"the",
"container",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java#L100-L112 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java | AbstractGrid.resetHeaderDefaultRow | protected HeaderRow resetHeaderDefaultRow() {
getHeader().removeRow(getHeader().getDefaultRow());
final HeaderRow newHeaderRow = getHeader().appendRow();
getHeader().setDefaultRow(newHeaderRow);
return newHeaderRow;
} | java | protected HeaderRow resetHeaderDefaultRow() {
getHeader().removeRow(getHeader().getDefaultRow());
final HeaderRow newHeaderRow = getHeader().appendRow();
getHeader().setDefaultRow(newHeaderRow);
return newHeaderRow;
} | [
"protected",
"HeaderRow",
"resetHeaderDefaultRow",
"(",
")",
"{",
"getHeader",
"(",
")",
".",
"removeRow",
"(",
"getHeader",
"(",
")",
".",
"getDefaultRow",
"(",
")",
")",
";",
"final",
"HeaderRow",
"newHeaderRow",
"=",
"getHeader",
"(",
")",
".",
"appendRow... | Resets the default row of the header. This means the current default row
is removed and replaced with a newly created one.
@return the new and clean header row. | [
"Resets",
"the",
"default",
"row",
"of",
"the",
"header",
".",
"This",
"means",
"the",
"current",
"default",
"row",
"is",
"removed",
"and",
"replaced",
"with",
"a",
"newly",
"created",
"one",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java#L358-L363 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/ShortCutModifierUtils.java | ShortCutModifierUtils.getCtrlOrMetaModifier | public static int getCtrlOrMetaModifier() {
final WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
if (webBrowser.isMacOSX()) {
return ShortcutAction.ModifierKey.META;
}
return ShortcutAction.ModifierKey.CTRL;
} | java | public static int getCtrlOrMetaModifier() {
final WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
if (webBrowser.isMacOSX()) {
return ShortcutAction.ModifierKey.META;
}
return ShortcutAction.ModifierKey.CTRL;
} | [
"public",
"static",
"int",
"getCtrlOrMetaModifier",
"(",
")",
"{",
"final",
"WebBrowser",
"webBrowser",
"=",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getWebBrowser",
"(",
")",
";",
"if",
"(",
"webBrowser",
".",
"isMacOSX",
"(",
")",
")",
"{",
"return",
... | Returns the ctrl or meta modifier depending on the platform.
@return on mac return
{@link com.vaadin.event.ShortcutAction.ModifierKey#META} other
platform return
{@link com.vaadin.event.ShortcutAction.ModifierKey#CTRL} | [
"Returns",
"the",
"ctrl",
"or",
"meta",
"modifier",
"depending",
"on",
"the",
"platform",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/ShortCutModifierUtils.java#L33-L40 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.getPreviewButtonColor | protected void getPreviewButtonColor(final String color) {
Page.getCurrent().getJavaScript().execute(HawkbitCommonUtil.getPreviewButtonColorScript(color));
} | java | protected void getPreviewButtonColor(final String color) {
Page.getCurrent().getJavaScript().execute(HawkbitCommonUtil.getPreviewButtonColorScript(color));
} | [
"protected",
"void",
"getPreviewButtonColor",
"(",
"final",
"String",
"color",
")",
"{",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getJavaScript",
"(",
")",
".",
"execute",
"(",
"HawkbitCommonUtil",
".",
"getPreviewButtonColorScript",
"(",
"color",
")",
")",
... | Dynamic styles for window.
@param top
int value
@param marginLeft
int value | [
"Dynamic",
"styles",
"for",
"window",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L274-L276 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.createDynamicStyleForComponents | protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
final String taregtTagColor) {
tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
getTargetDynamicStyles(taregtTagColor);
tagName... | java | protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
final String taregtTagColor) {
tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
getTargetDynamicStyles(taregtTagColor);
tagName... | [
"protected",
"void",
"createDynamicStyleForComponents",
"(",
"final",
"TextField",
"tagName",
",",
"final",
"TextArea",
"tagDesc",
",",
"final",
"String",
"taregtTagColor",
")",
"{",
"tagName",
".",
"removeStyleName",
"(",
"SPUIDefinitions",
".",
"TAG_NAME",
")",
";... | Set tag name and desc field border color based on chosen color.
@param tagName
@param tagDesc
@param taregtTagColor | [
"Set",
"tag",
"name",
"and",
"desc",
"field",
"border",
"color",
"based",
"on",
"chosen",
"color",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L285-L292 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.restoreComponentStyles | protected void restoreComponentStyles() {
tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
tagName.addStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
getPreviewButtonColor(ColorPickerConstants.D... | java | protected void restoreComponentStyles() {
tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
tagName.addStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
getPreviewButtonColor(ColorPickerConstants.D... | [
"protected",
"void",
"restoreComponentStyles",
"(",
")",
"{",
"tagName",
".",
"removeStyleName",
"(",
"TAG_NAME_DYNAMIC_STYLE",
")",
";",
"tagDesc",
".",
"removeStyleName",
"(",
"TAG_DESC_DYNAMIC_STYLE",
")",
";",
"tagName",
".",
"addStyleName",
"(",
"SPUIDefinitions"... | reset the tag name and tag description component border color. | [
"reset",
"the",
"tag",
"name",
"and",
"tag",
"description",
"component",
"border",
"color",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L297-L303 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.createWindow | public CommonDialogWindow createWindow() {
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getWindowCaption()).content(this)
.cancelButtonClickListener(event -> discard()).layout(mainLayout).i18n(i18n)
.saveDialogCloseListener(new SaveOnDialogCloseListene... | java | public CommonDialogWindow createWindow() {
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getWindowCaption()).content(this)
.cancelButtonClickListener(event -> discard()).layout(mainLayout).i18n(i18n)
.saveDialogCloseListener(new SaveOnDialogCloseListene... | [
"public",
"CommonDialogWindow",
"createWindow",
"(",
")",
"{",
"window",
"=",
"new",
"WindowBuilder",
"(",
"SPUIDefinitions",
".",
"CREATE_UPDATE_WINDOW",
")",
".",
"caption",
"(",
"getWindowCaption",
"(",
")",
")",
".",
"content",
"(",
"this",
")",
".",
"canc... | Creates the window to create or update a tag or type
@return the created window | [
"Creates",
"the",
"window",
"to",
"create",
"or",
"update",
"a",
"tag",
"or",
"type"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L362-L367 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.previewButtonClicked | private void previewButtonClicked() {
if (!tagPreviewBtnClicked) {
colorPickerLayout
.setSelectedColor(ColorPickerHelper.rgbToColorConverter(ColorPickerConstants.DEFAULT_COLOR));
}
tagPreviewBtnClicked = !tagPreviewBtnClicked;
colorPickerLayout.setVisible... | java | private void previewButtonClicked() {
if (!tagPreviewBtnClicked) {
colorPickerLayout
.setSelectedColor(ColorPickerHelper.rgbToColorConverter(ColorPickerConstants.DEFAULT_COLOR));
}
tagPreviewBtnClicked = !tagPreviewBtnClicked;
colorPickerLayout.setVisible... | [
"private",
"void",
"previewButtonClicked",
"(",
")",
"{",
"if",
"(",
"!",
"tagPreviewBtnClicked",
")",
"{",
"colorPickerLayout",
".",
"setSelectedColor",
"(",
"ColorPickerHelper",
".",
"rgbToColorConverter",
"(",
"ColorPickerConstants",
".",
"DEFAULT_COLOR",
")",
")",... | Open color picker on click of preview button. Auto select the color based
on target tag if already selected. | [
"Open",
"color",
"picker",
"on",
"click",
"of",
"preview",
"button",
".",
"Auto",
"select",
"the",
"color",
"based",
"on",
"target",
"tag",
"if",
"already",
"selected",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L491-L499 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.getTargetDynamicStyles | private static void getTargetDynamicStyles(final String colorPickedPreview) {
Page.getCurrent().getJavaScript()
.execute(HawkbitCommonUtil.changeToNewSelectedPreviewColor(colorPickedPreview));
} | java | private static void getTargetDynamicStyles(final String colorPickedPreview) {
Page.getCurrent().getJavaScript()
.execute(HawkbitCommonUtil.changeToNewSelectedPreviewColor(colorPickedPreview));
} | [
"private",
"static",
"void",
"getTargetDynamicStyles",
"(",
"final",
"String",
"colorPickedPreview",
")",
"{",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getJavaScript",
"(",
")",
".",
"execute",
"(",
"HawkbitCommonUtil",
".",
"changeToNewSelectedPreviewColor",
"(",... | Get target style - Dynamically as per the color picked, cannot be done
from the static css.
@param colorPickedPreview | [
"Get",
"target",
"style",
"-",
"Dynamically",
"as",
"per",
"the",
"color",
"picked",
"cannot",
"be",
"done",
"from",
"the",
"static",
"css",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L507-L510 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.slidersValueChangeListeners | private void slidersValueChangeListeners() {
colorPickerLayout.getRedSlider().addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(final ValueChangeEvent event) {
final double re... | java | private void slidersValueChangeListeners() {
colorPickerLayout.getRedSlider().addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(final ValueChangeEvent event) {
final double re... | [
"private",
"void",
"slidersValueChangeListeners",
"(",
")",
"{",
"colorPickerLayout",
".",
"getRedSlider",
"(",
")",
".",
"addValueChangeListener",
"(",
"new",
"ValueChangeListener",
"(",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",... | Value change listeners implementations of sliders. | [
"Value",
"change",
"listeners",
"implementations",
"of",
"sliders",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L515-L549 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleSpServerRtExceptions | @ExceptionHandler(AbstractServerRtException.class)
public ResponseEntity<ExceptionInfo> handleSpServerRtExceptions(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(ex);
final HttpStatus responseSta... | java | @ExceptionHandler(AbstractServerRtException.class)
public ResponseEntity<ExceptionInfo> handleSpServerRtExceptions(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(ex);
final HttpStatus responseSta... | [
"@",
"ExceptionHandler",
"(",
"AbstractServerRtException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleSpServerRtExceptions",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Exception",
"ex",
")",
"{",
"logRequest",
"... | method for handling exception of type AbstractServerRtException. Called
by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing the exception information
as entity. | [
"method",
"for",
"handling",
"exception",
"of",
"type",
"AbstractServerRtException",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework",
"for",
"exception",
"handling",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L99-L111 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleHttpMessageNotReadableException | @ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ExceptionInfo> handleHttpMessageNotReadableException(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(new MessageNotReadableEx... | java | @ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ExceptionInfo> handleHttpMessageNotReadableException(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(new MessageNotReadableEx... | [
"@",
"ExceptionHandler",
"(",
"HttpMessageNotReadableException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleHttpMessageNotReadableException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Exception",
"ex",
")",
"{",
... | Method for handling exception of type HttpMessageNotReadableException
which is thrown in case the request body is not well formed and cannot be
deserialized. Called by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded ... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"HttpMessageNotReadableException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"body",
"is",
"not",
"well",
"formed",
"and",
"cannot",
"be",
"deserialized",
".",
"Called",
"by",
"the",
"Spring"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L125-L131 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleConstraintViolationException | @ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request,
final ConstraintViolationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
r... | java | @ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request,
final ConstraintViolationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
r... | [
"@",
"ExceptionHandler",
"(",
"ConstraintViolationException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleConstraintViolationException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"ConstraintViolationException",
"ex",
"... | Method for handling exception of type ConstraintViolationException which
is thrown in case the request is rejected due to a constraint violation.
Called by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing t... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"ConstraintViolationException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"is",
"rejected",
"due",
"to",
"a",
"constraint",
"violation",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L145-L158 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleValidationException | @ExceptionHandler(ValidationException.class)
public ResponseEntity<ExceptionInfo> handleValidationException(final HttpServletRequest request,
final ValidationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
response.setMessage(ex.getMe... | java | @ExceptionHandler(ValidationException.class)
public ResponseEntity<ExceptionInfo> handleValidationException(final HttpServletRequest request,
final ValidationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
response.setMessage(ex.getMe... | [
"@",
"ExceptionHandler",
"(",
"ValidationException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleValidationException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"ValidationException",
"ex",
")",
"{",
"logRequest",
... | Method for handling exception of type ValidationException which is thrown
in case the request is rejected due to invalid requests. Called by the
Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing the exception in... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"ValidationException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"is",
"rejected",
"due",
"to",
"invalid",
"requests",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework",
"for",
"except... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L172-L183 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/AbstractTableDetailsLayout.java | AbstractTableDetailsLayout.onBaseEntityEvent | protected void onBaseEntityEvent(final BaseUIEntityEvent<T> baseEntityEvent) {
final BaseEntityEventType eventType = baseEntityEvent.getEventType();
if (BaseEntityEventType.SELECTED_ENTITY == eventType || BaseEntityEventType.UPDATED_ENTITY == eventType
|| BaseEntityEventType.REMOVE_ENTIT... | java | protected void onBaseEntityEvent(final BaseUIEntityEvent<T> baseEntityEvent) {
final BaseEntityEventType eventType = baseEntityEvent.getEventType();
if (BaseEntityEventType.SELECTED_ENTITY == eventType || BaseEntityEventType.UPDATED_ENTITY == eventType
|| BaseEntityEventType.REMOVE_ENTIT... | [
"protected",
"void",
"onBaseEntityEvent",
"(",
"final",
"BaseUIEntityEvent",
"<",
"T",
">",
"baseEntityEvent",
")",
"{",
"final",
"BaseEntityEventType",
"eventType",
"=",
"baseEntityEvent",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"BaseEntityEventType",
".",
... | Default implementation to handle an entity event.
@param baseEntityEvent
the event | [
"Default",
"implementation",
"to",
"handle",
"an",
"entity",
"event",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/AbstractTableDetailsLayout.java#L129-L139 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.dmfReceiverQueue | @Bean
public Queue dmfReceiverQueue() {
return new Queue(amqpProperties.getReceiverQueue(), true, false, false,
amqpDeadletterProperties.getDeadLetterExchangeArgs(amqpProperties.getDeadLetterExchange()));
} | java | @Bean
public Queue dmfReceiverQueue() {
return new Queue(amqpProperties.getReceiverQueue(), true, false, false,
amqpDeadletterProperties.getDeadLetterExchangeArgs(amqpProperties.getDeadLetterExchange()));
} | [
"@",
"Bean",
"public",
"Queue",
"dmfReceiverQueue",
"(",
")",
"{",
"return",
"new",
"Queue",
"(",
"amqpProperties",
".",
"getReceiverQueue",
"(",
")",
",",
"true",
",",
"false",
",",
"false",
",",
"amqpDeadletterProperties",
".",
"getDeadLetterExchangeArgs",
"("... | Create the DMF API receiver queue for retrieving DMF messages.
@return the receiver queue | [
"Create",
"the",
"DMF",
"API",
"receiver",
"queue",
"for",
"retrieving",
"DMF",
"messages",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L135-L139 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.authenticationReceiverQueue | @Bean
public Queue authenticationReceiverQueue() {
return QueueBuilder.nonDurable(amqpProperties.getAuthenticationReceiverQueue()).autoDelete()
.withArguments(getTTLMaxArgsAuthenticationQueue()).build();
} | java | @Bean
public Queue authenticationReceiverQueue() {
return QueueBuilder.nonDurable(amqpProperties.getAuthenticationReceiverQueue()).autoDelete()
.withArguments(getTTLMaxArgsAuthenticationQueue()).build();
} | [
"@",
"Bean",
"public",
"Queue",
"authenticationReceiverQueue",
"(",
")",
"{",
"return",
"QueueBuilder",
".",
"nonDurable",
"(",
"amqpProperties",
".",
"getAuthenticationReceiverQueue",
"(",
")",
")",
".",
"autoDelete",
"(",
")",
".",
"withArguments",
"(",
"getTTLM... | Create the DMF API receiver queue for authentication requests called by
3rd party artifact storages for download authorization by devices.
@return the receiver queue | [
"Create",
"the",
"DMF",
"API",
"receiver",
"queue",
"for",
"authentication",
"requests",
"called",
"by",
"3rd",
"party",
"artifact",
"storages",
"for",
"download",
"authorization",
"by",
"devices",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L147-L151 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.amqpMessageHandlerService | @Bean
public AmqpMessageHandlerService amqpMessageHandlerService(final RabbitTemplate rabbitTemplate,
final AmqpMessageDispatcherService amqpMessageDispatcherService,
final ControllerManagement controllerManagement, final EntityFactory entityFactory) {
return new AmqpMessageHandlerSe... | java | @Bean
public AmqpMessageHandlerService amqpMessageHandlerService(final RabbitTemplate rabbitTemplate,
final AmqpMessageDispatcherService amqpMessageDispatcherService,
final ControllerManagement controllerManagement, final EntityFactory entityFactory) {
return new AmqpMessageHandlerSe... | [
"@",
"Bean",
"public",
"AmqpMessageHandlerService",
"amqpMessageHandlerService",
"(",
"final",
"RabbitTemplate",
"rabbitTemplate",
",",
"final",
"AmqpMessageDispatcherService",
"amqpMessageDispatcherService",
",",
"final",
"ControllerManagement",
"controllerManagement",
",",
"fin... | Create AMQP handler service bean.
@param rabbitTemplate
for converting messages
@param amqpMessageDispatcherService
to sending events to DMF client
@param controllerManagement
for target repo access
@param entityFactory
to create entities
@return handler service bean | [
"Create",
"AMQP",
"handler",
"service",
"bean",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L240-L246 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.listenerContainerFactory | @Bean
@ConditionalOnMissingBean(name = "listenerContainerFactory")
public RabbitListenerContainerFactory<SimpleMessageListenerContainer> listenerContainerFactory(
final SimpleRabbitListenerContainerFactoryConfigurer configurer, final ErrorHandler errorHandler) {
final ConfigurableRabbitListe... | java | @Bean
@ConditionalOnMissingBean(name = "listenerContainerFactory")
public RabbitListenerContainerFactory<SimpleMessageListenerContainer> listenerContainerFactory(
final SimpleRabbitListenerContainerFactoryConfigurer configurer, final ErrorHandler errorHandler) {
final ConfigurableRabbitListe... | [
"@",
"Bean",
"@",
"ConditionalOnMissingBean",
"(",
"name",
"=",
"\"listenerContainerFactory\"",
")",
"public",
"RabbitListenerContainerFactory",
"<",
"SimpleMessageListenerContainer",
">",
"listenerContainerFactory",
"(",
"final",
"SimpleRabbitListenerContainerFactoryConfigurer",
... | Create RabbitListenerContainerFactory bean if no listenerContainerFactory
bean found
@return RabbitListenerContainerFactory bean | [
"Create",
"RabbitListenerContainerFactory",
"bean",
"if",
"no",
"listenerContainerFactory",
"bean",
"found"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L279-L287 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.amqpControllerAuthentication | @Bean
@ConditionalOnMissingBean(AmqpControllerAuthentication.class)
public AmqpControllerAuthentication amqpControllerAuthentication(final SystemManagement systemManagement,
final ControllerManagement controllerManagement,
final TenantConfigurationManagement tenantConfigurationManagement... | java | @Bean
@ConditionalOnMissingBean(AmqpControllerAuthentication.class)
public AmqpControllerAuthentication amqpControllerAuthentication(final SystemManagement systemManagement,
final ControllerManagement controllerManagement,
final TenantConfigurationManagement tenantConfigurationManagement... | [
"@",
"Bean",
"@",
"ConditionalOnMissingBean",
"(",
"AmqpControllerAuthentication",
".",
"class",
")",
"public",
"AmqpControllerAuthentication",
"amqpControllerAuthentication",
"(",
"final",
"SystemManagement",
"systemManagement",
",",
"final",
"ControllerManagement",
"controlle... | create the authentication bean for controller over amqp.
@param systemManagement
the systemManagement
@param controllerManagement
the controllerManagement
@param tenantConfigurationManagement
the tenantConfigurationManagement
@param tenantAware
the tenantAware
@param ddiSecruityProperties
the ddiSecruityProperties
@pa... | [
"create",
"the",
"authentication",
"bean",
"for",
"controller",
"over",
"amqp",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L306-L314 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/AbstractNotificationView.java | AbstractNotificationView.refreshView | public void refreshView(final Set<Class<?>> eventContainers) {
eventContainers.stream().filter(this::supportNotificationEventContainer).forEach(this::refreshContainer);
clear();
} | java | public void refreshView(final Set<Class<?>> eventContainers) {
eventContainers.stream().filter(this::supportNotificationEventContainer).forEach(this::refreshContainer);
clear();
} | [
"public",
"void",
"refreshView",
"(",
"final",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"eventContainers",
")",
"{",
"eventContainers",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"this",
"::",
"supportNotificationEventContainer",
")",
".",
"forEach",
"(",
... | Refresh the view by event container changes.
@param eventContainers
event container which container changed | [
"Refresh",
"the",
"view",
"by",
"event",
"container",
"changes",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/AbstractNotificationView.java#L122-L125 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/TextFieldBuilder.java | TextFieldBuilder.createSearchField | public TextField createSearchField(final TextChangeListener textChangeListener) {
final TextField textField = style("filter-box").styleName("text-style filter-box-hide").buildTextComponent();
textField.setWidth(100.0F, Unit.PERCENTAGE);
textField.addTextChangeListener(textChangeListener);
... | java | public TextField createSearchField(final TextChangeListener textChangeListener) {
final TextField textField = style("filter-box").styleName("text-style filter-box-hide").buildTextComponent();
textField.setWidth(100.0F, Unit.PERCENTAGE);
textField.addTextChangeListener(textChangeListener);
... | [
"public",
"TextField",
"createSearchField",
"(",
"final",
"TextChangeListener",
"textChangeListener",
")",
"{",
"final",
"TextField",
"textField",
"=",
"style",
"(",
"\"filter-box\"",
")",
".",
"styleName",
"(",
"\"text-style filter-box-hide\"",
")",
".",
"buildTextComp... | Create a search text field.
@param textChangeListener
listener when text is changed.
@return the textfield | [
"Create",
"a",
"search",
"text",
"field",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/TextFieldBuilder.java#L41-L49 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java | DistributionSetSelectWindow.showForTargetFilter | public void showForTargetFilter(final Long tfqId) {
this.tfqId = tfqId;
final TargetFilterQuery tfq = targetFilterQueryManagement.get(tfqId)
.orElseThrow(() -> new EntityNotFoundException(TargetFilterQuery.class, tfqId));
final VerticalLayout verticalLayout = initView();
... | java | public void showForTargetFilter(final Long tfqId) {
this.tfqId = tfqId;
final TargetFilterQuery tfq = targetFilterQueryManagement.get(tfqId)
.orElseThrow(() -> new EntityNotFoundException(TargetFilterQuery.class, tfqId));
final VerticalLayout verticalLayout = initView();
... | [
"public",
"void",
"showForTargetFilter",
"(",
"final",
"Long",
"tfqId",
")",
"{",
"this",
".",
"tfqId",
"=",
"tfqId",
";",
"final",
"TargetFilterQuery",
"tfq",
"=",
"targetFilterQueryManagement",
".",
"get",
"(",
"tfqId",
")",
".",
"orElseThrow",
"(",
"(",
"... | Shows a distribution set select window for the given target filter query
@param tfqId
target filter query id | [
"Shows",
"a",
"distribution",
"set",
"select",
"window",
"for",
"the",
"given",
"target",
"filter",
"query"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java#L100-L121 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java | DistributionSetSelectWindow.saveOrUpdate | @Override
public void saveOrUpdate() {
if (checkBox.getValue() && dsCombo.getValue() != null) {
final ActionType autoAssignActionType = ((ActionTypeOption) actionTypeOptionGroupLayout
.getActionTypeOptionGroup().getValue()).getActionType();
updateTargetFilterQuery... | java | @Override
public void saveOrUpdate() {
if (checkBox.getValue() && dsCombo.getValue() != null) {
final ActionType autoAssignActionType = ((ActionTypeOption) actionTypeOptionGroupLayout
.getActionTypeOptionGroup().getValue()).getActionType();
updateTargetFilterQuery... | [
"@",
"Override",
"public",
"void",
"saveOrUpdate",
"(",
")",
"{",
"if",
"(",
"checkBox",
".",
"getValue",
"(",
")",
"&&",
"dsCombo",
".",
"getValue",
"(",
")",
"!=",
"null",
")",
"{",
"final",
"ActionType",
"autoAssignActionType",
"=",
"(",
"(",
"ActionT... | Is called when the new value should be saved after the save button has
been clicked | [
"Is",
"called",
"when",
"the",
"new",
"value",
"should",
"be",
"saved",
"after",
"the",
"save",
"button",
"has",
"been",
"clicked"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java#L181-L190 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/ManagementViewClientCriterion.java | ManagementViewClientCriterion.createViewComponentClientCriteria | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[4];
// Target table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilder()
... | java | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[4];
// Target table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilder()
... | [
"static",
"ServerViewComponentClientCriterion",
"[",
"]",
"createViewComponentClientCriteria",
"(",
")",
"{",
"final",
"ServerViewComponentClientCriterion",
"[",
"]",
"criteria",
"=",
"new",
"ServerViewComponentClientCriterion",
"[",
"4",
"]",
";",
"// Target table acceptable... | Configures the elements of the composite accept criterion for the
Management View.
@return accept criterion elements | [
"Configures",
"the",
"elements",
"of",
"the",
"composite",
"accept",
"criterion",
"for",
"the",
"Management",
"View",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/ManagementViewClientCriterion.java#L49-L78 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.trimAndNullIfEmpty | public static String trimAndNullIfEmpty(final String text) {
if (text != null && !text.trim().isEmpty()) {
return text.trim();
}
return null;
} | java | public static String trimAndNullIfEmpty(final String text) {
if (text != null && !text.trim().isEmpty()) {
return text.trim();
}
return null;
} | [
"public",
"static",
"String",
"trimAndNullIfEmpty",
"(",
"final",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
"&&",
"!",
"text",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"text",
".",
"trim",
"(",
")",
";... | Trims the text and converts into null in case of an empty string.
@param text
text to be trimmed
@return null if the text is null or if the text is blank, text.trim() if
the text is not empty. | [
"Trims",
"the",
"text",
"and",
"converts",
"into",
"null",
"in",
"case",
"of",
"an",
"empty",
"string",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L90-L95 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.concatStrings | public static String concatStrings(final String delimiter, final String... texts) {
final String delim = delimiter == null ? "" : delimiter;
final StringBuilder conCatStrBldr = new StringBuilder();
if (null != texts) {
for (final String text : texts) {
conCatStrBldr.a... | java | public static String concatStrings(final String delimiter, final String... texts) {
final String delim = delimiter == null ? "" : delimiter;
final StringBuilder conCatStrBldr = new StringBuilder();
if (null != texts) {
for (final String text : texts) {
conCatStrBldr.a... | [
"public",
"static",
"String",
"concatStrings",
"(",
"final",
"String",
"delimiter",
",",
"final",
"String",
"...",
"texts",
")",
"{",
"final",
"String",
"delim",
"=",
"delimiter",
"==",
"null",
"?",
"\"\"",
":",
"delimiter",
";",
"final",
"StringBuilder",
"c... | Concatenate the given text all the string arguments with the given
delimiter.
@param delimiter
the delimiter text to be used while concatenation.
@param texts
all these string values will be concatenated with the given
delimiter.
@return null in case no text arguments to be compared. just concatenation
of all texts ar... | [
"Concatenate",
"the",
"given",
"text",
"all",
"the",
"string",
"arguments",
"with",
"the",
"given",
"delimiter",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L111-L122 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getSoftwareModuleName | public static String getSoftwareModuleName(final String caption, final String name) {
return new StringBuilder()
.append(DIV_DESCRIPTION_START + caption + " : " + getBoldHTMLText(getFormattedName(name)))
.append(DIV_DESCRIPTION_END).toString();
} | java | public static String getSoftwareModuleName(final String caption, final String name) {
return new StringBuilder()
.append(DIV_DESCRIPTION_START + caption + " : " + getBoldHTMLText(getFormattedName(name)))
.append(DIV_DESCRIPTION_END).toString();
} | [
"public",
"static",
"String",
"getSoftwareModuleName",
"(",
"final",
"String",
"caption",
",",
"final",
"String",
"name",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"DIV_DESCRIPTION_START",
"+",
"caption",
"+",
"\" : \"",
"+",
"g... | Get Label for Artifact Details.
@param caption
as caption of the details
@param name
as name
@return SoftwareModuleName | [
"Get",
"Label",
"for",
"Artifact",
"Details",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L152-L156 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getPollStatusToolTip | public static String getPollStatusToolTip(final PollStatus pollStatus, final VaadinMessageSource i18N) {
if (pollStatus != null && pollStatus.getLastPollDate() != null && pollStatus.isOverdue()) {
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
return i18N.getMessage(UIMessageId... | java | public static String getPollStatusToolTip(final PollStatus pollStatus, final VaadinMessageSource i18N) {
if (pollStatus != null && pollStatus.getLastPollDate() != null && pollStatus.isOverdue()) {
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
return i18N.getMessage(UIMessageId... | [
"public",
"static",
"String",
"getPollStatusToolTip",
"(",
"final",
"PollStatus",
"pollStatus",
",",
"final",
"VaadinMessageSource",
"i18N",
")",
"{",
"if",
"(",
"pollStatus",
"!=",
"null",
"&&",
"pollStatus",
".",
"getLastPollDate",
"(",
")",
"!=",
"null",
"&&"... | Get tool tip for Poll status.
@param pollStatus
@param i18N
@return PollStatusToolTip | [
"Get",
"tool",
"tip",
"for",
"Poll",
"status",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L165-L174 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getFormattedName | public static String getFormattedName(final String orgText) {
return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText;
} | java | public static String getFormattedName(final String orgText) {
return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText;
} | [
"public",
"static",
"String",
"getFormattedName",
"(",
"final",
"String",
"orgText",
")",
"{",
"return",
"trimAndNullIfEmpty",
"(",
"orgText",
")",
"==",
"null",
"?",
"SPUIDefinitions",
".",
"SPACE",
":",
"orgText",
";",
"}"
] | Null check for text.
@param orgText
text to be formatted
@return String formatted text | [
"Null",
"check",
"for",
"text",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L183-L185 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getArtifactUploadPopupWidth | public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) {
final float extraWidth = findRequiredSwModuleExtraWidth(newBrowserWidth);
if (extraWidth + minPopupWidth > SPUIDefinitions.MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH) {
return SPUIDefinitions.MAX... | java | public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) {
final float extraWidth = findRequiredSwModuleExtraWidth(newBrowserWidth);
if (extraWidth + minPopupWidth > SPUIDefinitions.MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH) {
return SPUIDefinitions.MAX... | [
"public",
"static",
"float",
"getArtifactUploadPopupWidth",
"(",
"final",
"float",
"newBrowserWidth",
",",
"final",
"int",
"minPopupWidth",
")",
"{",
"final",
"float",
"extraWidth",
"=",
"findRequiredSwModuleExtraWidth",
"(",
"newBrowserWidth",
")",
";",
"if",
"(",
... | Get artifact upload pop up width.
@param newBrowserWidth
new browser width
@param minPopupWidth
minimum popup width
@return float new pop up width | [
"Get",
"artifact",
"upload",
"pop",
"up",
"width",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L202-L208 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.removePrefix | public static String removePrefix(final String text, final String prefix) {
if (text != null) {
return text.replaceFirst(prefix, "");
}
return null;
} | java | public static String removePrefix(final String text, final String prefix) {
if (text != null) {
return text.replaceFirst(prefix, "");
}
return null;
} | [
"public",
"static",
"String",
"removePrefix",
"(",
"final",
"String",
"text",
",",
"final",
"String",
"prefix",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"return",
"text",
".",
"replaceFirst",
"(",
"prefix",
",",
"\"\"",
")",
";",
"}",
"retu... | Remove the prefix from text.
@param text
name
@param prefix
text to be removed
@return String name | [
"Remove",
"the",
"prefix",
"from",
"text",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L234-L239 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getFormatedLabel | public static Label getFormatedLabel(final String labelContent) {
final Label labelValue = new Label(labelContent, ContentMode.HTML);
labelValue.setSizeFull();
labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE);
labelValue.addStyleName("label-style");
return labelValue;
} | java | public static Label getFormatedLabel(final String labelContent) {
final Label labelValue = new Label(labelContent, ContentMode.HTML);
labelValue.setSizeFull();
labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE);
labelValue.addStyleName("label-style");
return labelValue;
} | [
"public",
"static",
"Label",
"getFormatedLabel",
"(",
"final",
"String",
"labelContent",
")",
"{",
"final",
"Label",
"labelValue",
"=",
"new",
"Label",
"(",
"labelContent",
",",
"ContentMode",
".",
"HTML",
")",
";",
"labelValue",
".",
"setSizeFull",
"(",
")",
... | Get formatted label.Appends ellipses if content does not fit the label.
@param labelContent
content
@return Label | [
"Get",
"formatted",
"label",
".",
"Appends",
"ellipses",
"if",
"content",
"does",
"not",
"fit",
"the",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L248-L254 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createAssignmentMessage | public static String createAssignmentMessage(final String tagName,
final AssignmentResult<? extends NamedEntity> result, final VaadinMessageSource i18n) {
final StringBuilder formMsg = new StringBuilder();
final int assignedCount = result.getAssigned();
final int alreadyAssignedCount... | java | public static String createAssignmentMessage(final String tagName,
final AssignmentResult<? extends NamedEntity> result, final VaadinMessageSource i18n) {
final StringBuilder formMsg = new StringBuilder();
final int assignedCount = result.getAssigned();
final int alreadyAssignedCount... | [
"public",
"static",
"String",
"createAssignmentMessage",
"(",
"final",
"String",
"tagName",
",",
"final",
"AssignmentResult",
"<",
"?",
"extends",
"NamedEntity",
">",
"result",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"final",
"StringBuilder",
"formMsg... | Display Target Tag action message.
@param tagName
as tag name
@param result
as TargetTagAssigmentResult
@param i18n
I18N
@return message | [
"Display",
"Target",
"Tag",
"action",
"message",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L296-L320 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createLazyQueryContainer | public static LazyQueryContainer createLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, SPUILabelDefinitions.VAR_NAME), queryF... | java | public static LazyQueryContainer createLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, SPUILabelDefinitions.VAR_NAME), queryF... | [
"public",
"static",
"LazyQueryContainer",
"createLazyQueryContainer",
"(",
"final",
"BeanQueryFactory",
"<",
"?",
"extends",
"AbstractBeanQuery",
"<",
"?",
">",
">",
"queryFactory",
")",
"{",
"queryFactory",
".",
"setQueryConfiguration",
"(",
"Collections",
".",
"empt... | Create a lazy query container for the given query bean factory with empty
configurations.
@param queryFactory
is reference of {@link BeanQueryFactory<? extends
AbstractBeanQuery>} on which lazy container should create.
@return instance of {@link LazyQueryContainer}. | [
"Create",
"a",
"lazy",
"query",
"container",
"for",
"the",
"given",
"query",
"bean",
"factory",
"with",
"empty",
"configurations",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L331-L335 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createDSLazyQueryContainer | public static LazyQueryContainer createDSLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory);
} | java | public static LazyQueryContainer createDSLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory);
} | [
"public",
"static",
"LazyQueryContainer",
"createDSLazyQueryContainer",
"(",
"final",
"BeanQueryFactory",
"<",
"?",
"extends",
"AbstractBeanQuery",
"<",
"?",
">",
">",
"queryFactory",
")",
"{",
"queryFactory",
".",
"setQueryConfiguration",
"(",
"Collections",
".",
"em... | Create lazy query container for DS type.
@param queryFactory
@return LazyQueryContainer | [
"Create",
"lazy",
"query",
"container",
"for",
"DS",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L343-L347 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getDsTableColumnProperties | public static void getDsTableColumnProperties(final Container container) {
final LazyQueryContainer lqc = (LazyQueryContainer) container;
lqc.addContainerProperty(SPUILabelDefinitions.VAR_ID, Long.class, null, false, false);
lqc.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, "... | java | public static void getDsTableColumnProperties(final Container container) {
final LazyQueryContainer lqc = (LazyQueryContainer) container;
lqc.addContainerProperty(SPUILabelDefinitions.VAR_ID, Long.class, null, false, false);
lqc.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, "... | [
"public",
"static",
"void",
"getDsTableColumnProperties",
"(",
"final",
"Container",
"container",
")",
"{",
"final",
"LazyQueryContainer",
"lqc",
"=",
"(",
"LazyQueryContainer",
")",
"container",
";",
"lqc",
".",
"addContainerProperty",
"(",
"SPUILabelDefinitions",
".... | Set distribution table column properties.
@param container
table container | [
"Set",
"distribution",
"table",
"column",
"properties",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L355-L365 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getScriptSMHighlightWithColor | public static String getScriptSMHighlightWithColor(final String colorCSS) {
return new StringBuilder().append(SM_HIGHLIGHT_SCRIPT_CURRENT)
.append("smHighlightStyle = smHighlightStyle + \"").append(colorCSS).append("\";")
.append(SM_HIGHLIGHT_SCRIPT_APPEND).toString();
} | java | public static String getScriptSMHighlightWithColor(final String colorCSS) {
return new StringBuilder().append(SM_HIGHLIGHT_SCRIPT_CURRENT)
.append("smHighlightStyle = smHighlightStyle + \"").append(colorCSS).append("\";")
.append(SM_HIGHLIGHT_SCRIPT_APPEND).toString();
} | [
"public",
"static",
"String",
"getScriptSMHighlightWithColor",
"(",
"final",
"String",
"colorCSS",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"SM_HIGHLIGHT_SCRIPT_CURRENT",
")",
".",
"append",
"(",
"\"smHighlightStyle = smHighlightStyle + ... | Highlight software module rows with the color of sw-type.
@param colorCSS
color to generate the css script.
@return javascript to append software module table rows with highlighted
color. | [
"Highlight",
"software",
"module",
"rows",
"with",
"the",
"color",
"of",
"sw",
"-",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L384-L388 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.changeToNewSelectedPreviewColor | public static String changeToNewSelectedPreviewColor(final String colorPickedPreview) {
return new StringBuilder().append(NEW_PREVIEW_COLOR_REMOVE_SCRIPT).append(NEW_PREVIEW_COLOR_CREATE_SCRIPT)
.append("var newColorPreviewStyle = \".v-app .new-tag-name{ border: solid 3px ")
.app... | java | public static String changeToNewSelectedPreviewColor(final String colorPickedPreview) {
return new StringBuilder().append(NEW_PREVIEW_COLOR_REMOVE_SCRIPT).append(NEW_PREVIEW_COLOR_CREATE_SCRIPT)
.append("var newColorPreviewStyle = \".v-app .new-tag-name{ border: solid 3px ")
.app... | [
"public",
"static",
"String",
"changeToNewSelectedPreviewColor",
"(",
"final",
"String",
"colorPickedPreview",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"NEW_PREVIEW_COLOR_REMOVE_SCRIPT",
")",
".",
"append",
"(",
"NEW_PREVIEW_COLOR_CREATE... | Get javascript to reflect new color selection in color picker preview for
name and description fields .
@param colorPickedPreview
changed color
@return javascript for the selected color. | [
"Get",
"javascript",
"to",
"reflect",
"new",
"color",
"selection",
"in",
"color",
"picker",
"preview",
"for",
"name",
"and",
"description",
"fields",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L398-L407 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getPreviewButtonColorScript | public static String getPreviewButtonColorScript(final String color) {
return new StringBuilder().append(PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT).append(PREVIEW_BUTTON_COLOR_CREATE_SCRIPT)
.append("var tagColorPreviewStyle = \".v-app .tag-color-preview{ height: 15px !important; padding: 0 10px !impor... | java | public static String getPreviewButtonColorScript(final String color) {
return new StringBuilder().append(PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT).append(PREVIEW_BUTTON_COLOR_CREATE_SCRIPT)
.append("var tagColorPreviewStyle = \".v-app .tag-color-preview{ height: 15px !important; padding: 0 10px !impor... | [
"public",
"static",
"String",
"getPreviewButtonColorScript",
"(",
"final",
"String",
"color",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT",
")",
".",
"append",
"(",
"PREVIEW_BUTTON_COLOR_CREATE_SCRIPT",
... | Get javascript to reflect new color selection for preview button.
@param color
changed color
@return javascript for the selected color. | [
"Get",
"javascript",
"to",
"reflect",
"new",
"color",
"selection",
"for",
"preview",
"button",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L416-L422 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.applyStatusLblStyle | public static void applyStatusLblStyle(final Table targetTable, final Button pinBtn, final Object itemId) {
final Item item = targetTable.getItem(itemId);
if (item != null) {
final TargetUpdateStatus updateStatus = (TargetUpdateStatus) item
.getItemProperty(SPUILabelDefin... | java | public static void applyStatusLblStyle(final Table targetTable, final Button pinBtn, final Object itemId) {
final Item item = targetTable.getItem(itemId);
if (item != null) {
final TargetUpdateStatus updateStatus = (TargetUpdateStatus) item
.getItemProperty(SPUILabelDefin... | [
"public",
"static",
"void",
"applyStatusLblStyle",
"(",
"final",
"Table",
"targetTable",
",",
"final",
"Button",
"pinBtn",
",",
"final",
"Object",
"itemId",
")",
"{",
"final",
"Item",
"item",
"=",
"targetTable",
".",
"getItem",
"(",
"itemId",
")",
";",
"if",... | Apply style for status label in target table.
@param targetTable
target table
@param pinBtn
pin button used for status display and pin on mouse over
@param itemId
id of the tabel row | [
"Apply",
"style",
"for",
"status",
"label",
"in",
"target",
"table",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L434-L452 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.formattingFinishedPercentage | public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) {
float tmpFinishedPercentage = 0;
switch (rolloutGroup.getStatus()) {
case READY:
case SCHEDULED:
case ERROR:
tmpFinishedPercentage = 0.0F;
... | java | public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) {
float tmpFinishedPercentage = 0;
switch (rolloutGroup.getStatus()) {
case READY:
case SCHEDULED:
case ERROR:
tmpFinishedPercentage = 0.0F;
... | [
"public",
"static",
"String",
"formattingFinishedPercentage",
"(",
"final",
"RolloutGroup",
"rolloutGroup",
",",
"final",
"float",
"finishedPercentage",
")",
"{",
"float",
"tmpFinishedPercentage",
"=",
"0",
";",
"switch",
"(",
"rolloutGroup",
".",
"getStatus",
"(",
... | Formats the finished percentage of a rollout group into a string with one
digit after comma.
@param rolloutGroup
the rollout group
@param finishedPercentage
the calculated finished percentage of the rolloutgroup
@return formatted String value | [
"Formats",
"the",
"finished",
"percentage",
"of",
"a",
"rollout",
"group",
"into",
"a",
"string",
"with",
"one",
"digit",
"after",
"comma",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L464-L482 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getStatusLabelDetailsInString | public static String getStatusLabelDetailsInString(final String value, final String style, final String id) {
final StringBuilder val = new StringBuilder();
if (!StringUtils.isEmpty(value)) {
val.append("value:").append(value).append(",");
}
if (!StringUtils.isEmpty(style)) {... | java | public static String getStatusLabelDetailsInString(final String value, final String style, final String id) {
final StringBuilder val = new StringBuilder();
if (!StringUtils.isEmpty(value)) {
val.append("value:").append(value).append(",");
}
if (!StringUtils.isEmpty(style)) {... | [
"public",
"static",
"String",
"getStatusLabelDetailsInString",
"(",
"final",
"String",
"value",
",",
"final",
"String",
"style",
",",
"final",
"String",
"id",
")",
"{",
"final",
"StringBuilder",
"val",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"... | Returns a formatted string as needed by label custom render .This string
holds the properties of a status label.
@param value
label value
@param style
label style
@param id
label id
@return formatted string | [
"Returns",
"a",
"formatted",
"string",
"as",
"needed",
"by",
"label",
"custom",
"render",
".",
"This",
"string",
"holds",
"the",
"properties",
"of",
"a",
"status",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L496-L505 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getCodePoint | public static String getCodePoint(final StatusFontIcon statusFontIcon) {
if (statusFontIcon == null) {
return null;
}
return statusFontIcon.getFontIcon() != null ? Integer.toString(statusFontIcon.getFontIcon().getCodepoint())
: null;
} | java | public static String getCodePoint(final StatusFontIcon statusFontIcon) {
if (statusFontIcon == null) {
return null;
}
return statusFontIcon.getFontIcon() != null ? Integer.toString(statusFontIcon.getFontIcon().getCodepoint())
: null;
} | [
"public",
"static",
"String",
"getCodePoint",
"(",
"final",
"StatusFontIcon",
"statusFontIcon",
")",
"{",
"if",
"(",
"statusFontIcon",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"statusFontIcon",
".",
"getFontIcon",
"(",
")",
"!=",
"null",
... | Receive the code point of a given StatusFontIcon.
@param statusFontIcon
the status font icon
@return the code point of the StatusFontIcon | [
"Receive",
"the",
"code",
"point",
"of",
"a",
"given",
"StatusFontIcon",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L514-L520 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getCurrentLocale | public static Locale getCurrentLocale() {
final UI currentUI = UI.getCurrent();
return currentUI == null ? Locale.getDefault() : currentUI.getLocale();
} | java | public static Locale getCurrentLocale() {
final UI currentUI = UI.getCurrent();
return currentUI == null ? Locale.getDefault() : currentUI.getLocale();
} | [
"public",
"static",
"Locale",
"getCurrentLocale",
"(",
")",
"{",
"final",
"UI",
"currentUI",
"=",
"UI",
".",
"getCurrent",
"(",
")",
";",
"return",
"currentUI",
"==",
"null",
"?",
"Locale",
".",
"getDefault",
"(",
")",
":",
"currentUI",
".",
"getLocale",
... | Gets the locale of the current Vaadin UI. If the locale can not be
determined, the default locale is returned instead.
@return the current locale, never {@code null}.
@see com.vaadin.ui.UI#getLocale()
@see java.util.Locale#getDefault() | [
"Gets",
"the",
"locale",
"of",
"the",
"current",
"Vaadin",
"UI",
".",
"If",
"the",
"locale",
"can",
"not",
"be",
"determined",
"the",
"default",
"locale",
"is",
"returned",
"instead",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L530-L533 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getArtifactoryDetailsLabelId | public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) {
String caption;
if (StringUtils.hasText(name)) {
caption = i18n.getMessage(UIMessageIdProvider.CAPTION_ARTIFACT_DETAILS_OF,
HawkbitCommonUtil.getBoldHTMLText(name));
... | java | public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) {
String caption;
if (StringUtils.hasText(name)) {
caption = i18n.getMessage(UIMessageIdProvider.CAPTION_ARTIFACT_DETAILS_OF,
HawkbitCommonUtil.getBoldHTMLText(name));
... | [
"public",
"static",
"String",
"getArtifactoryDetailsLabelId",
"(",
"final",
"String",
"name",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"String",
"caption",
";",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"name",
")",
")",
"{",
"caption",
"=",... | Creates the caption of the Artifact Details table
@param name
name of the software module, if one is selected
@param i18n
VaadinMessageSource
@return complete caption text of the table | [
"Creates",
"the",
"caption",
"of",
"the",
"Artifact",
"Details",
"table"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L554-L563 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getLocaleToBeUsed | public static Locale getLocaleToBeUsed(final UiProperties.Localization localizationProperties,
final Locale desiredLocale) {
final List<String> availableLocals = localizationProperties.getAvailableLocals();
// ckeck if language code of UI locale matches an available local.
// Country... | java | public static Locale getLocaleToBeUsed(final UiProperties.Localization localizationProperties,
final Locale desiredLocale) {
final List<String> availableLocals = localizationProperties.getAvailableLocals();
// ckeck if language code of UI locale matches an available local.
// Country... | [
"public",
"static",
"Locale",
"getLocaleToBeUsed",
"(",
"final",
"UiProperties",
".",
"Localization",
"localizationProperties",
",",
"final",
"Locale",
"desiredLocale",
")",
"{",
"final",
"List",
"<",
"String",
">",
"availableLocals",
"=",
"localizationProperties",
".... | Determine the language that should be used considering localization
properties and a desired Locale
@param localizationProperties
UI Localization settings
@param desiredLocale
desired Locale
@return Locale to be used according to UI and properties | [
"Determine",
"the",
"language",
"that",
"should",
"be",
"used",
"considering",
"localization",
"properties",
"and",
"a",
"desired",
"Locale"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L575-L585 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.initLocalization | public static void initLocalization(final UI ui, final Localization localizationProperties,
final VaadinMessageSource i18n) {
ui.setLocale(HawkbitCommonUtil.getLocaleToBeUsed(localizationProperties, ui.getSession().getLocale()));
ui.getReconnectDialogConfiguration()
.setDialo... | java | public static void initLocalization(final UI ui, final Localization localizationProperties,
final VaadinMessageSource i18n) {
ui.setLocale(HawkbitCommonUtil.getLocaleToBeUsed(localizationProperties, ui.getSession().getLocale()));
ui.getReconnectDialogConfiguration()
.setDialo... | [
"public",
"static",
"void",
"initLocalization",
"(",
"final",
"UI",
"ui",
",",
"final",
"Localization",
"localizationProperties",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"ui",
".",
"setLocale",
"(",
"HawkbitCommonUtil",
".",
"getLocaleToBeUsed",
"(",
... | Set localization considering properties and UI settings.
@param ui
UI to setup
@param localizationProperties
UI localization settings
@param i18n
Localization message source | [
"Set",
"localization",
"considering",
"properties",
"and",
"UI",
"settings",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L597-L602 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/DistributionSetMetadataDetailsLayout.java | DistributionSetMetadataDetailsLayout.populateDSMetadata | public void populateDSMetadata(final DistributionSet distributionSet) {
removeAllItems();
if (null == distributionSet) {
return;
}
selectedDistSetId = distributionSet.getId();
final List<DistributionSetMetadata> dsMetadataList = distributionSetManagement
... | java | public void populateDSMetadata(final DistributionSet distributionSet) {
removeAllItems();
if (null == distributionSet) {
return;
}
selectedDistSetId = distributionSet.getId();
final List<DistributionSetMetadata> dsMetadataList = distributionSetManagement
... | [
"public",
"void",
"populateDSMetadata",
"(",
"final",
"DistributionSet",
"distributionSet",
")",
"{",
"removeAllItems",
"(",
")",
";",
"if",
"(",
"null",
"==",
"distributionSet",
")",
"{",
"return",
";",
"}",
"selectedDistSetId",
"=",
"distributionSet",
".",
"ge... | Populate distribution set metadata.
@param distributionSet | [
"Populate",
"distribution",
"set",
"metadata",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/DistributionSetMetadataDetailsLayout.java#L61-L72 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java | DmfDownloadAndUpdateRequest.addSoftwareModule | public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>();
}
softwareModules.add(createSoftwareModule);
} | java | public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>();
}
softwareModules.add(createSoftwareModule);
} | [
"public",
"void",
"addSoftwareModule",
"(",
"final",
"DmfSoftwareModule",
"createSoftwareModule",
")",
"{",
"if",
"(",
"softwareModules",
"==",
"null",
")",
"{",
"softwareModules",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"softwareModules",
".",
"add",... | Add a Software module.
@param createSoftwareModule
the module | [
"Add",
"a",
"Software",
"module",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java#L56-L63 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaTenantConfigurationManagement.java | JpaTenantConfigurationManagement.validateTenantConfigurationDataType | static <T> void validateTenantConfigurationDataType(final TenantConfigurationKey configurationKey,
final Class<T> propertyType) {
if (!configurationKey.getDataType().isAssignableFrom(propertyType)) {
throw new TenantConfigurationValidatorException(
String.format("Can... | java | static <T> void validateTenantConfigurationDataType(final TenantConfigurationKey configurationKey,
final Class<T> propertyType) {
if (!configurationKey.getDataType().isAssignableFrom(propertyType)) {
throw new TenantConfigurationValidatorException(
String.format("Can... | [
"static",
"<",
"T",
">",
"void",
"validateTenantConfigurationDataType",
"(",
"final",
"TenantConfigurationKey",
"configurationKey",
",",
"final",
"Class",
"<",
"T",
">",
"propertyType",
")",
"{",
"if",
"(",
"!",
"configurationKey",
".",
"getDataType",
"(",
")",
... | Validates the data type of the tenant configuration. If it is possible to
cast to the given data type.
@param configurationKey
the key
@param propertyType
the class | [
"Validates",
"the",
"data",
"type",
"of",
"the",
"tenant",
"configuration",
".",
"If",
"it",
"is",
"possible",
"to",
"cast",
"to",
"the",
"given",
"data",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaTenantConfigurationManagement.java#L75-L83 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.