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/common/builder/LabelBuilder.java | LabelBuilder.buildLabel | public Label buildLabel() {
final Label label = createLabel();
label.setImmediate(false);
label.setWidth("-1px");
label.setHeight("-1px");
if (StringUtils.hasText(caption)) {
label.setCaption(caption);
}
return label;
} | java | public Label buildLabel() {
final Label label = createLabel();
label.setImmediate(false);
label.setWidth("-1px");
label.setHeight("-1px");
if (StringUtils.hasText(caption)) {
label.setCaption(caption);
}
return label;
} | [
"public",
"Label",
"buildLabel",
"(",
")",
"{",
"final",
"Label",
"label",
"=",
"createLabel",
"(",
")",
";",
"label",
".",
"setImmediate",
"(",
"false",
")",
";",
"label",
".",
"setWidth",
"(",
"\"-1px\"",
")",
";",
"label",
".",
"setHeight",
"(",
"\"... | Build label.
@return Label | [
"Build",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/LabelBuilder.java#L86-L96 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java | TargetTable.updateTarget | @SuppressWarnings("unchecked")
public void updateTarget(final Target updatedTarget) {
if (updatedTarget != null) {
final Item item = getItem(updatedTarget.getId());
// TO DO update SPUILabelDefinitions.ASSIGNED_DISTRIBUTION_NAME_VER
// &
// SPUILabelDefinition... | java | @SuppressWarnings("unchecked")
public void updateTarget(final Target updatedTarget) {
if (updatedTarget != null) {
final Item item = getItem(updatedTarget.getId());
// TO DO update SPUILabelDefinitions.ASSIGNED_DISTRIBUTION_NAME_VER
// &
// SPUILabelDefinition... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"updateTarget",
"(",
"final",
"Target",
"updatedTarget",
")",
"{",
"if",
"(",
"updatedTarget",
"!=",
"null",
")",
"{",
"final",
"Item",
"item",
"=",
"getItem",
"(",
"updatedTarget",
".",
"... | To update target details in the table.
@param updatedTarget
as reference | [
"To",
"update",
"target",
"details",
"in",
"the",
"table",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java#L608-L638 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java | TargetTable.resetTargetCountDetails | private void resetTargetCountDetails() {
final long totalTargetsCount = getTotalTargetsCount();
managementUIState.setTargetsCountAll(totalTargetsCount);
final boolean noTagClicked = managementUIState.getTargetTableFilters().isNoTagSelected();
final Long distributionId = managementUIStat... | java | private void resetTargetCountDetails() {
final long totalTargetsCount = getTotalTargetsCount();
managementUIState.setTargetsCountAll(totalTargetsCount);
final boolean noTagClicked = managementUIState.getTargetTableFilters().isNoTagSelected();
final Long distributionId = managementUIStat... | [
"private",
"void",
"resetTargetCountDetails",
"(",
")",
"{",
"final",
"long",
"totalTargetsCount",
"=",
"getTotalTargetsCount",
"(",
")",
";",
"managementUIState",
".",
"setTargetsCountAll",
"(",
"totalTargetsCount",
")",
";",
"final",
"boolean",
"noTagClicked",
"=",
... | Set total target count and count of targets truncated in target table. | [
"Set",
"total",
"target",
"count",
"and",
"count",
"of",
"targets",
"truncated",
"in",
"target",
"table",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java#L774-L810 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/DistributionsViewClientCriterion.java | DistributionsViewClientCriterion.createViewComponentClientCriteria | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[1];
// Upload software module table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilde... | java | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[1];
// Upload software module table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilde... | [
"static",
"ServerViewComponentClientCriterion",
"[",
"]",
"createViewComponentClientCriteria",
"(",
")",
"{",
"final",
"ServerViewComponentClientCriterion",
"[",
"]",
"criteria",
"=",
"new",
"ServerViewComponentClientCriterion",
"[",
"1",
"]",
";",
"// Upload software module ... | Configures the elements of the composite accept criterion for the
Distributions View.
@return accept criterion elements | [
"Configures",
"the",
"elements",
"of",
"the",
"composite",
"accept",
"criterion",
"for",
"the",
"Distributions",
"View",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/DistributionsViewClientCriterion.java#L48-L58 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java | RolloutListGrid.onEvent | @EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
switch (event) {
case FILTER_BY_TEXT:
case CREATE_ROLLOUT:
case UPDATE_ROLLOUT:
case SHOW_ROLLOUTS:
refreshContainer();
break;
default:
break;
... | java | @EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
switch (event) {
case FILTER_BY_TEXT:
case CREATE_ROLLOUT:
case UPDATE_ROLLOUT:
case SHOW_ROLLOUTS:
refreshContainer();
break;
default:
break;
... | [
"@",
"EventBusListenerMethod",
"(",
"scope",
"=",
"EventScope",
".",
"UI",
")",
"void",
"onEvent",
"(",
"final",
"RolloutEvent",
"event",
")",
"{",
"switch",
"(",
"event",
")",
"{",
"case",
"FILTER_BY_TEXT",
":",
"case",
"CREATE_ROLLOUT",
":",
"case",
"UPDAT... | Handles the RolloutEvent to refresh Grid. | [
"Handles",
"the",
"RolloutEvent",
"to",
"refresh",
"Grid",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java#L187-L199 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java | RolloutListGrid.onRolloutChangeEvent | @EventBusListenerMethod(scope = EventScope.UI)
public void onRolloutChangeEvent(final RolloutChangeEventContainer eventContainer) {
eventContainer.getEvents().forEach(this::handleEvent);
} | java | @EventBusListenerMethod(scope = EventScope.UI)
public void onRolloutChangeEvent(final RolloutChangeEventContainer eventContainer) {
eventContainer.getEvents().forEach(this::handleEvent);
} | [
"@",
"EventBusListenerMethod",
"(",
"scope",
"=",
"EventScope",
".",
"UI",
")",
"public",
"void",
"onRolloutChangeEvent",
"(",
"final",
"RolloutChangeEventContainer",
"eventContainer",
")",
"{",
"eventContainer",
".",
"getEvents",
"(",
")",
".",
"forEach",
"(",
"t... | Handles the RolloutChangeEvent to refresh the item in the grid.
@param eventContainer
container which holds the rollout change event | [
"Handles",
"the",
"RolloutChangeEvent",
"to",
"refresh",
"the",
"item",
"in",
"the",
"grid",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java#L218-L221 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/TargetMetadataDetailsLayout.java | TargetMetadataDetailsLayout.populateMetadata | public void populateMetadata(final Target target) {
removeAllItems();
if (target == null) {
return;
}
selectedTargetId = target.getId();
final List<TargetMetadata> targetMetadataList = targetManagement
.findMetaDataByControllerId(PageRequest.of(0, MAX_... | java | public void populateMetadata(final Target target) {
removeAllItems();
if (target == null) {
return;
}
selectedTargetId = target.getId();
final List<TargetMetadata> targetMetadataList = targetManagement
.findMetaDataByControllerId(PageRequest.of(0, MAX_... | [
"public",
"void",
"populateMetadata",
"(",
"final",
"Target",
"target",
")",
"{",
"removeAllItems",
"(",
")",
";",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"return",
";",
"}",
"selectedTargetId",
"=",
"target",
".",
"getId",
"(",
")",
";",
"final",
... | Populate target metadata.
@param target | [
"Populate",
"target",
"metadata",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/TargetMetadataDetailsLayout.java#L60-L72 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutManagement.java | JpaRolloutManagement.scheduleRolloutGroup | private boolean scheduleRolloutGroup(final JpaRollout rollout, final JpaRolloutGroup group) {
final long targetsInGroup = rolloutTargetGroupRepository.countByRolloutGroup(group);
final long countOfActions = actionRepository.countByRolloutAndRolloutGroup(rollout, group);
long actionsLeft = targe... | java | private boolean scheduleRolloutGroup(final JpaRollout rollout, final JpaRolloutGroup group) {
final long targetsInGroup = rolloutTargetGroupRepository.countByRolloutGroup(group);
final long countOfActions = actionRepository.countByRolloutAndRolloutGroup(rollout, group);
long actionsLeft = targe... | [
"private",
"boolean",
"scheduleRolloutGroup",
"(",
"final",
"JpaRollout",
"rollout",
",",
"final",
"JpaRolloutGroup",
"group",
")",
"{",
"final",
"long",
"targetsInGroup",
"=",
"rolloutTargetGroupRepository",
".",
"countByRolloutGroup",
"(",
"group",
")",
";",
"final"... | Schedules a group of the rollout. Scheduled Actions are created to
achieve this. The creation of those Actions is allowed to fail. | [
"Schedules",
"a",
"group",
"of",
"the",
"rollout",
".",
"Scheduled",
"Actions",
"are",
"created",
"to",
"achieve",
"this",
".",
"The",
"creation",
"of",
"those",
"Actions",
"is",
"allowed",
"to",
"fail",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutManagement.java#L542-L557 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutManagement.java | JpaRolloutManagement.createScheduledAction | private void createScheduledAction(final Collection<Target> targets, final DistributionSet distributionSet,
final ActionType actionType, final Long forcedTime, final Rollout rollout,
final RolloutGroup rolloutGroup) {
// cancel all current scheduled actions for this target. E.g. an actio... | java | private void createScheduledAction(final Collection<Target> targets, final DistributionSet distributionSet,
final ActionType actionType, final Long forcedTime, final Rollout rollout,
final RolloutGroup rolloutGroup) {
// cancel all current scheduled actions for this target. E.g. an actio... | [
"private",
"void",
"createScheduledAction",
"(",
"final",
"Collection",
"<",
"Target",
">",
"targets",
",",
"final",
"DistributionSet",
"distributionSet",
",",
"final",
"ActionType",
"actionType",
",",
"final",
"Long",
"forcedTime",
",",
"final",
"Rollout",
"rollout... | Creates an action entry into the action repository. In case of existing
scheduled actions the scheduled actions gets canceled. A scheduled action
is created in-active. | [
"Creates",
"an",
"action",
"entry",
"into",
"the",
"action",
"repository",
".",
"In",
"case",
"of",
"existing",
"scheduled",
"actions",
"the",
"scheduled",
"actions",
"gets",
"canceled",
".",
"A",
"scheduled",
"action",
"is",
"created",
"in",
"-",
"active",
... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutManagement.java#L602-L626 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/util/FileStreamingUtil.java | FileStreamingUtil.writeMD5FileResponse | public static ResponseEntity<Void> writeMD5FileResponse(final HttpServletResponse response, final String md5Hash,
final String filename) throws IOException {
if (md5Hash == null) {
return ResponseEntity.notFound().build();
}
final StringBuilder builder = new StringBuild... | java | public static ResponseEntity<Void> writeMD5FileResponse(final HttpServletResponse response, final String md5Hash,
final String filename) throws IOException {
if (md5Hash == null) {
return ResponseEntity.notFound().build();
}
final StringBuilder builder = new StringBuild... | [
"public",
"static",
"ResponseEntity",
"<",
"Void",
">",
"writeMD5FileResponse",
"(",
"final",
"HttpServletResponse",
"response",
",",
"final",
"String",
"md5Hash",
",",
"final",
"String",
"filename",
")",
"throws",
"IOException",
"{",
"if",
"(",
"md5Hash",
"==",
... | Write a md5 file response.
@param response
the response
@param md5Hash
of the artifact
@param filename
as provided by the client
@return the response
@throws IOException
cannot write output stream | [
"Write",
"a",
"md5",
"file",
"response",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/util/FileStreamingUtil.java#L66-L88 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectComboBox.java | DistributionSetSelectComboBox.getItemCaption | @Override
public String getItemCaption(final Object itemId) {
if (itemId != null && itemId.equals(getValue()) && !StringUtils.isEmpty(selectedValueCaption)) {
return selectedValueCaption;
}
return super.getItemCaption(itemId);
} | java | @Override
public String getItemCaption(final Object itemId) {
if (itemId != null && itemId.equals(getValue()) && !StringUtils.isEmpty(selectedValueCaption)) {
return selectedValueCaption;
}
return super.getItemCaption(itemId);
} | [
"@",
"Override",
"public",
"String",
"getItemCaption",
"(",
"final",
"Object",
"itemId",
")",
"{",
"if",
"(",
"itemId",
"!=",
"null",
"&&",
"itemId",
".",
"equals",
"(",
"getValue",
"(",
")",
")",
"&&",
"!",
"StringUtils",
".",
"isEmpty",
"(",
"selectedV... | Overriden in order to return the caption for the selected distribution
set from cache. Otherwise, it could lead to multiple database queries,
trying to retrieve the caption from container, when it is not present in
filtered options.
@param itemId
the Id of the selected distribution set
@return the option caption (name... | [
"Overriden",
"in",
"order",
"to",
"return",
"the",
"caption",
"for",
"the",
"selected",
"distribution",
"set",
"from",
"cache",
".",
"Otherwise",
"it",
"could",
"lead",
"to",
"multiple",
"database",
"queries",
"trying",
"to",
"retrieve",
"the",
"caption",
"fro... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectComboBox.java#L256-L263 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectComboBox.java | DistributionSetSelectComboBox.setInitialValueFilter | public int setInitialValueFilter(final String initialFilterString) {
final Filter filter = buildFilter(initialFilterString, getFilteringMode());
if (filter != null) {
final LazyQueryContainer container = (LazyQueryContainer) getContainerDataSource();
try {
contai... | java | public int setInitialValueFilter(final String initialFilterString) {
final Filter filter = buildFilter(initialFilterString, getFilteringMode());
if (filter != null) {
final LazyQueryContainer container = (LazyQueryContainer) getContainerDataSource();
try {
contai... | [
"public",
"int",
"setInitialValueFilter",
"(",
"final",
"String",
"initialFilterString",
")",
"{",
"final",
"Filter",
"filter",
"=",
"buildFilter",
"(",
"initialFilterString",
",",
"getFilteringMode",
"(",
")",
")",
";",
"if",
"(",
"filter",
"!=",
"null",
")",
... | Before setting the value of the selected distribution set we need to
initialize the container and apply the right filter in order to limit the
number of entities and save them in container cache. Otherwise, combobox
will try to find the corresponding id from container, leading to multiple
database queries.
@param init... | [
"Before",
"setting",
"the",
"value",
"of",
"the",
"selected",
"distribution",
"set",
"we",
"need",
"to",
"initialize",
"the",
"container",
"and",
"apply",
"the",
"right",
"filter",
"in",
"order",
"to",
"limit",
"the",
"number",
"of",
"entities",
"and",
"save... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectComboBox.java#L313-L327 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterTable.java | CreateOrUpdateFilterTable.addContainerproperties | private void addContainerproperties() {
/* Create HierarchicalContainer container */
container.addContainerProperty(SPUILabelDefinitions.NAME, String.class, null);
container.addContainerProperty(SPUILabelDefinitions.VAR_CREATED_BY, String.class, null);
container.addContainerProperty(SPUI... | java | private void addContainerproperties() {
/* Create HierarchicalContainer container */
container.addContainerProperty(SPUILabelDefinitions.NAME, String.class, null);
container.addContainerProperty(SPUILabelDefinitions.VAR_CREATED_BY, String.class, null);
container.addContainerProperty(SPUI... | [
"private",
"void",
"addContainerproperties",
"(",
")",
"{",
"/* Create HierarchicalContainer container */",
"container",
".",
"addContainerProperty",
"(",
"SPUILabelDefinitions",
".",
"NAME",
",",
"String",
".",
"class",
",",
"null",
")",
";",
"container",
".",
"addCo... | Create a empty HierarchicalContainer. | [
"Create",
"a",
"empty",
"HierarchicalContainer",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterTable.java#L166-L180 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutHelper.java | JpaRolloutHelper.prepareRolloutGroupWithDefaultConditions | static JpaRolloutGroup prepareRolloutGroupWithDefaultConditions(final RolloutGroupCreate create,
final RolloutGroupConditions conditions) {
final JpaRolloutGroup group = ((JpaRolloutGroupCreate) create).build();
if (group.getSuccessCondition() == null) {
group.setSuccessConditio... | java | static JpaRolloutGroup prepareRolloutGroupWithDefaultConditions(final RolloutGroupCreate create,
final RolloutGroupConditions conditions) {
final JpaRolloutGroup group = ((JpaRolloutGroupCreate) create).build();
if (group.getSuccessCondition() == null) {
group.setSuccessConditio... | [
"static",
"JpaRolloutGroup",
"prepareRolloutGroupWithDefaultConditions",
"(",
"final",
"RolloutGroupCreate",
"create",
",",
"final",
"RolloutGroupConditions",
"conditions",
")",
"{",
"final",
"JpaRolloutGroup",
"group",
"=",
"(",
"(",
"JpaRolloutGroupCreate",
")",
"create",... | In case the given group is missing conditions or actions, they will be
set from the supplied default conditions.
@param create
group to check
@param conditions
default conditions and actions | [
"In",
"case",
"the",
"given",
"group",
"is",
"missing",
"conditions",
"or",
"actions",
"they",
"will",
"be",
"set",
"from",
"the",
"supplied",
"default",
"conditions",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaRolloutHelper.java#L42-L73 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.onMessage | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}", containerFactory = "listenerContainerFactory")
public Message onMessage(final Message message,
@Header(name = MessageHeaderKey.TYPE, required = false) final String type,
@Header(name = MessageHeaderKey.TENANT, req... | java | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}", containerFactory = "listenerContainerFactory")
public Message onMessage(final Message message,
@Header(name = MessageHeaderKey.TYPE, required = false) final String type,
@Header(name = MessageHeaderKey.TENANT, req... | [
"@",
"RabbitListener",
"(",
"queues",
"=",
"\"${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}\"",
",",
"containerFactory",
"=",
"\"listenerContainerFactory\"",
")",
"public",
"Message",
"onMessage",
"(",
"final",
"Message",
"message",
",",
"@",
"Header",
"(",
"name",
... | Method to handle all incoming DMF amqp messages.
@param message
incoming message
@param type
the message type
@param tenant
the contentType of the message
@return a message if <null> no message is send back to sender | [
"Method",
"to",
"handle",
"all",
"incoming",
"DMF",
"amqp",
"messages",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L106-L111 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.registerTarget | private void registerTarget(final Message message, final String virtualHost) {
final String thingId = getStringHeaderKey(message, MessageHeaderKey.THING_ID, "ThingId is null");
final String replyTo = message.getMessageProperties().getReplyTo();
if (StringUtils.isEmpty(replyTo)) {
lo... | java | private void registerTarget(final Message message, final String virtualHost) {
final String thingId = getStringHeaderKey(message, MessageHeaderKey.THING_ID, "ThingId is null");
final String replyTo = message.getMessageProperties().getReplyTo();
if (StringUtils.isEmpty(replyTo)) {
lo... | [
"private",
"void",
"registerTarget",
"(",
"final",
"Message",
"message",
",",
"final",
"String",
"virtualHost",
")",
"{",
"final",
"String",
"thingId",
"=",
"getStringHeaderKey",
"(",
"message",
",",
"MessageHeaderKey",
".",
"THING_ID",
",",
"\"ThingId is null\"",
... | Method to create a new target or to find the target if it already exists.
@param targetID
the ID of the target/thing
@param ip
the ip of the target/thing | [
"Method",
"to",
"create",
"a",
"new",
"target",
"or",
"to",
"find",
"the",
"target",
"if",
"it",
"already",
"exists",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L182-L195 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.handleIncomingEvent | private void handleIncomingEvent(final Message message) {
switch (EventTopic.valueOf(getStringHeaderKey(message, MessageHeaderKey.TOPIC, "EventTopic is null"))) {
case UPDATE_ACTION_STATUS:
updateActionStatus(message);
break;
case UPDATE_ATTRIBUTES:
updateAttr... | java | private void handleIncomingEvent(final Message message) {
switch (EventTopic.valueOf(getStringHeaderKey(message, MessageHeaderKey.TOPIC, "EventTopic is null"))) {
case UPDATE_ACTION_STATUS:
updateActionStatus(message);
break;
case UPDATE_ATTRIBUTES:
updateAttr... | [
"private",
"void",
"handleIncomingEvent",
"(",
"final",
"Message",
"message",
")",
"{",
"switch",
"(",
"EventTopic",
".",
"valueOf",
"(",
"getStringHeaderKey",
"(",
"message",
",",
"MessageHeaderKey",
".",
"TOPIC",
",",
"\"EventTopic is null\"",
")",
")",
")",
"... | Method to handle the different topics to an event.
@param message
the incoming event message.
@param topic
the topic of the event. | [
"Method",
"to",
"handle",
"the",
"different",
"topics",
"to",
"an",
"event",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L234-L247 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.updateActionStatus | private void updateActionStatus(final Message message) {
final DmfActionUpdateStatus actionUpdateStatus = convertMessage(message, DmfActionUpdateStatus.class);
final Action action = checkActionExist(message, actionUpdateStatus);
final List<String> messages = actionUpdateStatus.getMessage();
... | java | private void updateActionStatus(final Message message) {
final DmfActionUpdateStatus actionUpdateStatus = convertMessage(message, DmfActionUpdateStatus.class);
final Action action = checkActionExist(message, actionUpdateStatus);
final List<String> messages = actionUpdateStatus.getMessage();
... | [
"private",
"void",
"updateActionStatus",
"(",
"final",
"Message",
"message",
")",
"{",
"final",
"DmfActionUpdateStatus",
"actionUpdateStatus",
"=",
"convertMessage",
"(",
"message",
",",
"DmfActionUpdateStatus",
".",
"class",
")",
";",
"final",
"Action",
"action",
"... | Method to update the action status of an action through the event.
@param actionUpdateStatus
the object form the ampq message | [
"Method",
"to",
"update",
"the",
"action",
"status",
"of",
"an",
"action",
"through",
"the",
"event",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L263-L284 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.checkActionExist | @SuppressWarnings("squid:S3655")
private Action checkActionExist(final Message message, final DmfActionUpdateStatus actionUpdateStatus) {
final Long actionId = actionUpdateStatus.getActionId();
LOG.debug("Target notifies intermediate about action {} with status {}.", actionId,
actio... | java | @SuppressWarnings("squid:S3655")
private Action checkActionExist(final Message message, final DmfActionUpdateStatus actionUpdateStatus) {
final Long actionId = actionUpdateStatus.getActionId();
LOG.debug("Target notifies intermediate about action {} with status {}.", actionId,
actio... | [
"@",
"SuppressWarnings",
"(",
"\"squid:S3655\"",
")",
"private",
"Action",
"checkActionExist",
"(",
"final",
"Message",
"message",
",",
"final",
"DmfActionUpdateStatus",
"actionUpdateStatus",
")",
"{",
"final",
"Long",
"actionId",
"=",
"actionUpdateStatus",
".",
"getA... | get will not be called | [
"get",
"will",
"not",
"be",
"called"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L349-L363 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/BaseUIEntityEvent.java | BaseUIEntityEvent.matchRemoteEvent | public boolean matchRemoteEvent(final TenantAwareEvent tenantAwareEvent) {
if (!(tenantAwareEvent instanceof RemoteIdEvent) || entityClass == null || entityIds == null) {
return false;
}
final RemoteIdEvent remoteIdEvent = (RemoteIdEvent) tenantAwareEvent;
try {
f... | java | public boolean matchRemoteEvent(final TenantAwareEvent tenantAwareEvent) {
if (!(tenantAwareEvent instanceof RemoteIdEvent) || entityClass == null || entityIds == null) {
return false;
}
final RemoteIdEvent remoteIdEvent = (RemoteIdEvent) tenantAwareEvent;
try {
f... | [
"public",
"boolean",
"matchRemoteEvent",
"(",
"final",
"TenantAwareEvent",
"tenantAwareEvent",
")",
"{",
"if",
"(",
"!",
"(",
"tenantAwareEvent",
"instanceof",
"RemoteIdEvent",
")",
"||",
"entityClass",
"==",
"null",
"||",
"entityIds",
"==",
"null",
")",
"{",
"r... | Checks if the remote event is the same as this UI event. Then maybe you
can skip the remote event because it is already executed.
@param tenantAwareEvent
the remote event
@return {@code true} match ; {@code false} not match | [
"Checks",
"if",
"the",
"remote",
"event",
"is",
"the",
"same",
"as",
"this",
"UI",
"event",
".",
"Then",
"maybe",
"you",
"can",
"skip",
"the",
"remote",
"event",
"because",
"it",
"is",
"already",
"executed",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/table/BaseUIEntityEvent.java#L92-L105 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java | TenantConfigurationDashboardView.init | @PostConstruct
public void init() {
if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
configurationViews.add(defaultDistributionSetTypeLayout);
}
configurationViews.add(repositoryConfigurationView);
configurationViews.add(rolloutConfigurationView);
c... | java | @PostConstruct
public void init() {
if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
configurationViews.add(defaultDistributionSetTypeLayout);
}
configurationViews.add(repositoryConfigurationView);
configurationViews.add(rolloutConfigurationView);
c... | [
"@",
"PostConstruct",
"public",
"void",
"init",
"(",
")",
"{",
"if",
"(",
"defaultDistributionSetTypeLayout",
".",
"getComponentCount",
"(",
")",
">",
"0",
")",
"{",
"configurationViews",
".",
"add",
"(",
"defaultDistributionSetTypeLayout",
")",
";",
"}",
"confi... | Init method adds all Configuration Views to the list of Views. | [
"Init",
"method",
"adds",
"all",
"Configuration",
"Views",
"to",
"the",
"list",
"of",
"Views",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java#L105-L136 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java | MgmtDownloadArtifactResource.downloadArtifact | @Override
public ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId) {
final SoftwareModule module = softwareModuleManagement.get(softwareModuleId)
.orElseThrow(() -> new E... | java | @Override
public ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId) {
final SoftwareModule module = softwareModuleManagement.get(softwareModuleId)
.orElseThrow(() -> new E... | [
"@",
"Override",
"public",
"ResponseEntity",
"<",
"InputStream",
">",
"downloadArtifact",
"(",
"@",
"PathVariable",
"(",
"\"softwareModuleId\"",
")",
"final",
"Long",
"softwareModuleId",
",",
"@",
"PathVariable",
"(",
"\"artifactId\"",
")",
"final",
"Long",
"artifac... | Handles the GET request for downloading an artifact.
@param softwareModuleId
of the parent SoftwareModule
@param artifactId
of the related Artifact
@return responseEntity with status ok if successful | [
"Handles",
"the",
"GET",
"request",
"for",
"downloading",
"an",
"artifact",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java#L60-L79 | train |
eclipse/hawkbit | hawkbit-security-integration/src/main/java/org/eclipse/hawkbit/security/DmfTenantSecurityToken.java | DmfTenantSecurityToken.putHeader | public String putHeader(final String name, final String value) {
if (headers == null) {
headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
}
return headers.put(name, value);
} | java | public String putHeader(final String name, final String value) {
if (headers == null) {
headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
}
return headers.put(name, value);
} | [
"public",
"String",
"putHeader",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"headers",
"==",
"null",
")",
"{",
"headers",
"=",
"new",
"TreeMap",
"<>",
"(",
"String",
".",
"CASE_INSENSITIVE_ORDER",
")",
";",
"}",... | Associates the specified header value with the specified name.
@param name
of the header
@param value
of the header
@return the previous value associated with the <tt>name</tt>, or
<tt>null</tt> if there was no mapping for <tt>name</tt>. | [
"Associates",
"the",
"specified",
"header",
"value",
"with",
"the",
"specified",
"name",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-integration/src/main/java/org/eclipse/hawkbit/security/DmfTenantSecurityToken.java#L163-L168 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java | DurationConfigField.setValue | public void setValue(final Duration tenantDuration) {
if (tenantDuration == null) {
// no tenant specific configuration
checkBox.setValue(false);
durationField.setDuration(globalDuration);
durationField.setEnabled(false);
return;
}
che... | java | public void setValue(final Duration tenantDuration) {
if (tenantDuration == null) {
// no tenant specific configuration
checkBox.setValue(false);
durationField.setDuration(globalDuration);
durationField.setEnabled(false);
return;
}
che... | [
"public",
"void",
"setValue",
"(",
"final",
"Duration",
"tenantDuration",
")",
"{",
"if",
"(",
"tenantDuration",
"==",
"null",
")",
"{",
"// no tenant specific configuration",
"checkBox",
".",
"setValue",
"(",
"false",
")",
";",
"durationField",
".",
"setDuration"... | Set the value of the duration field
@param tenantDuration
duration which will be set in to the duration field, when
{@code null} the global configuration will be used. | [
"Set",
"the",
"value",
"of",
"the",
"duration",
"field"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java#L96-L108 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpControllerAuthentication.java | AmqpControllerAuthentication.doAuthenticate | public Authentication doAuthenticate(final DmfTenantSecurityToken securityToken) {
resolveTenant(securityToken);
PreAuthenticatedAuthenticationToken authentication = new PreAuthenticatedAuthenticationToken(null, null);
for (final PreAuthenticationFilter filter : filterChain) {
final ... | java | public Authentication doAuthenticate(final DmfTenantSecurityToken securityToken) {
resolveTenant(securityToken);
PreAuthenticatedAuthenticationToken authentication = new PreAuthenticatedAuthenticationToken(null, null);
for (final PreAuthenticationFilter filter : filterChain) {
final ... | [
"public",
"Authentication",
"doAuthenticate",
"(",
"final",
"DmfTenantSecurityToken",
"securityToken",
")",
"{",
"resolveTenant",
"(",
"securityToken",
")",
";",
"PreAuthenticatedAuthenticationToken",
"authentication",
"=",
"new",
"PreAuthenticatedAuthenticationToken",
"(",
"... | Performs authentication with the security token.
@param securityToken
the authentication request object
@return the authentication object | [
"Performs",
"authentication",
"with",
"the",
"security",
"token",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpControllerAuthentication.java#L124-L137 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java | MgmtTargetMapper.addTargetLinks | public static void addTargetLinks(final MgmtTarget response) {
response.add(linkTo(methodOn(MgmtTargetRestApi.class).getAssignedDistributionSet(response.getControllerId()))
.withRel(MgmtRestConstants.TARGET_V1_ASSIGNED_DISTRIBUTION_SET));
response.add(linkTo(methodOn(MgmtTargetRestApi.cl... | java | public static void addTargetLinks(final MgmtTarget response) {
response.add(linkTo(methodOn(MgmtTargetRestApi.class).getAssignedDistributionSet(response.getControllerId()))
.withRel(MgmtRestConstants.TARGET_V1_ASSIGNED_DISTRIBUTION_SET));
response.add(linkTo(methodOn(MgmtTargetRestApi.cl... | [
"public",
"static",
"void",
"addTargetLinks",
"(",
"final",
"MgmtTarget",
"response",
")",
"{",
"response",
".",
"add",
"(",
"linkTo",
"(",
"methodOn",
"(",
"MgmtTargetRestApi",
".",
"class",
")",
".",
"getAssignedDistributionSet",
"(",
"response",
".",
"getCont... | Add links to a target response.
@param response
the target response | [
"Add",
"links",
"to",
"a",
"target",
"response",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java#L66-L80 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java | MgmtTargetMapper.toResponse | public static List<MgmtTarget> toResponse(final Collection<Target> targets) {
if (targets == null) {
return Collections.emptyList();
}
return new ResponseList<>(targets.stream().map(MgmtTargetMapper::toResponse).collect(Collectors.toList()));
} | java | public static List<MgmtTarget> toResponse(final Collection<Target> targets) {
if (targets == null) {
return Collections.emptyList();
}
return new ResponseList<>(targets.stream().map(MgmtTargetMapper::toResponse).collect(Collectors.toList()));
} | [
"public",
"static",
"List",
"<",
"MgmtTarget",
">",
"toResponse",
"(",
"final",
"Collection",
"<",
"Target",
">",
"targets",
")",
"{",
"if",
"(",
"targets",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
... | Create a response for targets.
@param targets
list of targets
@return the response | [
"Create",
"a",
"response",
"for",
"targets",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java#L102-L108 | train |
eclipse/hawkbit | hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java | MgmtTargetMapper.toResponse | public static MgmtTarget toResponse(final Target target) {
if (target == null) {
return null;
}
final MgmtTarget targetRest = new MgmtTarget();
targetRest.setControllerId(target.getControllerId());
targetRest.setDescription(target.getDescription());
targetRest... | java | public static MgmtTarget toResponse(final Target target) {
if (target == null) {
return null;
}
final MgmtTarget targetRest = new MgmtTarget();
targetRest.setControllerId(target.getControllerId());
targetRest.setDescription(target.getDescription());
targetRest... | [
"public",
"static",
"MgmtTarget",
"toResponse",
"(",
"final",
"Target",
"target",
")",
"{",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"MgmtTarget",
"targetRest",
"=",
"new",
"MgmtTarget",
"(",
")",
";",
"targetRest",... | Create a response for target.
@param target
the target
@return the response | [
"Create",
"a",
"response",
"for",
"target",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java#L117-L158 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/DefaultDistributionSetTypeLayout.java | DefaultDistributionSetTypeLayout.selectDistributionSetValue | private void selectDistributionSetValue() {
selectedDefaultDisSetType = (Long) combobox.getValue();
if (!selectedDefaultDisSetType.equals(currentDefaultDisSetType)) {
changeIcon.setVisible(true);
notifyConfigurationChanged();
} else {
changeIcon.setVisible(fal... | java | private void selectDistributionSetValue() {
selectedDefaultDisSetType = (Long) combobox.getValue();
if (!selectedDefaultDisSetType.equals(currentDefaultDisSetType)) {
changeIcon.setVisible(true);
notifyConfigurationChanged();
} else {
changeIcon.setVisible(fal... | [
"private",
"void",
"selectDistributionSetValue",
"(",
")",
"{",
"selectedDefaultDisSetType",
"=",
"(",
"Long",
")",
"combobox",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"!",
"selectedDefaultDisSetType",
".",
"equals",
"(",
"currentDefaultDisSetType",
")",
")",
... | Method that is called when combobox event is performed. | [
"Method",
"that",
"is",
"called",
"when",
"combobox",
"event",
"is",
"performed",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/DefaultDistributionSetTypeLayout.java#L132-L140 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java | ActionHistoryGrid.confirmAndForceAction | private void confirmAndForceAction(final Long actionId) {
/* Display the confirmation */
final ConfirmationDialog confirmDialog = new ConfirmationDialog(
i18n.getMessage("caption.force.action.confirmbox"), i18n.getMessage("message.force.action.confirm"),
i18n.getMessage(U... | java | private void confirmAndForceAction(final Long actionId) {
/* Display the confirmation */
final ConfirmationDialog confirmDialog = new ConfirmationDialog(
i18n.getMessage("caption.force.action.confirmbox"), i18n.getMessage("message.force.action.confirm"),
i18n.getMessage(U... | [
"private",
"void",
"confirmAndForceAction",
"(",
"final",
"Long",
"actionId",
")",
"{",
"/* Display the confirmation */",
"final",
"ConfirmationDialog",
"confirmDialog",
"=",
"new",
"ConfirmationDialog",
"(",
"i18n",
".",
"getMessage",
"(",
"\"caption.force.action.confirmbo... | Show confirmation window and if ok then only, force the action.
@param actionId
as Id if the action needs to be forced. | [
"Show",
"confirmation",
"window",
"and",
"if",
"ok",
"then",
"only",
"force",
"the",
"action",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java#L312-L328 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java | ActionHistoryGrid.confirmAndForceQuitAction | private void confirmAndForceQuitAction(final Long actionId) {
/* Display the confirmation */
final ConfirmationDialog confirmDialog = new ConfirmationDialog(
i18n.getMessage("caption.forcequit.action.confirmbox"),
i18n.getMessage("message.forcequit.action.confirm"), i18n.... | java | private void confirmAndForceQuitAction(final Long actionId) {
/* Display the confirmation */
final ConfirmationDialog confirmDialog = new ConfirmationDialog(
i18n.getMessage("caption.forcequit.action.confirmbox"),
i18n.getMessage("message.forcequit.action.confirm"), i18n.... | [
"private",
"void",
"confirmAndForceQuitAction",
"(",
"final",
"Long",
"actionId",
")",
"{",
"/* Display the confirmation */",
"final",
"ConfirmationDialog",
"confirmDialog",
"=",
"new",
"ConfirmationDialog",
"(",
"i18n",
".",
"getMessage",
"(",
"\"caption.forcequit.action.c... | Show confirmation window and if ok then only, force quit action.
@param actionId
as Id if the action needs to be forced. | [
"Show",
"confirmation",
"window",
"and",
"if",
"ok",
"then",
"only",
"force",
"quit",
"action",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java#L336-L356 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java | ActionHistoryGrid.updateDistributionTableStyle | private void updateDistributionTableStyle() {
managementUIState.getDistributionTableFilters().getPinnedTarget().ifPresent(pinnedTarget -> {
if (pinnedTarget.getTargetId().equals(selectedTarget.getId())) {
eventBus.publish(this, PinUnpinEvent.PIN_TARGET);
}
});
... | java | private void updateDistributionTableStyle() {
managementUIState.getDistributionTableFilters().getPinnedTarget().ifPresent(pinnedTarget -> {
if (pinnedTarget.getTargetId().equals(selectedTarget.getId())) {
eventBus.publish(this, PinUnpinEvent.PIN_TARGET);
}
});
... | [
"private",
"void",
"updateDistributionTableStyle",
"(",
")",
"{",
"managementUIState",
".",
"getDistributionTableFilters",
"(",
")",
".",
"getPinnedTarget",
"(",
")",
".",
"ifPresent",
"(",
"pinnedTarget",
"->",
"{",
"if",
"(",
"pinnedTarget",
".",
"getTargetId",
... | Update the colors of Assigned and installed distribution set in Target
Pinning. | [
"Update",
"the",
"colors",
"of",
"Assigned",
"and",
"installed",
"distribution",
"set",
"in",
"Target",
"Pinning",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java#L404-L410 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java | ActionHistoryGrid.setColumnsSize | private void setColumnsSize(final double min, final double max, final String... columnPropertyIds) {
for (final String columnPropertyId : columnPropertyIds) {
getColumn(columnPropertyId).setMinimumWidth(min);
getColumn(columnPropertyId).setMaximumWidth(max);
}
} | java | private void setColumnsSize(final double min, final double max, final String... columnPropertyIds) {
for (final String columnPropertyId : columnPropertyIds) {
getColumn(columnPropertyId).setMinimumWidth(min);
getColumn(columnPropertyId).setMaximumWidth(max);
}
} | [
"private",
"void",
"setColumnsSize",
"(",
"final",
"double",
"min",
",",
"final",
"double",
"max",
",",
"final",
"String",
"...",
"columnPropertyIds",
")",
"{",
"for",
"(",
"final",
"String",
"columnPropertyId",
":",
"columnPropertyIds",
")",
"{",
"getColumn",
... | Conveniently sets min- and max-width for a bunch of columns.
@param min
minimum width
@param max
maximum width
@param columnPropertyIds
all the columns the min and max should be set for. | [
"Conveniently",
"sets",
"min",
"-",
"and",
"max",
"-",
"width",
"for",
"a",
"bunch",
"of",
"columns",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryGrid.java#L496-L501 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupScheduler.java | AutoCleanupScheduler.run | @Scheduled(initialDelayString = PROP_AUTO_CLEANUP_INTERVAL, fixedDelayString = PROP_AUTO_CLEANUP_INTERVAL)
public void run() {
LOGGER.debug("Auto cleanup scheduler has been triggered.");
// run this code in system code privileged to have the necessary
// permission to query and create entiti... | java | @Scheduled(initialDelayString = PROP_AUTO_CLEANUP_INTERVAL, fixedDelayString = PROP_AUTO_CLEANUP_INTERVAL)
public void run() {
LOGGER.debug("Auto cleanup scheduler has been triggered.");
// run this code in system code privileged to have the necessary
// permission to query and create entiti... | [
"@",
"Scheduled",
"(",
"initialDelayString",
"=",
"PROP_AUTO_CLEANUP_INTERVAL",
",",
"fixedDelayString",
"=",
"PROP_AUTO_CLEANUP_INTERVAL",
")",
"public",
"void",
"run",
"(",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Auto cleanup scheduler has been triggered.\"",
")",
"... | Scheduler method which kicks off the cleanup process. | [
"Scheduler",
"method",
"which",
"kicks",
"off",
"the",
"cleanup",
"process",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupScheduler.java#L62-L70 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupScheduler.java | AutoCleanupScheduler.executeAutoCleanup | @SuppressWarnings("squid:S3516")
private Void executeAutoCleanup() {
systemManagement.forEachTenant(tenant -> cleanupTasks.forEach(task -> {
final Lock lock = obtainLock(task, tenant);
if (!lock.tryLock()) {
return;
}
try {
task... | java | @SuppressWarnings("squid:S3516")
private Void executeAutoCleanup() {
systemManagement.forEachTenant(tenant -> cleanupTasks.forEach(task -> {
final Lock lock = obtainLock(task, tenant);
if (!lock.tryLock()) {
return;
}
try {
task... | [
"@",
"SuppressWarnings",
"(",
"\"squid:S3516\"",
")",
"private",
"Void",
"executeAutoCleanup",
"(",
")",
"{",
"systemManagement",
".",
"forEachTenant",
"(",
"tenant",
"->",
"cleanupTasks",
".",
"forEach",
"(",
"task",
"->",
"{",
"final",
"Lock",
"lock",
"=",
"... | Method which executes each registered cleanup task for each tenant. | [
"Method",
"which",
"executes",
"each",
"registered",
"cleanup",
"task",
"for",
"each",
"tenant",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupScheduler.java#L75-L91 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java | DistributionTable.styleDistributionSetTable | public void styleDistributionSetTable(final Long installedDistItemId, final Long assignedDistTableItemId) {
setCellStyleGenerator((source, itemId, propertyId) -> getPinnedDistributionStyle(installedDistItemId,
assignedDistTableItemId, itemId));
} | java | public void styleDistributionSetTable(final Long installedDistItemId, final Long assignedDistTableItemId) {
setCellStyleGenerator((source, itemId, propertyId) -> getPinnedDistributionStyle(installedDistItemId,
assignedDistTableItemId, itemId));
} | [
"public",
"void",
"styleDistributionSetTable",
"(",
"final",
"Long",
"installedDistItemId",
",",
"final",
"Long",
"assignedDistTableItemId",
")",
"{",
"setCellStyleGenerator",
"(",
"(",
"source",
",",
"itemId",
",",
"propertyId",
")",
"->",
"getPinnedDistributionStyle",... | Added by Saumya Target pin listener.
@param installedDistItemId
Item ids of installed distribution set
@param assignedDistTableItemId
Item ids of assigned distribution set | [
"Added",
"by",
"Saumya",
"Target",
"pin",
"listener",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java#L712-L715 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/AbstractGridButtonConverter.java | AbstractGridButtonConverter.createFontIconData | private static FontIconData createFontIconData(StatusFontIcon meta) {
FontIconData result = new FontIconData();
result.setFontIconHtml(meta.getFontIcon().getHtml());
result.setTitle(meta.getTitle());
result.setStyle(meta.getStyle());
result.setId(meta.getId());
result.set... | java | private static FontIconData createFontIconData(StatusFontIcon meta) {
FontIconData result = new FontIconData();
result.setFontIconHtml(meta.getFontIcon().getHtml());
result.setTitle(meta.getTitle());
result.setStyle(meta.getStyle());
result.setId(meta.getId());
result.set... | [
"private",
"static",
"FontIconData",
"createFontIconData",
"(",
"StatusFontIcon",
"meta",
")",
"{",
"FontIconData",
"result",
"=",
"new",
"FontIconData",
"(",
")",
";",
"result",
".",
"setFontIconHtml",
"(",
"meta",
".",
"getFontIcon",
"(",
")",
".",
"getHtml",
... | Creates a data transport object for the icon meta data.
@param meta
icon metadata
@return icon metadata transport object | [
"Creates",
"a",
"data",
"transport",
"object",
"for",
"the",
"icon",
"meta",
"data",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/AbstractGridButtonConverter.java#L54-L63 | train |
eclipse/hawkbit | hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/SpPermission.java | SpPermission.getAllAuthorities | public static List<String> getAllAuthorities() {
final List<String> allPermissions = new ArrayList<>();
final Field[] declaredFields = SpPermission.class.getDeclaredFields();
for (final Field field : declaredFields) {
if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(f... | java | public static List<String> getAllAuthorities() {
final List<String> allPermissions = new ArrayList<>();
final Field[] declaredFields = SpPermission.class.getDeclaredFields();
for (final Field field : declaredFields) {
if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(f... | [
"public",
"static",
"List",
"<",
"String",
">",
"getAllAuthorities",
"(",
")",
"{",
"final",
"List",
"<",
"String",
">",
"allPermissions",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"final",
"Field",
"[",
"]",
"declaredFields",
"=",
"SpPermission",
".",... | Return all permission.
@param exclusionRoles
roles which will excluded
@return all permissions | [
"Return",
"all",
"permission",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/SpPermission.java#L165-L180 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/client/criteria/ViewComponentClientCriterion.java | ViewComponentClientCriterion.isValidDragSource | @SuppressWarnings({ "squid:S1166", "squid:S2221" })
boolean isValidDragSource(final VDragEvent drag, final UIDL configuration) {
try {
final String dragSource = drag.getTransferable().getDragSource().getWidget().getElement().getId();
final String dragSourcePrefix = configuration.getS... | java | @SuppressWarnings({ "squid:S1166", "squid:S2221" })
boolean isValidDragSource(final VDragEvent drag, final UIDL configuration) {
try {
final String dragSource = drag.getTransferable().getDragSource().getWidget().getElement().getId();
final String dragSourcePrefix = configuration.getS... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"squid:S1166\"",
",",
"\"squid:S2221\"",
"}",
")",
"boolean",
"isValidDragSource",
"(",
"final",
"VDragEvent",
"drag",
",",
"final",
"UIDL",
"configuration",
")",
"{",
"try",
"{",
"final",
"String",
"dragSource",
"=",
"drag",... | Exception semantics changes | [
"Exception",
"semantics",
"changes"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/client/criteria/ViewComponentClientCriterion.java#L83-L97 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpAuthenticationMessageHandler.java | AmqpAuthenticationMessageHandler.onAuthenticationRequest | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.authenticationReceiverQueue:authentication_receiver}", containerFactory = "listenerContainerFactory")
public Message onAuthenticationRequest(final Message message) {
checkContentTypeJson(message);
final SecurityContext oldContext = SecurityContextHold... | java | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.authenticationReceiverQueue:authentication_receiver}", containerFactory = "listenerContainerFactory")
public Message onAuthenticationRequest(final Message message) {
checkContentTypeJson(message);
final SecurityContext oldContext = SecurityContextHold... | [
"@",
"RabbitListener",
"(",
"queues",
"=",
"\"${hawkbit.dmf.rabbitmq.authenticationReceiverQueue:authentication_receiver}\"",
",",
"containerFactory",
"=",
"\"listenerContainerFactory\"",
")",
"public",
"Message",
"onAuthenticationRequest",
"(",
"final",
"Message",
"message",
")"... | Executed on an authentication request.
@param message
the amqp message
@return the rpc message back to supplier. | [
"Executed",
"on",
"an",
"authentication",
"request",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpAuthenticationMessageHandler.java#L103-L114 | train |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpAuthenticationMessageHandler.java | AmqpAuthenticationMessageHandler.checkIfArtifactIsAssignedToTarget | private void checkIfArtifactIsAssignedToTarget(final DmfTenantSecurityToken secruityToken, final String sha1Hash) {
if (secruityToken.getControllerId() != null) {
checkByControllerId(sha1Hash, secruityToken.getControllerId());
} else if (secruityToken.getTargetId() != null) {
ch... | java | private void checkIfArtifactIsAssignedToTarget(final DmfTenantSecurityToken secruityToken, final String sha1Hash) {
if (secruityToken.getControllerId() != null) {
checkByControllerId(sha1Hash, secruityToken.getControllerId());
} else if (secruityToken.getTargetId() != null) {
ch... | [
"private",
"void",
"checkIfArtifactIsAssignedToTarget",
"(",
"final",
"DmfTenantSecurityToken",
"secruityToken",
",",
"final",
"String",
"sha1Hash",
")",
"{",
"if",
"(",
"secruityToken",
".",
"getControllerId",
"(",
")",
"!=",
"null",
")",
"{",
"checkByControllerId",
... | check action for this download purposes, the method will throw an
EntityNotFoundException in case the controller is not allowed to download
this file because it's not assigned to an action and not assigned to this
controller. Otherwise no controllerId is set = anonymous download
@param secruityToken
the security token... | [
"check",
"action",
"for",
"this",
"download",
"purposes",
"the",
"method",
"will",
"throw",
"an",
"EntityNotFoundException",
"in",
"case",
"the",
"controller",
"is",
"not",
"allowed",
"to",
"download",
"this",
"file",
"because",
"it",
"s",
"not",
"assigned",
"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpAuthenticationMessageHandler.java#L128-L138 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java | TotalTargetCountStatus.getTotalTargetCountByStatus | public Long getTotalTargetCountByStatus(final Status status) {
final Long count = statusTotalCountMap.get(status);
return count == null ? 0L : count;
} | java | public Long getTotalTargetCountByStatus(final Status status) {
final Long count = statusTotalCountMap.get(status);
return count == null ? 0L : count;
} | [
"public",
"Long",
"getTotalTargetCountByStatus",
"(",
"final",
"Status",
"status",
")",
"{",
"final",
"Long",
"count",
"=",
"statusTotalCountMap",
".",
"get",
"(",
"status",
")",
";",
"return",
"count",
"==",
"null",
"?",
"0L",
":",
"count",
";",
"}"
] | Gets the total target count from a state.
@param status
the state key
@return the current target count cannot be <null> | [
"Gets",
"the",
"total",
"target",
"count",
"from",
"a",
"state",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java#L108-L111 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java | TotalTargetCountStatus.addToTotalCount | private void addToTotalCount(final List<TotalTargetCountActionStatus> targetCountActionStatus) {
if (targetCountActionStatus == null) {
statusTotalCountMap.put(TotalTargetCountStatus.Status.NOTSTARTED, totalTargetCount);
return;
}
statusTotalCountMap.put(Status.RUNNING, 0... | java | private void addToTotalCount(final List<TotalTargetCountActionStatus> targetCountActionStatus) {
if (targetCountActionStatus == null) {
statusTotalCountMap.put(TotalTargetCountStatus.Status.NOTSTARTED, totalTargetCount);
return;
}
statusTotalCountMap.put(Status.RUNNING, 0... | [
"private",
"void",
"addToTotalCount",
"(",
"final",
"List",
"<",
"TotalTargetCountActionStatus",
">",
"targetCountActionStatus",
")",
"{",
"if",
"(",
"targetCountActionStatus",
"==",
"null",
")",
"{",
"statusTotalCountMap",
".",
"put",
"(",
"TotalTargetCountStatus",
"... | Populate all target status to a the given map
@param statusTotalCountMap
the map
@param rolloutStatusCountItems
all target {@link Status} with total count | [
"Populate",
"all",
"target",
"status",
"to",
"a",
"the",
"given",
"map"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java#L128-L140 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java | TotalTargetCountStatus.convertStatus | @SuppressWarnings("squid:MethodCyclomaticComplexity")
private Status convertStatus(final Action.Status status){
switch (status) {
case SCHEDULED:
return Status.SCHEDULED;
case ERROR:
return Status.ERROR;
case FINISHED:
return Status.FINISHED;
... | java | @SuppressWarnings("squid:MethodCyclomaticComplexity")
private Status convertStatus(final Action.Status status){
switch (status) {
case SCHEDULED:
return Status.SCHEDULED;
case ERROR:
return Status.ERROR;
case FINISHED:
return Status.FINISHED;
... | [
"@",
"SuppressWarnings",
"(",
"\"squid:MethodCyclomaticComplexity\"",
")",
"private",
"Status",
"convertStatus",
"(",
"final",
"Action",
".",
"Status",
"status",
")",
"{",
"switch",
"(",
"status",
")",
"{",
"case",
"SCHEDULED",
":",
"return",
"Status",
".",
"SCH... | really complex. | [
"really",
"complex",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/TotalTargetCountStatus.java#L149-L171 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/SoftwareModuleDetailsTable.java | SoftwareModuleDetailsTable.populateModule | public void populateModule(final DistributionSet distributionSet) {
removeAllItems();
if (distributionSet != null) {
if (isUnassignSoftModAllowed && permissionChecker.hasUpdateRepositoryPermission()) {
try {
isTargetAssigned = false;
} catc... | java | public void populateModule(final DistributionSet distributionSet) {
removeAllItems();
if (distributionSet != null) {
if (isUnassignSoftModAllowed && permissionChecker.hasUpdateRepositoryPermission()) {
try {
isTargetAssigned = false;
} catc... | [
"public",
"void",
"populateModule",
"(",
"final",
"DistributionSet",
"distributionSet",
")",
"{",
"removeAllItems",
"(",
")",
";",
"if",
"(",
"distributionSet",
"!=",
"null",
")",
"{",
"if",
"(",
"isUnassignSoftModAllowed",
"&&",
"permissionChecker",
".",
"hasUpda... | Populate software module table.
@param distributionSet | [
"Populate",
"software",
"module",
"table",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/SoftwareModuleDetailsTable.java#L145-L169 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java | DefaultGridHeader.buildTitleLabel | protected Label buildTitleLabel() {
// create default title - even shown when no data is available
title = new LabelBuilder().name(titleText).buildCaptionLabel();
title.setImmediate(true);
title.setContentMode(ContentMode.HTML);
return title;
} | java | protected Label buildTitleLabel() {
// create default title - even shown when no data is available
title = new LabelBuilder().name(titleText).buildCaptionLabel();
title.setImmediate(true);
title.setContentMode(ContentMode.HTML);
return title;
} | [
"protected",
"Label",
"buildTitleLabel",
"(",
")",
"{",
"// create default title - even shown when no data is available",
"title",
"=",
"new",
"LabelBuilder",
"(",
")",
".",
"name",
"(",
"titleText",
")",
".",
"buildCaptionLabel",
"(",
")",
";",
"title",
".",
"setIm... | Builds the title label.
@return title-label | [
"Builds",
"the",
"title",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java#L81-L88 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java | DefaultGridHeader.buildTitleLayout | protected HorizontalLayout buildTitleLayout() {
titleLayout = new HorizontalLayout();
titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
titleLayout.setSpacing(false);
titleLayout.setMargin(false);
titleLayout.setSizeFull();
titleLayout.addComponent(title);
... | java | protected HorizontalLayout buildTitleLayout() {
titleLayout = new HorizontalLayout();
titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
titleLayout.setSpacing(false);
titleLayout.setMargin(false);
titleLayout.setSizeFull();
titleLayout.addComponent(title);
... | [
"protected",
"HorizontalLayout",
"buildTitleLayout",
"(",
")",
"{",
"titleLayout",
"=",
"new",
"HorizontalLayout",
"(",
")",
";",
"titleLayout",
".",
"addStyleName",
"(",
"SPUIStyleDefinitions",
".",
"WIDGET_TITLE",
")",
";",
"titleLayout",
".",
"setSpacing",
"(",
... | Builds the title layout.
@return title-layout | [
"Builds",
"the",
"title",
"layout",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java#L95-L112 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java | DefaultGridHeader.buildComponent | protected void buildComponent() {
addComponent(titleLayout);
setComponentAlignment(titleLayout, Alignment.TOP_LEFT);
setWidth(100, Unit.PERCENTAGE);
setImmediate(true);
addStyleName("action-history-header");
addStyleName("bordered-layout");
addStyleName("no-border... | java | protected void buildComponent() {
addComponent(titleLayout);
setComponentAlignment(titleLayout, Alignment.TOP_LEFT);
setWidth(100, Unit.PERCENTAGE);
setImmediate(true);
addStyleName("action-history-header");
addStyleName("bordered-layout");
addStyleName("no-border... | [
"protected",
"void",
"buildComponent",
"(",
")",
"{",
"addComponent",
"(",
"titleLayout",
")",
";",
"setComponentAlignment",
"(",
"titleLayout",
",",
"Alignment",
".",
"TOP_LEFT",
")",
";",
"setWidth",
"(",
"100",
",",
"Unit",
".",
"PERCENTAGE",
")",
";",
"s... | Builds the layout for the header component. | [
"Builds",
"the",
"layout",
"for",
"the",
"header",
"component",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/DefaultGridHeader.java#L117-L125 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java | TargetAssignmentOperations.isMaintenanceWindowValid | public static boolean isMaintenanceWindowValid(final MaintenanceWindowLayout maintenanceWindowLayout,
final UINotification notification) {
if (maintenanceWindowLayout.isEnabled()) {
try {
MaintenanceScheduleHelper.validateMaintenanceSchedule(maintenanceWindowLayout.getMai... | java | public static boolean isMaintenanceWindowValid(final MaintenanceWindowLayout maintenanceWindowLayout,
final UINotification notification) {
if (maintenanceWindowLayout.isEnabled()) {
try {
MaintenanceScheduleHelper.validateMaintenanceSchedule(maintenanceWindowLayout.getMai... | [
"public",
"static",
"boolean",
"isMaintenanceWindowValid",
"(",
"final",
"MaintenanceWindowLayout",
"maintenanceWindowLayout",
",",
"final",
"UINotification",
"notification",
")",
"{",
"if",
"(",
"maintenanceWindowLayout",
".",
"isEnabled",
"(",
")",
")",
"{",
"try",
... | Check wether the maintenance window is valid or not
@param maintenanceWindowLayout
the maintenance window layout
@param notification
the UI Notification
@return boolean if maintenance window is valid or not | [
"Check",
"wether",
"the",
"maintenance",
"window",
"is",
"valid",
"or",
"not"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java#L166-L180 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java | TargetAssignmentOperations.createAssignmentTab | public static ConfirmationTab createAssignmentTab(
final ActionTypeOptionGroupAssignmentLayout actionTypeOptionGroupLayout,
final MaintenanceWindowLayout maintenanceWindowLayout, final Consumer<Boolean> saveButtonToggle,
final VaadinMessageSource i18n, final UiProperties uiProperties... | java | public static ConfirmationTab createAssignmentTab(
final ActionTypeOptionGroupAssignmentLayout actionTypeOptionGroupLayout,
final MaintenanceWindowLayout maintenanceWindowLayout, final Consumer<Boolean> saveButtonToggle,
final VaadinMessageSource i18n, final UiProperties uiProperties... | [
"public",
"static",
"ConfirmationTab",
"createAssignmentTab",
"(",
"final",
"ActionTypeOptionGroupAssignmentLayout",
"actionTypeOptionGroupLayout",
",",
"final",
"MaintenanceWindowLayout",
"maintenanceWindowLayout",
",",
"final",
"Consumer",
"<",
"Boolean",
">",
"saveButtonToggle... | Create the Assignment Confirmation Tab
@param actionTypeOptionGroupLayout
the action Type Option Group Layout
@param maintenanceWindowLayout
the Maintenance Window Layout
@param saveButtonToggle
The event listener to derimne if save button should be enabled or not
@param i18n
the Vaadin Message Source for multi langua... | [
"Create",
"the",
"Assignment",
"Confirmation",
"Tab"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java#L197-L211 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java | SPDateTimeUtil.getBrowserTimeZone | public static TimeZone getBrowserTimeZone() {
if (!StringUtils.isEmpty(fixedTimeZoneProperty)) {
return TimeZone.getTimeZone(fixedTimeZoneProperty);
}
final WebBrowser webBrowser = com.vaadin.server.Page.getCurrent().getWebBrowser();
final String[] timeZones = TimeZone.get... | java | public static TimeZone getBrowserTimeZone() {
if (!StringUtils.isEmpty(fixedTimeZoneProperty)) {
return TimeZone.getTimeZone(fixedTimeZoneProperty);
}
final WebBrowser webBrowser = com.vaadin.server.Page.getCurrent().getWebBrowser();
final String[] timeZones = TimeZone.get... | [
"public",
"static",
"TimeZone",
"getBrowserTimeZone",
"(",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"isEmpty",
"(",
"fixedTimeZoneProperty",
")",
")",
"{",
"return",
"TimeZone",
".",
"getTimeZone",
"(",
"fixedTimeZoneProperty",
")",
";",
"}",
"final",
"We... | Get browser time zone or fixed time zone if configured
@return TimeZone | [
"Get",
"browser",
"time",
"zone",
"or",
"fixed",
"time",
"zone",
"if",
"configured"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java#L62-L79 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java | SPDateTimeUtil.getTimeZoneId | public static ZoneId getTimeZoneId(final TimeZone tz) {
return ZoneId.of(tz.getID(), ZoneId.SHORT_IDS);
} | java | public static ZoneId getTimeZoneId(final TimeZone tz) {
return ZoneId.of(tz.getID(), ZoneId.SHORT_IDS);
} | [
"public",
"static",
"ZoneId",
"getTimeZoneId",
"(",
"final",
"TimeZone",
"tz",
")",
"{",
"return",
"ZoneId",
".",
"of",
"(",
"tz",
".",
"getID",
"(",
")",
",",
"ZoneId",
".",
"SHORT_IDS",
")",
";",
"}"
] | Get time zone id .ZoneId.SHORT_IDS used get id if time zone is
abbreviated like 'IST'.
@param tz
@return ZoneId | [
"Get",
"time",
"zone",
"id",
".",
"ZoneId",
".",
"SHORT_IDS",
"used",
"get",
"id",
"if",
"time",
"zone",
"is",
"abbreviated",
"like",
"IST",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java#L88-L90 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java | SPDateTimeUtil.getFormattedDate | public static String getFormattedDate(final Long lastQueryDate, final String datePattern) {
return formatDate(lastQueryDate, null, datePattern);
} | java | public static String getFormattedDate(final Long lastQueryDate, final String datePattern) {
return formatDate(lastQueryDate, null, datePattern);
} | [
"public",
"static",
"String",
"getFormattedDate",
"(",
"final",
"Long",
"lastQueryDate",
",",
"final",
"String",
"datePattern",
")",
"{",
"return",
"formatDate",
"(",
"lastQueryDate",
",",
"null",
",",
"datePattern",
")",
";",
"}"
] | Get formatted date with browser time zone.
@param lastQueryDate
@param datePattern
pattern how to format the date (cp. {@code SimpleDateFormat})
@return String formatted date | [
"Get",
"formatted",
"date",
"with",
"browser",
"time",
"zone",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java#L110-L112 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java | SPDateTimeUtil.formatLastModifiedAt | public static String formatLastModifiedAt(final BaseEntity baseEntity, final String datePattern) {
if (baseEntity == null) {
return "";
}
return formatDate(baseEntity.getLastModifiedAt(), "", datePattern);
} | java | public static String formatLastModifiedAt(final BaseEntity baseEntity, final String datePattern) {
if (baseEntity == null) {
return "";
}
return formatDate(baseEntity.getLastModifiedAt(), "", datePattern);
} | [
"public",
"static",
"String",
"formatLastModifiedAt",
"(",
"final",
"BaseEntity",
"baseEntity",
",",
"final",
"String",
"datePattern",
")",
"{",
"if",
"(",
"baseEntity",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"return",
"formatDate",
"(",
"baseEnti... | Get formatted date 'last modified at' by entity.
@param baseEntity
the entity
@param datePattern
pattern how to format the date (cp. {@code SimpleDateFormat})
@return String formatted date | [
"Get",
"formatted",
"date",
"last",
"modified",
"at",
"by",
"entity",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java#L151-L156 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java | SPDateTimeUtil.getDurationFormattedString | public static String getDurationFormattedString(final long startMillis, final long endMillis,
final VaadinMessageSource i18N) {
final String formatDuration = DurationFormatUtils.formatPeriod(startMillis, endMillis, DURATION_FORMAT, false,
getBrowserTimeZone());
final StringB... | java | public static String getDurationFormattedString(final long startMillis, final long endMillis,
final VaadinMessageSource i18N) {
final String formatDuration = DurationFormatUtils.formatPeriod(startMillis, endMillis, DURATION_FORMAT, false,
getBrowserTimeZone());
final StringB... | [
"public",
"static",
"String",
"getDurationFormattedString",
"(",
"final",
"long",
"startMillis",
",",
"final",
"long",
"endMillis",
",",
"final",
"VaadinMessageSource",
"i18N",
")",
"{",
"final",
"String",
"formatDuration",
"=",
"DurationFormatUtils",
".",
"formatPeri... | Creates a formatted string of a duration in format '1 year 2 months 3
days 4 hours 5 minutes 6 seconds' zero values will be ignored in the
formatted string.
@param startMillis
the start milliseconds of the duration
@param endMillis
the end milliseconds of the duration
@param i18N
the i18n service to determine the corr... | [
"Creates",
"a",
"formatted",
"string",
"of",
"a",
"duration",
"in",
"format",
"1",
"year",
"2",
"months",
"3",
"days",
"4",
"hours",
"5",
"minutes",
"6",
"seconds",
"zero",
"values",
"will",
"be",
"ignored",
"in",
"the",
"formatted",
"string",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPDateTimeUtil.java#L185-L207 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/DistributionSetInfoPanel.java | DistributionSetInfoPanel.getSWModlabel | private Label getSWModlabel(final String labelName, final SoftwareModule swModule) {
return SPUIComponentProvider.createNameValueLabel(labelName + " : ", swModule.getName(), swModule.getVersion());
} | java | private Label getSWModlabel(final String labelName, final SoftwareModule swModule) {
return SPUIComponentProvider.createNameValueLabel(labelName + " : ", swModule.getName(), swModule.getVersion());
} | [
"private",
"Label",
"getSWModlabel",
"(",
"final",
"String",
"labelName",
",",
"final",
"SoftwareModule",
"swModule",
")",
"{",
"return",
"SPUIComponentProvider",
".",
"createNameValueLabel",
"(",
"labelName",
"+",
"\" : \"",
",",
"swModule",
".",
"getName",
"(",
... | Create Label for SW Module.
@param labelName
as Name
@param swModule
as Module (JVM|OS|AH)
@return Label as UI | [
"Create",
"Label",
"for",
"SW",
"Module",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/DistributionSetInfoPanel.java#L90-L92 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/specifications/SpecificationsBuilder.java | SpecificationsBuilder.combineWithAnd | public static <T> Specification<T> combineWithAnd(final List<Specification<T>> specList) {
if (specList.isEmpty()) {
return null;
}
Specification<T> specs = Specification.where(specList.get(0));
for (final Specification<T> specification : specList.subList(1, specList.size()))... | java | public static <T> Specification<T> combineWithAnd(final List<Specification<T>> specList) {
if (specList.isEmpty()) {
return null;
}
Specification<T> specs = Specification.where(specList.get(0));
for (final Specification<T> specification : specList.subList(1, specList.size()))... | [
"public",
"static",
"<",
"T",
">",
"Specification",
"<",
"T",
">",
"combineWithAnd",
"(",
"final",
"List",
"<",
"Specification",
"<",
"T",
">",
">",
"specList",
")",
"{",
"if",
"(",
"specList",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";... | Combine all given specification with and. The first specification is the
where clause.
@param specList
all specification which will combine
@return <null> if the given specification list is empty | [
"Combine",
"all",
"given",
"specification",
"with",
"and",
".",
"The",
"first",
"specification",
"is",
"the",
"where",
"clause",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/specifications/SpecificationsBuilder.java#L33-L42 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java | DistributionBarHelper.getDistributionBarAsHTMLString | public static String getDistributionBarAsHTMLString(final Map<Status, Long> statusTotalCountMap) {
final StringBuilder htmlString = new StringBuilder();
final Map<Status, Long> statusMapWithNonZeroValues = getStatusMapWithNonZeroValues(statusTotalCountMap);
final Long totalValue = getTotalSizes(... | java | public static String getDistributionBarAsHTMLString(final Map<Status, Long> statusTotalCountMap) {
final StringBuilder htmlString = new StringBuilder();
final Map<Status, Long> statusMapWithNonZeroValues = getStatusMapWithNonZeroValues(statusTotalCountMap);
final Long totalValue = getTotalSizes(... | [
"public",
"static",
"String",
"getDistributionBarAsHTMLString",
"(",
"final",
"Map",
"<",
"Status",
",",
"Long",
">",
"statusTotalCountMap",
")",
"{",
"final",
"StringBuilder",
"htmlString",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"final",
"Map",
"<",
"Statu... | Returns a string with details of status and count .
@param statusTotalCountMap
map with status and count
@return string of format "status1:count,status2:count" | [
"Returns",
"a",
"string",
"with",
"details",
"of",
"status",
"and",
"count",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java#L43-L61 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java | DistributionBarHelper.getStatusMapWithNonZeroValues | public static Map<Status, Long> getStatusMapWithNonZeroValues(final Map<Status, Long> statusTotalCountMap) {
return statusTotalCountMap.entrySet().stream().filter(p -> p.getValue() > 0)
.collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue()));
} | java | public static Map<Status, Long> getStatusMapWithNonZeroValues(final Map<Status, Long> statusTotalCountMap) {
return statusTotalCountMap.entrySet().stream().filter(p -> p.getValue() > 0)
.collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue()));
} | [
"public",
"static",
"Map",
"<",
"Status",
",",
"Long",
">",
"getStatusMapWithNonZeroValues",
"(",
"final",
"Map",
"<",
"Status",
",",
"Long",
">",
"statusTotalCountMap",
")",
"{",
"return",
"statusTotalCountMap",
".",
"entrySet",
"(",
")",
".",
"stream",
"(",
... | Returns the map with status having non zero values.
@param statusTotalCountMap
map with status and count
@return map with non zero values | [
"Returns",
"the",
"map",
"with",
"status",
"having",
"non",
"zero",
"values",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java#L70-L73 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java | DistributionBarHelper.getTooltip | public static String getTooltip(final Map<Status, Long> statusCountMap) {
final Map<Status, Long> nonZeroStatusCountMap = DistributionBarHelper
.getStatusMapWithNonZeroValues(statusCountMap);
final StringBuilder tooltip = new StringBuilder();
for (final Entry<Status, Long> entry ... | java | public static String getTooltip(final Map<Status, Long> statusCountMap) {
final Map<Status, Long> nonZeroStatusCountMap = DistributionBarHelper
.getStatusMapWithNonZeroValues(statusCountMap);
final StringBuilder tooltip = new StringBuilder();
for (final Entry<Status, Long> entry ... | [
"public",
"static",
"String",
"getTooltip",
"(",
"final",
"Map",
"<",
"Status",
",",
"Long",
">",
"statusCountMap",
")",
"{",
"final",
"Map",
"<",
"Status",
",",
"Long",
">",
"nonZeroStatusCountMap",
"=",
"DistributionBarHelper",
".",
"getStatusMapWithNonZeroValue... | Returns tool tip for progress bar.
@param statusCountMap
map with status and count details
@return tool tip | [
"Returns",
"tool",
"tip",
"for",
"progress",
"bar",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java#L82-L91 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java | DurationHelper.durationToFormattedString | public static String durationToFormattedString(final Duration duration) {
if (duration == null) {
return null;
}
return LocalTime.ofNanoOfDay(duration.toNanos()).format(DateTimeFormatter.ofPattern(DURATION_FORMAT));
} | java | public static String durationToFormattedString(final Duration duration) {
if (duration == null) {
return null;
}
return LocalTime.ofNanoOfDay(duration.toNanos()).format(DateTimeFormatter.ofPattern(DURATION_FORMAT));
} | [
"public",
"static",
"String",
"durationToFormattedString",
"(",
"final",
"Duration",
"duration",
")",
"{",
"if",
"(",
"duration",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"LocalTime",
".",
"ofNanoOfDay",
"(",
"duration",
".",
"toNanos",
... | Converts a Duration into a formatted String
@param duration
duration, which will be converted into a formatted String
@return String in the duration format, specified at
{@link #DURATION_FORMAT} | [
"Converts",
"a",
"Duration",
"into",
"a",
"formatted",
"String"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java#L81-L87 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java | DurationHelper.formattedStringToDuration | public static Duration formattedStringToDuration(final String formattedDuration) {
if (formattedDuration == null) {
return null;
}
final TemporalAccessor ta = DateTimeFormatter.ofPattern(DURATION_FORMAT).parse(formattedDuration.trim());
return Duration.between(LocalTime.MIDN... | java | public static Duration formattedStringToDuration(final String formattedDuration) {
if (formattedDuration == null) {
return null;
}
final TemporalAccessor ta = DateTimeFormatter.ofPattern(DURATION_FORMAT).parse(formattedDuration.trim());
return Duration.between(LocalTime.MIDN... | [
"public",
"static",
"Duration",
"formattedStringToDuration",
"(",
"final",
"String",
"formattedDuration",
")",
"{",
"if",
"(",
"formattedDuration",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"TemporalAccessor",
"ta",
"=",
"DateTimeFormatter",
"."... | Converts a formatted String into a Duration object.
@param formattedDuration
String in {@link #DURATION_FORMAT}
@return duration
@throws DateTimeParseException
when String is in wrong format | [
"Converts",
"a",
"formatted",
"String",
"into",
"a",
"Duration",
"object",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java#L98-L105 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java | DurationHelper.getDurationByTimeValues | public static Duration getDurationByTimeValues(final long hours, final long minutes, final long seconds) {
return Duration.ofHours(hours).plusMinutes(minutes).plusSeconds(seconds);
} | java | public static Duration getDurationByTimeValues(final long hours, final long minutes, final long seconds) {
return Duration.ofHours(hours).plusMinutes(minutes).plusSeconds(seconds);
} | [
"public",
"static",
"Duration",
"getDurationByTimeValues",
"(",
"final",
"long",
"hours",
",",
"final",
"long",
"minutes",
",",
"final",
"long",
"seconds",
")",
"{",
"return",
"Duration",
".",
"ofHours",
"(",
"hours",
")",
".",
"plusMinutes",
"(",
"minutes",
... | converts values of time constants to a Duration object..
@param hours
count of hours
@param minutes
count of minutes
@param seconds
count of seconds
@return duration | [
"converts",
"values",
"of",
"time",
"constants",
"to",
"a",
"Duration",
"object",
".."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/DurationHelper.java#L118-L120 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/AddUpdateRolloutWindowLayout.java | AddUpdateRolloutWindowLayout.resetComponents | private void resetComponents() {
defineGroupsLayout.resetComponents();
editRolloutEnabled = false;
rolloutName.clear();
targetFilterQuery.clear();
resetFields();
enableFields();
populateDistributionSet();
populateTargetFilterQuery();
setDefaultSave... | java | private void resetComponents() {
defineGroupsLayout.resetComponents();
editRolloutEnabled = false;
rolloutName.clear();
targetFilterQuery.clear();
resetFields();
enableFields();
populateDistributionSet();
populateTargetFilterQuery();
setDefaultSave... | [
"private",
"void",
"resetComponents",
"(",
")",
"{",
"defineGroupsLayout",
".",
"resetComponents",
"(",
")",
";",
"editRolloutEnabled",
"=",
"false",
";",
"rolloutName",
".",
"clear",
"(",
")",
";",
"targetFilterQuery",
".",
"clear",
"(",
")",
";",
"resetField... | Reset the field values. | [
"Reset",
"the",
"field",
"values",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/AddUpdateRolloutWindowLayout.java#L412-L442 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java | TargetBulkUpdateWindowLayout.resetComponents | public void resetComponents() {
dsNamecomboBox.clear();
descTextArea.clear();
targetBulkTokenTags.getTokenField().clear();
targetBulkTokenTags.populateContainer();
progressBar.setValue(0F);
progressBar.setVisible(false);
managementUIState.getTargetTableFilters().g... | java | public void resetComponents() {
dsNamecomboBox.clear();
descTextArea.clear();
targetBulkTokenTags.getTokenField().clear();
targetBulkTokenTags.populateContainer();
progressBar.setValue(0F);
progressBar.setVisible(false);
managementUIState.getTargetTableFilters().g... | [
"public",
"void",
"resetComponents",
"(",
")",
"{",
"dsNamecomboBox",
".",
"clear",
"(",
")",
";",
"descTextArea",
".",
"clear",
"(",
")",
";",
"targetBulkTokenTags",
".",
"getTokenField",
"(",
")",
".",
"clear",
"(",
")",
";",
"targetBulkTokenTags",
".",
... | Reset the values in popup. | [
"Reset",
"the",
"values",
"in",
"popup",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java#L286-L295 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java | TargetBulkUpdateWindowLayout.restoreComponentsValue | public void restoreComponentsValue() {
targetBulkTokenTags.populateContainer();
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
progressBar.setValue(targetBulkUpload.getProgressBarCurrentValue());
dsNamecomboBox.setValue(targetBulkUplo... | java | public void restoreComponentsValue() {
targetBulkTokenTags.populateContainer();
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
progressBar.setValue(targetBulkUpload.getProgressBarCurrentValue());
dsNamecomboBox.setValue(targetBulkUplo... | [
"public",
"void",
"restoreComponentsValue",
"(",
")",
"{",
"targetBulkTokenTags",
".",
"populateContainer",
"(",
")",
";",
"final",
"TargetBulkUpload",
"targetBulkUpload",
"=",
"managementUIState",
".",
"getTargetTableFilters",
"(",
")",
".",
"getBulkUpload",
"(",
")"... | Restore the target bulk upload layout field values. | [
"Restore",
"the",
"target",
"bulk",
"upload",
"layout",
"field",
"values",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java#L310-L323 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java | TargetBulkUpdateWindowLayout.onUploadCompletion | public void onUploadCompletion() {
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
final String targetCountLabel = getFormattedCountLabelValue(targetBulkUpload.getSucessfulUploadCount(),
targetBulkUpload.getFailedUploadCount());
... | java | public void onUploadCompletion() {
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
final String targetCountLabel = getFormattedCountLabelValue(targetBulkUpload.getSucessfulUploadCount(),
targetBulkUpload.getFailedUploadCount());
... | [
"public",
"void",
"onUploadCompletion",
"(",
")",
"{",
"final",
"TargetBulkUpload",
"targetBulkUpload",
"=",
"managementUIState",
".",
"getTargetTableFilters",
"(",
")",
".",
"getBulkUpload",
"(",
")",
";",
"final",
"String",
"targetCountLabel",
"=",
"getFormattedCoun... | Actions once bulk upload is completed. | [
"Actions",
"once",
"bulk",
"upload",
"is",
"completed",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java#L328-L338 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java | TargetBulkUpdateWindowLayout.getWindow | public Window getWindow() {
managementUIState.setBulkUploadWindowMinimised(false);
bulkUploadWindow = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption("").content(this)
.buildWindow();
bulkUploadWindow.addStyleName("bulk-upload-window");
bulkUploadWindow.s... | java | public Window getWindow() {
managementUIState.setBulkUploadWindowMinimised(false);
bulkUploadWindow = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption("").content(this)
.buildWindow();
bulkUploadWindow.addStyleName("bulk-upload-window");
bulkUploadWindow.s... | [
"public",
"Window",
"getWindow",
"(",
")",
"{",
"managementUIState",
".",
"setBulkUploadWindowMinimised",
"(",
"false",
")",
";",
"bulkUploadWindow",
"=",
"new",
"WindowBuilder",
"(",
"SPUIDefinitions",
".",
"CREATE_UPDATE_WINDOW",
")",
".",
"caption",
"(",
"\"\"",
... | create and return window
@return Window window | [
"create",
"and",
"return",
"window"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java#L356-L369 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java | AbstractGridComponentLayout.init | protected void init() {
this.gridHeader = createGridHeader();
this.grid = createGrid();
buildLayout();
setSizeFull();
setImmediate(true);
if (doSubscribeToEventBus()) {
eventBus.subscribe(this);
}
} | java | protected void init() {
this.gridHeader = createGridHeader();
this.grid = createGrid();
buildLayout();
setSizeFull();
setImmediate(true);
if (doSubscribeToEventBus()) {
eventBus.subscribe(this);
}
} | [
"protected",
"void",
"init",
"(",
")",
"{",
"this",
".",
"gridHeader",
"=",
"createGridHeader",
"(",
")",
";",
"this",
".",
"grid",
"=",
"createGrid",
"(",
")",
";",
"buildLayout",
"(",
")",
";",
"setSizeFull",
"(",
")",
";",
"setImmediate",
"(",
"true... | Initializes this layout that presents a header and a grid. | [
"Initializes",
"this",
"layout",
"that",
"presents",
"a",
"header",
"and",
"a",
"grid",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java#L54-L63 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java | AbstractGridComponentLayout.buildLayout | protected void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout gridHeaderLayout = new VerticalLayout();
gridHeaderLayout.setSizeFull();
gridHeaderLayout.setSpacing(false);
gridHeaderLayout.setM... | java | protected void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout gridHeaderLayout = new VerticalLayout();
gridHeaderLayout.setSizeFull();
gridHeaderLayout.setSpacing(false);
gridHeaderLayout.setM... | [
"protected",
"void",
"buildLayout",
"(",
")",
"{",
"setSizeFull",
"(",
")",
";",
"setSpacing",
"(",
"true",
")",
";",
"setMargin",
"(",
"false",
")",
";",
"setStyleName",
"(",
"\"group\"",
")",
";",
"final",
"VerticalLayout",
"gridHeaderLayout",
"=",
"new",
... | Layouts header, grid and optional footer. | [
"Layouts",
"header",
"grid",
"and",
"optional",
"footer",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java#L77-L104 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java | AbstractGridComponentLayout.registerDetails | public void registerDetails(final AbstractGrid<?>.DetailsSupport details) {
grid.addSelectionListener(event -> {
final Long masterId = (Long) event.getSelected().stream().findFirst().orElse(null);
details.populateMasterDataAndRecalculateContainer(masterId);
});
} | java | public void registerDetails(final AbstractGrid<?>.DetailsSupport details) {
grid.addSelectionListener(event -> {
final Long masterId = (Long) event.getSelected().stream().findFirst().orElse(null);
details.populateMasterDataAndRecalculateContainer(masterId);
});
} | [
"public",
"void",
"registerDetails",
"(",
"final",
"AbstractGrid",
"<",
"?",
">",
".",
"DetailsSupport",
"details",
")",
"{",
"grid",
".",
"addSelectionListener",
"(",
"event",
"->",
"{",
"final",
"Long",
"masterId",
"=",
"(",
"Long",
")",
"event",
".",
"g... | Registers the selection of this grid as master for another grid that
displays the details.
@param details
the details of another grid the selection of this grid should
be registered for as master. | [
"Registers",
"the",
"selection",
"of",
"this",
"grid",
"as",
"master",
"for",
"another",
"grid",
"that",
"displays",
"the",
"details",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGridComponentLayout.java#L114-L119 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/NoCountPagingRepository.java | NoCountPagingRepository.findAll | public <T, I extends Serializable> Slice<T> findAll(final Specification<T> spec, final Pageable pageable,
final Class<T> domainClass) {
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<>(domainClass, em);
return noCountDao.findAll(spec, pageable);
} | java | public <T, I extends Serializable> Slice<T> findAll(final Specification<T> spec, final Pageable pageable,
final Class<T> domainClass) {
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<>(domainClass, em);
return noCountDao.findAll(spec, pageable);
} | [
"public",
"<",
"T",
",",
"I",
"extends",
"Serializable",
">",
"Slice",
"<",
"T",
">",
"findAll",
"(",
"final",
"Specification",
"<",
"T",
">",
"spec",
",",
"final",
"Pageable",
"pageable",
",",
"final",
"Class",
"<",
"T",
">",
"domainClass",
")",
"{",
... | Searches without the need for an extra count query.
@param spec
to search for
@param pageable
information
@param domainClass
of the {@link Entity}
@return {@link Slice} of data
@see org.springframework.data.jpa.repository.JpaSpecificationExecutor#findAll(org.springframework
.data.jpa.domain.Specification,
org.spring... | [
"Searches",
"without",
"the",
"need",
"for",
"an",
"extra",
"count",
"query",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/NoCountPagingRepository.java#L55-L59 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/report/model/TenantUsage.java | TenantUsage.addUsageData | public TenantUsage addUsageData(final String key, final String value) {
getLazyUsageData().put(key, value);
return this;
} | java | public TenantUsage addUsageData(final String key, final String value) {
getLazyUsageData().put(key, value);
return this;
} | [
"public",
"TenantUsage",
"addUsageData",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
")",
"{",
"getLazyUsageData",
"(",
")",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Add a key and value as usage data to the system usage stats.
@param key
the key to set
@param value
the value to set
@return tenant stats element with new usage added | [
"Add",
"a",
"key",
"and",
"value",
"as",
"usage",
"data",
"to",
"the",
"system",
"usage",
"stats",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/report/model/TenantUsage.java#L97-L100 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/groupschart/GroupsPieChart.java | GroupsPieChart.setChartState | public void setChartState(final List<Long> groupTargetCounts, final Long totalTargetsCount) {
getState().setGroupTargetCounts(groupTargetCounts);
getState().setTotalTargetCount(totalTargetsCount);
markAsDirty();
} | java | public void setChartState(final List<Long> groupTargetCounts, final Long totalTargetsCount) {
getState().setGroupTargetCounts(groupTargetCounts);
getState().setTotalTargetCount(totalTargetsCount);
markAsDirty();
} | [
"public",
"void",
"setChartState",
"(",
"final",
"List",
"<",
"Long",
">",
"groupTargetCounts",
",",
"final",
"Long",
"totalTargetsCount",
")",
"{",
"getState",
"(",
")",
".",
"setGroupTargetCounts",
"(",
"groupTargetCounts",
")",
";",
"getState",
"(",
")",
".... | Updates the state of the chart
@param groupTargetCounts
list of target counts
@param totalTargetsCount
total count of targets that are represented by the pie | [
"Updates",
"the",
"state",
"of",
"the",
"chart"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/groupschart/GroupsPieChart.java#L32-L36 | train |
eclipse/hawkbit | hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/repository/event/EventPublisherAutoConfiguration.java | EventPublisherAutoConfiguration.applicationEventMulticaster | @Bean(name = AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME)
ApplicationEventMulticaster applicationEventMulticaster(@Qualifier("asyncExecutor") final Executor executor,
final TenantAware tenantAware) {
final SimpleApplicationEventMulticaster simpleApplicationEventMulticaster... | java | @Bean(name = AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME)
ApplicationEventMulticaster applicationEventMulticaster(@Qualifier("asyncExecutor") final Executor executor,
final TenantAware tenantAware) {
final SimpleApplicationEventMulticaster simpleApplicationEventMulticaster... | [
"@",
"Bean",
"(",
"name",
"=",
"AbstractApplicationContext",
".",
"APPLICATION_EVENT_MULTICASTER_BEAN_NAME",
")",
"ApplicationEventMulticaster",
"applicationEventMulticaster",
"(",
"@",
"Qualifier",
"(",
"\"asyncExecutor\"",
")",
"final",
"Executor",
"executor",
",",
"final... | Server internal event publisher that allows parallel event processing if
the event listener is marked as so.
@return publisher bean | [
"Server",
"internal",
"event",
"publisher",
"that",
"allows",
"parallel",
"event",
"processing",
"if",
"the",
"event",
"listener",
"is",
"marked",
"as",
"so",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/repository/event/EventPublisherAutoConfiguration.java#L53-L60 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java | AutoAssignChecker.check | @Transactional(propagation = Propagation.REQUIRES_NEW)
public void check() {
LOGGER.debug("Auto assigned check call");
final PageRequest pageRequest = PageRequest.of(0, PAGE_SIZE);
final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findWithAutoAssignDS(pageRequest);
... | java | @Transactional(propagation = Propagation.REQUIRES_NEW)
public void check() {
LOGGER.debug("Auto assigned check call");
final PageRequest pageRequest = PageRequest.of(0, PAGE_SIZE);
final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findWithAutoAssignDS(pageRequest);
... | [
"@",
"Transactional",
"(",
"propagation",
"=",
"Propagation",
".",
"REQUIRES_NEW",
")",
"public",
"void",
"check",
"(",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Auto assigned check call\"",
")",
";",
"final",
"PageRequest",
"pageRequest",
"=",
"PageRequest",
".... | Checks all target filter queries with an auto assign distribution set and
triggers the check and assignment to targets that don't have the design
DS yet | [
"Checks",
"all",
"target",
"filter",
"queries",
"with",
"an",
"auto",
"assign",
"distribution",
"set",
"and",
"triggers",
"the",
"check",
"and",
"assignment",
"to",
"targets",
"that",
"don",
"t",
"have",
"the",
"design",
"DS",
"yet"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java#L93-L105 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java | AutoAssignChecker.checkByTargetFilterQueryAndAssignDS | private void checkByTargetFilterQueryAndAssignDS(final TargetFilterQuery targetFilterQuery) {
try {
final DistributionSet distributionSet = targetFilterQuery.getAutoAssignDistributionSet();
int count;
do {
count = runTransactionalAssignment(targetFilterQuery... | java | private void checkByTargetFilterQueryAndAssignDS(final TargetFilterQuery targetFilterQuery) {
try {
final DistributionSet distributionSet = targetFilterQuery.getAutoAssignDistributionSet();
int count;
do {
count = runTransactionalAssignment(targetFilterQuery... | [
"private",
"void",
"checkByTargetFilterQueryAndAssignDS",
"(",
"final",
"TargetFilterQuery",
"targetFilterQuery",
")",
"{",
"try",
"{",
"final",
"DistributionSet",
"distributionSet",
"=",
"targetFilterQuery",
".",
"getAutoAssignDistributionSet",
"(",
")",
";",
"int",
"cou... | Fetches the distribution set, gets all controllerIds and assigns the DS
to them. Catches PersistenceException and own exceptions derived from
AbstractServerRtException
@param targetFilterQuery
the target filter query | [
"Fetches",
"the",
"distribution",
"set",
"gets",
"all",
"controllerIds",
"and",
"assigns",
"the",
"DS",
"to",
"them",
".",
"Catches",
"PersistenceException",
"and",
"own",
"exceptions",
"derived",
"from",
"AbstractServerRtException"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java#L115-L130 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java | AutoAssignChecker.runTransactionalAssignment | private int runTransactionalAssignment(final TargetFilterQuery targetFilterQuery, final Long dsId) {
final String actionMessage = String.format(ACTION_MESSAGE, targetFilterQuery.getName());
return DeploymentHelper.runInNewTransaction(transactionManager, "autoAssignDSToTargets",
Isolatio... | java | private int runTransactionalAssignment(final TargetFilterQuery targetFilterQuery, final Long dsId) {
final String actionMessage = String.format(ACTION_MESSAGE, targetFilterQuery.getName());
return DeploymentHelper.runInNewTransaction(transactionManager, "autoAssignDSToTargets",
Isolatio... | [
"private",
"int",
"runTransactionalAssignment",
"(",
"final",
"TargetFilterQuery",
"targetFilterQuery",
",",
"final",
"Long",
"dsId",
")",
"{",
"final",
"String",
"actionMessage",
"=",
"String",
".",
"format",
"(",
"ACTION_MESSAGE",
",",
"targetFilterQuery",
".",
"g... | Runs one page of target assignments within a dedicated transaction
@param targetFilterQuery
the target filter query
@param dsId
distribution set id to assign
@return count of targets | [
"Runs",
"one",
"page",
"of",
"target",
"assignments",
"within",
"a",
"dedicated",
"transaction"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java#L141-L154 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java | AutoAssignChecker.getTargetsWithActionType | private List<TargetWithActionType> getTargetsWithActionType(final String targetFilterQuery, final Long dsId,
final ActionType type, final int count) {
final Page<Target> targets = targetManagement.findByTargetFilterQueryAndNonDS(PageRequest.of(0, count), dsId,
targetFilterQuery);
... | java | private List<TargetWithActionType> getTargetsWithActionType(final String targetFilterQuery, final Long dsId,
final ActionType type, final int count) {
final Page<Target> targets = targetManagement.findByTargetFilterQueryAndNonDS(PageRequest.of(0, count), dsId,
targetFilterQuery);
... | [
"private",
"List",
"<",
"TargetWithActionType",
">",
"getTargetsWithActionType",
"(",
"final",
"String",
"targetFilterQuery",
",",
"final",
"Long",
"dsId",
",",
"final",
"ActionType",
"type",
",",
"final",
"int",
"count",
")",
"{",
"final",
"Page",
"<",
"Target"... | Gets all matching targets with the designated action from the target
management
@param targetFilterQuery
the query the targets have to match
@param dsId
dsId the targets are not allowed to have in their action
history
@param type
action type for targets auto assignment
@param count
maximum amount of targets to retriev... | [
"Gets",
"all",
"matching",
"targets",
"with",
"the",
"designated",
"action",
"from",
"the",
"target",
"management"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignChecker.java#L171-L181 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/AbstractHtmlLabelConverter.java | AbstractHtmlLabelConverter.convert | private String convert(final T status) {
if (adapter == null) {
throw new IllegalStateException(
"Adapter must be set before usage! Convertion without adapter is not possible!");
}
final StatusFontIcon statusProps = adapter.adapt(status);
// fail fast
... | java | private String convert(final T status) {
if (adapter == null) {
throw new IllegalStateException(
"Adapter must be set before usage! Convertion without adapter is not possible!");
}
final StatusFontIcon statusProps = adapter.adapt(status);
// fail fast
... | [
"private",
"String",
"convert",
"(",
"final",
"T",
"status",
")",
"{",
"if",
"(",
"adapter",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Adapter must be set before usage! Convertion without adapter is not possible!\"",
")",
";",
"}",
"fina... | Converts the model data to a string representation of the presentation
label that is used on client-side to style the label.
@param status
model data
@return string representation of label | [
"Converts",
"the",
"model",
"data",
"to",
"a",
"string",
"representation",
"of",
"the",
"presentation",
"label",
"that",
"is",
"used",
"on",
"client",
"-",
"side",
"to",
"style",
"the",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/AbstractHtmlLabelConverter.java#L68-L82 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java | DashboardMenu.buildLabelWrapper | private static Component buildLabelWrapper(final ValoMenuItemButton menuItemButton,
final Component notificationLabel) {
final CssLayout dashboardWrapper = new CssLayout(menuItemButton);
dashboardWrapper.addStyleName("labelwrapper");
dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM)... | java | private static Component buildLabelWrapper(final ValoMenuItemButton menuItemButton,
final Component notificationLabel) {
final CssLayout dashboardWrapper = new CssLayout(menuItemButton);
dashboardWrapper.addStyleName("labelwrapper");
dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM)... | [
"private",
"static",
"Component",
"buildLabelWrapper",
"(",
"final",
"ValoMenuItemButton",
"menuItemButton",
",",
"final",
"Component",
"notificationLabel",
")",
"{",
"final",
"CssLayout",
"dashboardWrapper",
"=",
"new",
"CssLayout",
"(",
"menuItemButton",
")",
";",
"... | Creates the wrapper which contains the menu item and the adjacent label
for displaying the occurred events
@param menuItemButton
the menu item
@param notificationLabel
the label for displaying the occurred events
@return Component of type CssLayout | [
"Creates",
"the",
"wrapper",
"which",
"contains",
"the",
"menu",
"item",
"and",
"the",
"adjacent",
"label",
"for",
"displaying",
"the",
"occurred",
"events"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java#L267-L278 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java | DashboardMenu.getAccessibleViews | private List<DashboardMenuItem> getAccessibleViews() {
return this.dashboardVaadinViews.stream()
.filter(view -> permissionService.hasAtLeastOnePermission(view.getPermissions()))
.collect(Collectors.toList());
} | java | private List<DashboardMenuItem> getAccessibleViews() {
return this.dashboardVaadinViews.stream()
.filter(view -> permissionService.hasAtLeastOnePermission(view.getPermissions()))
.collect(Collectors.toList());
} | [
"private",
"List",
"<",
"DashboardMenuItem",
">",
"getAccessibleViews",
"(",
")",
"{",
"return",
"this",
".",
"dashboardVaadinViews",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"view",
"->",
"permissionService",
".",
"hasAtLeastOnePermission",
"(",
"view",
"."... | Returns all views which are currently accessible by the current logged in
user.
@return a list of all views which are currently visible and accessible
for the current logged in user | [
"Returns",
"all",
"views",
"which",
"are",
"currently",
"accessible",
"by",
"the",
"current",
"logged",
"in",
"user",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java#L287-L291 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java | DashboardMenu.getByViewName | public DashboardMenuItem getByViewName(final String viewName) {
final Optional<DashboardMenuItem> findFirst = dashboardVaadinViews.stream()
.filter(view -> view.getViewName().equals(viewName)).findAny();
if (!findFirst.isPresent()) {
return null;
}
return fi... | java | public DashboardMenuItem getByViewName(final String viewName) {
final Optional<DashboardMenuItem> findFirst = dashboardVaadinViews.stream()
.filter(view -> view.getViewName().equals(viewName)).findAny();
if (!findFirst.isPresent()) {
return null;
}
return fi... | [
"public",
"DashboardMenuItem",
"getByViewName",
"(",
"final",
"String",
"viewName",
")",
"{",
"final",
"Optional",
"<",
"DashboardMenuItem",
">",
"findFirst",
"=",
"dashboardVaadinViews",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"view",
"->",
"view",
".",
... | Returns the dashboard view type by a given view name.
@param viewName
the name of the view to retrieve
@return the dashboard view for a given viewname or {@code null} if view
with given viewname does not exists | [
"Returns",
"the",
"dashboard",
"view",
"type",
"by",
"a",
"given",
"view",
"name",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java#L339-L348 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java | DashboardMenu.isAccessDenied | public boolean isAccessDenied(final String viewName) {
final List<DashboardMenuItem> accessibleViews = getAccessibleViews();
boolean accessDeined = Boolean.TRUE.booleanValue();
for (final DashboardMenuItem dashboardViewType : accessibleViews) {
if (dashboardViewType.getViewName().equ... | java | public boolean isAccessDenied(final String viewName) {
final List<DashboardMenuItem> accessibleViews = getAccessibleViews();
boolean accessDeined = Boolean.TRUE.booleanValue();
for (final DashboardMenuItem dashboardViewType : accessibleViews) {
if (dashboardViewType.getViewName().equ... | [
"public",
"boolean",
"isAccessDenied",
"(",
"final",
"String",
"viewName",
")",
"{",
"final",
"List",
"<",
"DashboardMenuItem",
">",
"accessibleViews",
"=",
"getAccessibleViews",
"(",
")",
";",
"boolean",
"accessDeined",
"=",
"Boolean",
".",
"TRUE",
".",
"boolea... | Is the given view accessible.
@param viewName
the view name
@return <code>true</code> = denied, <code>false</code> = accessible | [
"Is",
"the",
"given",
"view",
"accessible",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java#L357-L366 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java | DeploymentHelper.successCancellation | public static void successCancellation(final JpaAction action, final ActionRepository actionRepository,
final TargetRepository targetRepository) {
// set action inactive
action.setActive(false);
action.setStatus(Status.CANCELED);
final JpaTarget target = (JpaTarget) action.... | java | public static void successCancellation(final JpaAction action, final ActionRepository actionRepository,
final TargetRepository targetRepository) {
// set action inactive
action.setActive(false);
action.setStatus(Status.CANCELED);
final JpaTarget target = (JpaTarget) action.... | [
"public",
"static",
"void",
"successCancellation",
"(",
"final",
"JpaAction",
"action",
",",
"final",
"ActionRepository",
"actionRepository",
",",
"final",
"TargetRepository",
"targetRepository",
")",
"{",
"// set action inactive",
"action",
".",
"setActive",
"(",
"fals... | This method is called, when cancellation has been successful. It sets the
action to canceled, resets the meta data of the target and in case there
is a new action this action is triggered.
@param action
the action which is set to canceled
@param actionRepository
for the operation
@param targetRepository
for the operat... | [
"This",
"method",
"is",
"called",
"when",
"cancellation",
"has",
"been",
"successful",
".",
"It",
"sets",
"the",
"action",
"to",
"canceled",
"resets",
"the",
"meta",
"data",
"of",
"the",
"target",
"and",
"in",
"case",
"there",
"is",
"a",
"new",
"action",
... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java#L52-L71 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java | UINotification.displaySuccess | public void displaySuccess(final String message) {
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_SUCCESS_MESSAGE_STYLE, null, message,
true);
} | java | public void displaySuccess(final String message) {
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_SUCCESS_MESSAGE_STYLE, null, message,
true);
} | [
"public",
"void",
"displaySuccess",
"(",
"final",
"String",
"message",
")",
"{",
"notificationMessage",
".",
"showNotification",
"(",
"SPUIStyleDefinitions",
".",
"SP_NOTIFICATION_SUCCESS_MESSAGE_STYLE",
",",
"null",
",",
"message",
",",
"true",
")",
";",
"}"
] | Display success type of notification message.
@param message
is the message to displayed as success. | [
"Display",
"success",
"type",
"of",
"notification",
"message",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java#L41-L44 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java | UINotification.displayWarning | public void displayWarning(final String message) {
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_WARNING_MESSAGE_STYLE, null, message,
true);
} | java | public void displayWarning(final String message) {
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_WARNING_MESSAGE_STYLE, null, message,
true);
} | [
"public",
"void",
"displayWarning",
"(",
"final",
"String",
"message",
")",
"{",
"notificationMessage",
".",
"showNotification",
"(",
"SPUIStyleDefinitions",
".",
"SP_NOTIFICATION_WARNING_MESSAGE_STYLE",
",",
"null",
",",
"message",
",",
"true",
")",
";",
"}"
] | Display warning type of notification message.
@param message
is the message to displayed as warning. | [
"Display",
"warning",
"type",
"of",
"notification",
"message",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java#L52-L55 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java | UINotification.displayValidationError | public void displayValidationError(final String message) {
final StringBuilder updatedMsg = new StringBuilder(FontAwesome.EXCLAMATION_TRIANGLE.getHtml());
updatedMsg.append(' ');
updatedMsg.append(message);
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_ERROR_M... | java | public void displayValidationError(final String message) {
final StringBuilder updatedMsg = new StringBuilder(FontAwesome.EXCLAMATION_TRIANGLE.getHtml());
updatedMsg.append(' ');
updatedMsg.append(message);
notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_ERROR_M... | [
"public",
"void",
"displayValidationError",
"(",
"final",
"String",
"message",
")",
"{",
"final",
"StringBuilder",
"updatedMsg",
"=",
"new",
"StringBuilder",
"(",
"FontAwesome",
".",
"EXCLAMATION_TRIANGLE",
".",
"getHtml",
"(",
")",
")",
";",
"updatedMsg",
".",
... | Display error type of notification message.
@param message
as message. | [
"Display",
"error",
"type",
"of",
"notification",
"message",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/UINotification.java#L63-L69 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java | CommonDialogWindow.setOrginaleValues | public final void setOrginaleValues() {
for (final AbstractField<?> field : allComponents) {
Object value = field.getValue();
if (field instanceof Table) {
value = ((Table) field).getContainerDataSource().getItemIds();
}
orginalValues.put(field, v... | java | public final void setOrginaleValues() {
for (final AbstractField<?> field : allComponents) {
Object value = field.getValue();
if (field instanceof Table) {
value = ((Table) field).getContainerDataSource().getItemIds();
}
orginalValues.put(field, v... | [
"public",
"final",
"void",
"setOrginaleValues",
"(",
")",
"{",
"for",
"(",
"final",
"AbstractField",
"<",
"?",
">",
"field",
":",
"allComponents",
")",
"{",
"Object",
"value",
"=",
"field",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"field",
"instanceof"... | saves the original values in a Map so we can use them for detecting
changes | [
"saves",
"the",
"original",
"values",
"in",
"a",
"Map",
"so",
"we",
"can",
"use",
"them",
"for",
"detecting",
"changes"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java#L236-L246 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java | CommonDialogWindow.addComponentListeners | public void addComponentListeners() {
// avoid duplicate registration
removeListeners();
for (final AbstractField<?> field : allComponents) {
if (field instanceof TextChangeNotifier) {
((TextChangeNotifier) field).addTextChangeListener(new ChangeListener(field));
... | java | public void addComponentListeners() {
// avoid duplicate registration
removeListeners();
for (final AbstractField<?> field : allComponents) {
if (field instanceof TextChangeNotifier) {
((TextChangeNotifier) field).addTextChangeListener(new ChangeListener(field));
... | [
"public",
"void",
"addComponentListeners",
"(",
")",
"{",
"// avoid duplicate registration",
"removeListeners",
"(",
")",
";",
"for",
"(",
"final",
"AbstractField",
"<",
"?",
">",
"field",
":",
"allComponents",
")",
"{",
"if",
"(",
"field",
"instanceof",
"TextCh... | adds a listener to a component. Depending on the type of component a
valueChange-, textChange- or itemSetChangeListener will be added. | [
"adds",
"a",
"listener",
"to",
"a",
"component",
".",
"Depending",
"on",
"the",
"type",
"of",
"component",
"a",
"valueChange",
"-",
"textChange",
"-",
"or",
"itemSetChangeListener",
"will",
"be",
"added",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java#L267-L281 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java | CommonDialogWindow.updateAllComponents | public void updateAllComponents(final AbstractField<?> component) {
allComponents.add(component);
component.addValueChangeListener(new ChangeListener(component));
} | java | public void updateAllComponents(final AbstractField<?> component) {
allComponents.add(component);
component.addValueChangeListener(new ChangeListener(component));
} | [
"public",
"void",
"updateAllComponents",
"(",
"final",
"AbstractField",
"<",
"?",
">",
"component",
")",
"{",
"allComponents",
".",
"add",
"(",
"component",
")",
";",
"component",
".",
"addValueChangeListener",
"(",
"new",
"ChangeListener",
"(",
"component",
")"... | Adds the component manually to the allComponents-List and adds a
ValueChangeListener to it. Necessary in Update Distribution Type as the
CheckBox concerned is an ItemProperty...
@param component
AbstractField | [
"Adds",
"the",
"component",
"manually",
"to",
"the",
"allComponents",
"-",
"List",
"and",
"adds",
"a",
"ValueChangeListener",
"to",
"it",
".",
"Necessary",
"in",
"Update",
"Distribution",
"Type",
"as",
"the",
"CheckBox",
"concerned",
"is",
"an",
"ItemProperty",
... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java#L531-L535 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/WindowBuilder.java | WindowBuilder.buildCommonDialogWindow | public CommonDialogWindow buildCommonDialogWindow() {
final CommonDialogWindow window = new CommonDialogWindow(caption, content, helpLink, saveDialogCloseListener,
cancelButtonClickListener, layout, i18n);
decorateWindow(window);
return window;
} | java | public CommonDialogWindow buildCommonDialogWindow() {
final CommonDialogWindow window = new CommonDialogWindow(caption, content, helpLink, saveDialogCloseListener,
cancelButtonClickListener, layout, i18n);
decorateWindow(window);
return window;
} | [
"public",
"CommonDialogWindow",
"buildCommonDialogWindow",
"(",
")",
"{",
"final",
"CommonDialogWindow",
"window",
"=",
"new",
"CommonDialogWindow",
"(",
"caption",
",",
"content",
",",
"helpLink",
",",
"saveDialogCloseListener",
",",
"cancelButtonClickListener",
",",
"... | Build the common dialog window.
@return the window. | [
"Build",
"the",
"common",
"dialog",
"window",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/WindowBuilder.java#L146-L152 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/WindowBuilder.java | WindowBuilder.buildWindow | public Window buildWindow() {
final Window window = new Window(caption);
window.setContent(content);
window.setSizeUndefined();
window.setModal(true);
window.setResizable(false);
decorateWindow(window);
if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
... | java | public Window buildWindow() {
final Window window = new Window(caption);
window.setContent(content);
window.setSizeUndefined();
window.setModal(true);
window.setResizable(false);
decorateWindow(window);
if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
... | [
"public",
"Window",
"buildWindow",
"(",
")",
"{",
"final",
"Window",
"window",
"=",
"new",
"Window",
"(",
"caption",
")",
";",
"window",
".",
"setContent",
"(",
"content",
")",
";",
"window",
".",
"setSizeUndefined",
"(",
")",
";",
"window",
".",
"setMod... | Build window based on type.
@return Window | [
"Build",
"window",
"based",
"on",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/WindowBuilder.java#L175-L189 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/NotificationMessage.java | NotificationMessage.showNotification | void showNotification(final String styleName, final String caption, final String description,
final Boolean autoClose) {
decorate(styleName, caption, description, autoClose);
this.show(Page.getCurrent());
} | java | void showNotification(final String styleName, final String caption, final String description,
final Boolean autoClose) {
decorate(styleName, caption, description, autoClose);
this.show(Page.getCurrent());
} | [
"void",
"showNotification",
"(",
"final",
"String",
"styleName",
",",
"final",
"String",
"caption",
",",
"final",
"String",
"description",
",",
"final",
"Boolean",
"autoClose",
")",
"{",
"decorate",
"(",
"styleName",
",",
"caption",
",",
"description",
",",
"a... | Notification message component.
@param styleName
style name of message
@param caption
message caption
@param description
message description
@param autoClose
flag to indicate enable close option | [
"Notification",
"message",
"component",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/NotificationMessage.java#L45-L49 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java | MaintenanceScheduleHelper.getNextMaintenanceWindow | @SuppressWarnings("squid:S1166")
public static Optional<ZonedDateTime> getNextMaintenanceWindow(final String cronSchedule, final String duration,
final String timezone) {
try {
final ExecutionTime scheduleExecutor = ExecutionTime.forCron(getCronFromExpression(cronSchedule));
... | java | @SuppressWarnings("squid:S1166")
public static Optional<ZonedDateTime> getNextMaintenanceWindow(final String cronSchedule, final String duration,
final String timezone) {
try {
final ExecutionTime scheduleExecutor = ExecutionTime.forCron(getCronFromExpression(cronSchedule));
... | [
"@",
"SuppressWarnings",
"(",
"\"squid:S1166\"",
")",
"public",
"static",
"Optional",
"<",
"ZonedDateTime",
">",
"getNextMaintenanceWindow",
"(",
"final",
"String",
"cronSchedule",
",",
"final",
"String",
"duration",
",",
"final",
"String",
"timezone",
")",
"{",
"... | expression or duration is wrong), we simply return empty value | [
"expression",
"or",
"duration",
"is",
"wrong",
")",
"we",
"simply",
"return",
"empty",
"value"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java#L65-L77 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java | MaintenanceScheduleHelper.validateDuration | public static void validateDuration(final String duration) {
try {
if (StringUtils.hasText(duration)) {
convertDurationToLocalTime(duration);
}
} catch (final DateTimeParseException e) {
throw new InvalidMaintenanceScheduleException("Provided duration ... | java | public static void validateDuration(final String duration) {
try {
if (StringUtils.hasText(duration)) {
convertDurationToLocalTime(duration);
}
} catch (final DateTimeParseException e) {
throw new InvalidMaintenanceScheduleException("Provided duration ... | [
"public",
"static",
"void",
"validateDuration",
"(",
"final",
"String",
"duration",
")",
"{",
"try",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"duration",
")",
")",
"{",
"convertDurationToLocalTime",
"(",
"duration",
")",
";",
"}",
"}",
"catch",
... | Validates the format of the maintenance window duration
@param duration
in "HH:mm:ss" string format. This format is popularly used but
can be confused with time of the day, hence conversion to ISO
specified format for time duration is required.
@throws InvalidMaintenanceScheduleException
if the duration doesn't have ... | [
"Validates",
"the",
"format",
"of",
"the",
"maintenance",
"window",
"duration"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java#L178-L186 | train |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java | MaintenanceScheduleHelper.validateCronSchedule | public static void validateCronSchedule(final String cronSchedule) {
try {
if (StringUtils.hasText(cronSchedule)) {
getCronFromExpression(cronSchedule);
}
} catch (final IllegalArgumentException e) {
throw new InvalidMaintenanceScheduleException(e.getM... | java | public static void validateCronSchedule(final String cronSchedule) {
try {
if (StringUtils.hasText(cronSchedule)) {
getCronFromExpression(cronSchedule);
}
} catch (final IllegalArgumentException e) {
throw new InvalidMaintenanceScheduleException(e.getM... | [
"public",
"static",
"void",
"validateCronSchedule",
"(",
"final",
"String",
"cronSchedule",
")",
"{",
"try",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"cronSchedule",
")",
")",
"{",
"getCronFromExpression",
"(",
"cronSchedule",
")",
";",
"}",
"}",
... | Validates the format of the maintenance window cron expression
@param cronSchedule
is a cron expression with 6 mandatory fields and 1 last
optional field: "second minute hour dayofmonth month weekday
year".
@throws InvalidMaintenanceScheduleException
if the cron expression doesn't have a valid quartz format. | [
"Validates",
"the",
"format",
"of",
"the",
"maintenance",
"window",
"cron",
"expression"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java#L199-L207 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryLayout.java | ActionHistoryLayout.populateActionHistoryDetails | public void populateActionHistoryDetails(final Target target) {
if (null != target) {
((ActionHistoryHeader) getHeader()).updateActionHistoryHeader(target.getName());
((ActionHistoryGrid) getGrid()).populateSelectedTarget(target);
} else {
((ActionHistoryHeader) getHe... | java | public void populateActionHistoryDetails(final Target target) {
if (null != target) {
((ActionHistoryHeader) getHeader()).updateActionHistoryHeader(target.getName());
((ActionHistoryGrid) getGrid()).populateSelectedTarget(target);
} else {
((ActionHistoryHeader) getHe... | [
"public",
"void",
"populateActionHistoryDetails",
"(",
"final",
"Target",
"target",
")",
"{",
"if",
"(",
"null",
"!=",
"target",
")",
"{",
"(",
"(",
"ActionHistoryHeader",
")",
"getHeader",
"(",
")",
")",
".",
"updateActionHistoryHeader",
"(",
"target",
".",
... | Populate action header and table for the target.
@param target
the target | [
"Populate",
"action",
"header",
"and",
"table",
"for",
"the",
"target",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/actionhistory/ActionHistoryLayout.java#L140-L147 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/NotificationUnreadButton.java | NotificationUnreadButton.incrementUnreadNotification | public void incrementUnreadNotification(final AbstractNotificationView view,
final EventContainer<?> newEventContainer) {
if (!view.equals(currentView) || newEventContainer.getUnreadNotificationMessageKey() == null) {
return;
}
NotificationUnreadValue notificationUnreadVa... | java | public void incrementUnreadNotification(final AbstractNotificationView view,
final EventContainer<?> newEventContainer) {
if (!view.equals(currentView) || newEventContainer.getUnreadNotificationMessageKey() == null) {
return;
}
NotificationUnreadValue notificationUnreadVa... | [
"public",
"void",
"incrementUnreadNotification",
"(",
"final",
"AbstractNotificationView",
"view",
",",
"final",
"EventContainer",
"<",
"?",
">",
"newEventContainer",
")",
"{",
"if",
"(",
"!",
"view",
".",
"equals",
"(",
"currentView",
")",
"||",
"newEventContaine... | Increment the counter.
@param view
the view
@param newEventContainer
the event container | [
"Increment",
"the",
"counter",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/NotificationUnreadButton.java#L148-L163 | train |
eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionBeanQuery.java | DistributionBeanQuery.loadBeans | @Override
protected List<ProxyDistribution> loadBeans(final int startIndex, final int count) {
Page<DistributionSet> distBeans;
final List<ProxyDistribution> proxyDistributions = new ArrayList<>();
if (startIndex == 0 && firstPageDistributionSets != null) {
distBeans = firstPageD... | java | @Override
protected List<ProxyDistribution> loadBeans(final int startIndex, final int count) {
Page<DistributionSet> distBeans;
final List<ProxyDistribution> proxyDistributions = new ArrayList<>();
if (startIndex == 0 && firstPageDistributionSets != null) {
distBeans = firstPageD... | [
"@",
"Override",
"protected",
"List",
"<",
"ProxyDistribution",
">",
"loadBeans",
"(",
"final",
"int",
"startIndex",
",",
"final",
"int",
"count",
")",
"{",
"Page",
"<",
"DistributionSet",
">",
"distBeans",
";",
"final",
"List",
"<",
"ProxyDistribution",
">",
... | Load all the Distribution set.
@param startIndex
as page start
@param count
as total data | [
"Load",
"all",
"the",
"Distribution",
"set",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionBeanQuery.java#L97-L139 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.