id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
52,300 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java | TargetTagFilterButtons.validate | private Boolean validate(final DragAndDropEvent event) {
final Transferable transferable = event.getTransferable();
final Component compsource = transferable.getSourceComponent();
if (!(compsource instanceof AbstractTable)) {
uiNotification.displayValidationError(getI18n().getMessage... | java | private Boolean validate(final DragAndDropEvent event) {
final Transferable transferable = event.getTransferable();
final Component compsource = transferable.getSourceComponent();
if (!(compsource instanceof AbstractTable)) {
uiNotification.displayValidationError(getI18n().getMessage... | [
"private",
"Boolean",
"validate",
"(",
"final",
"DragAndDropEvent",
"event",
")",
"{",
"final",
"Transferable",
"transferable",
"=",
"event",
".",
"getTransferable",
"(",
")",
";",
"final",
"Component",
"compsource",
"=",
"transferable",
".",
"getSourceComponent",
... | Validate the drop.
@param event
DragAndDropEvent reference
@return Boolean | [
"Validate",
"the",
"drop",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java#L163-L187 |
52,301 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java | TargetTagFilterButtons.hasTargetUpdatePermission | private boolean hasTargetUpdatePermission() {
if (!permChecker.hasUpdateTargetPermission()) {
uiNotification.displayValidationError(
getI18n().getMessage("message.permission.insufficient", SpPermission.UPDATE_TARGET));
return false;
}
return true;
... | java | private boolean hasTargetUpdatePermission() {
if (!permChecker.hasUpdateTargetPermission()) {
uiNotification.displayValidationError(
getI18n().getMessage("message.permission.insufficient", SpPermission.UPDATE_TARGET));
return false;
}
return true;
... | [
"private",
"boolean",
"hasTargetUpdatePermission",
"(",
")",
"{",
"if",
"(",
"!",
"permChecker",
".",
"hasUpdateTargetPermission",
"(",
")",
")",
"{",
"uiNotification",
".",
"displayValidationError",
"(",
"getI18n",
"(",
")",
".",
"getMessage",
"(",
"\"message.per... | validate the update permission.
@return boolean | [
"validate",
"the",
"update",
"permission",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/TargetTagFilterButtons.java#L194-L202 |
52,302 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java | AbstractGrid.refreshContainer | @Override
public void refreshContainer() {
final Indexed container = getContainerDataSource();
if (hasGeneratedPropertySupport()
&& getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
((LazyQueryContainer) getGeneratedPropertySupport().getRawC... | java | @Override
public void refreshContainer() {
final Indexed container = getContainerDataSource();
if (hasGeneratedPropertySupport()
&& getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
((LazyQueryContainer) getGeneratedPropertySupport().getRawC... | [
"@",
"Override",
"public",
"void",
"refreshContainer",
"(",
")",
"{",
"final",
"Indexed",
"container",
"=",
"getContainerDataSource",
"(",
")",
";",
"if",
"(",
"hasGeneratedPropertySupport",
"(",
")",
"&&",
"getGeneratedPropertySupport",
"(",
")",
".",
"getRawCont... | Refresh the container. | [
"Refresh",
"the",
"container",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java#L100-L112 |
52,303 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java | AbstractGrid.resetHeaderDefaultRow | protected HeaderRow resetHeaderDefaultRow() {
getHeader().removeRow(getHeader().getDefaultRow());
final HeaderRow newHeaderRow = getHeader().appendRow();
getHeader().setDefaultRow(newHeaderRow);
return newHeaderRow;
} | java | protected HeaderRow resetHeaderDefaultRow() {
getHeader().removeRow(getHeader().getDefaultRow());
final HeaderRow newHeaderRow = getHeader().appendRow();
getHeader().setDefaultRow(newHeaderRow);
return newHeaderRow;
} | [
"protected",
"HeaderRow",
"resetHeaderDefaultRow",
"(",
")",
"{",
"getHeader",
"(",
")",
".",
"removeRow",
"(",
"getHeader",
"(",
")",
".",
"getDefaultRow",
"(",
")",
")",
";",
"final",
"HeaderRow",
"newHeaderRow",
"=",
"getHeader",
"(",
")",
".",
"appendRow... | Resets the default row of the header. This means the current default row
is removed and replaced with a newly created one.
@return the new and clean header row. | [
"Resets",
"the",
"default",
"row",
"of",
"the",
"header",
".",
"This",
"means",
"the",
"current",
"default",
"row",
"is",
"removed",
"and",
"replaced",
"with",
"a",
"newly",
"created",
"one",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/AbstractGrid.java#L358-L363 |
52,304 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/ShortCutModifierUtils.java | ShortCutModifierUtils.getCtrlOrMetaModifier | public static int getCtrlOrMetaModifier() {
final WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
if (webBrowser.isMacOSX()) {
return ShortcutAction.ModifierKey.META;
}
return ShortcutAction.ModifierKey.CTRL;
} | java | public static int getCtrlOrMetaModifier() {
final WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
if (webBrowser.isMacOSX()) {
return ShortcutAction.ModifierKey.META;
}
return ShortcutAction.ModifierKey.CTRL;
} | [
"public",
"static",
"int",
"getCtrlOrMetaModifier",
"(",
")",
"{",
"final",
"WebBrowser",
"webBrowser",
"=",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getWebBrowser",
"(",
")",
";",
"if",
"(",
"webBrowser",
".",
"isMacOSX",
"(",
")",
")",
"{",
"return",
... | Returns the ctrl or meta modifier depending on the platform.
@return on mac return
{@link com.vaadin.event.ShortcutAction.ModifierKey#META} other
platform return
{@link com.vaadin.event.ShortcutAction.ModifierKey#CTRL} | [
"Returns",
"the",
"ctrl",
"or",
"meta",
"modifier",
"depending",
"on",
"the",
"platform",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/ShortCutModifierUtils.java#L33-L40 |
52,305 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.getPreviewButtonColor | protected void getPreviewButtonColor(final String color) {
Page.getCurrent().getJavaScript().execute(HawkbitCommonUtil.getPreviewButtonColorScript(color));
} | java | protected void getPreviewButtonColor(final String color) {
Page.getCurrent().getJavaScript().execute(HawkbitCommonUtil.getPreviewButtonColorScript(color));
} | [
"protected",
"void",
"getPreviewButtonColor",
"(",
"final",
"String",
"color",
")",
"{",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getJavaScript",
"(",
")",
".",
"execute",
"(",
"HawkbitCommonUtil",
".",
"getPreviewButtonColorScript",
"(",
"color",
")",
")",
... | Dynamic styles for window.
@param top
int value
@param marginLeft
int value | [
"Dynamic",
"styles",
"for",
"window",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L274-L276 |
52,306 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.createDynamicStyleForComponents | protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
final String taregtTagColor) {
tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
getTargetDynamicStyles(taregtTagColor);
tagName... | java | protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
final String taregtTagColor) {
tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
getTargetDynamicStyles(taregtTagColor);
tagName... | [
"protected",
"void",
"createDynamicStyleForComponents",
"(",
"final",
"TextField",
"tagName",
",",
"final",
"TextArea",
"tagDesc",
",",
"final",
"String",
"taregtTagColor",
")",
"{",
"tagName",
".",
"removeStyleName",
"(",
"SPUIDefinitions",
".",
"TAG_NAME",
")",
";... | Set tag name and desc field border color based on chosen color.
@param tagName
@param tagDesc
@param taregtTagColor | [
"Set",
"tag",
"name",
"and",
"desc",
"field",
"border",
"color",
"based",
"on",
"chosen",
"color",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L285-L292 |
52,307 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.restoreComponentStyles | protected void restoreComponentStyles() {
tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
tagName.addStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
getPreviewButtonColor(ColorPickerConstants.D... | java | protected void restoreComponentStyles() {
tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
tagName.addStyleName(SPUIDefinitions.TAG_NAME);
tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
getPreviewButtonColor(ColorPickerConstants.D... | [
"protected",
"void",
"restoreComponentStyles",
"(",
")",
"{",
"tagName",
".",
"removeStyleName",
"(",
"TAG_NAME_DYNAMIC_STYLE",
")",
";",
"tagDesc",
".",
"removeStyleName",
"(",
"TAG_DESC_DYNAMIC_STYLE",
")",
";",
"tagName",
".",
"addStyleName",
"(",
"SPUIDefinitions"... | reset the tag name and tag description component border color. | [
"reset",
"the",
"tag",
"name",
"and",
"tag",
"description",
"component",
"border",
"color",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L297-L303 |
52,308 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.createWindow | public CommonDialogWindow createWindow() {
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getWindowCaption()).content(this)
.cancelButtonClickListener(event -> discard()).layout(mainLayout).i18n(i18n)
.saveDialogCloseListener(new SaveOnDialogCloseListene... | java | public CommonDialogWindow createWindow() {
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getWindowCaption()).content(this)
.cancelButtonClickListener(event -> discard()).layout(mainLayout).i18n(i18n)
.saveDialogCloseListener(new SaveOnDialogCloseListene... | [
"public",
"CommonDialogWindow",
"createWindow",
"(",
")",
"{",
"window",
"=",
"new",
"WindowBuilder",
"(",
"SPUIDefinitions",
".",
"CREATE_UPDATE_WINDOW",
")",
".",
"caption",
"(",
"getWindowCaption",
"(",
")",
")",
".",
"content",
"(",
"this",
")",
".",
"canc... | Creates the window to create or update a tag or type
@return the created window | [
"Creates",
"the",
"window",
"to",
"create",
"or",
"update",
"a",
"tag",
"or",
"type"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L362-L367 |
52,309 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.previewButtonClicked | private void previewButtonClicked() {
if (!tagPreviewBtnClicked) {
colorPickerLayout
.setSelectedColor(ColorPickerHelper.rgbToColorConverter(ColorPickerConstants.DEFAULT_COLOR));
}
tagPreviewBtnClicked = !tagPreviewBtnClicked;
colorPickerLayout.setVisible... | java | private void previewButtonClicked() {
if (!tagPreviewBtnClicked) {
colorPickerLayout
.setSelectedColor(ColorPickerHelper.rgbToColorConverter(ColorPickerConstants.DEFAULT_COLOR));
}
tagPreviewBtnClicked = !tagPreviewBtnClicked;
colorPickerLayout.setVisible... | [
"private",
"void",
"previewButtonClicked",
"(",
")",
"{",
"if",
"(",
"!",
"tagPreviewBtnClicked",
")",
"{",
"colorPickerLayout",
".",
"setSelectedColor",
"(",
"ColorPickerHelper",
".",
"rgbToColorConverter",
"(",
"ColorPickerConstants",
".",
"DEFAULT_COLOR",
")",
")",... | Open color picker on click of preview button. Auto select the color based
on target tag if already selected. | [
"Open",
"color",
"picker",
"on",
"click",
"of",
"preview",
"button",
".",
"Auto",
"select",
"the",
"color",
"based",
"on",
"target",
"tag",
"if",
"already",
"selected",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L491-L499 |
52,310 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.getTargetDynamicStyles | private static void getTargetDynamicStyles(final String colorPickedPreview) {
Page.getCurrent().getJavaScript()
.execute(HawkbitCommonUtil.changeToNewSelectedPreviewColor(colorPickedPreview));
} | java | private static void getTargetDynamicStyles(final String colorPickedPreview) {
Page.getCurrent().getJavaScript()
.execute(HawkbitCommonUtil.changeToNewSelectedPreviewColor(colorPickedPreview));
} | [
"private",
"static",
"void",
"getTargetDynamicStyles",
"(",
"final",
"String",
"colorPickedPreview",
")",
"{",
"Page",
".",
"getCurrent",
"(",
")",
".",
"getJavaScript",
"(",
")",
".",
"execute",
"(",
"HawkbitCommonUtil",
".",
"changeToNewSelectedPreviewColor",
"(",... | Get target style - Dynamically as per the color picked, cannot be done
from the static css.
@param colorPickedPreview | [
"Get",
"target",
"style",
"-",
"Dynamically",
"as",
"per",
"the",
"color",
"picked",
"cannot",
"be",
"done",
"from",
"the",
"static",
"css",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L507-L510 |
52,311 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java | AbstractTagLayout.slidersValueChangeListeners | private void slidersValueChangeListeners() {
colorPickerLayout.getRedSlider().addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(final ValueChangeEvent event) {
final double re... | java | private void slidersValueChangeListeners() {
colorPickerLayout.getRedSlider().addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(final ValueChangeEvent event) {
final double re... | [
"private",
"void",
"slidersValueChangeListeners",
"(",
")",
"{",
"colorPickerLayout",
".",
"getRedSlider",
"(",
")",
".",
"addValueChangeListener",
"(",
"new",
"ValueChangeListener",
"(",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",... | Value change listeners implementations of sliders. | [
"Value",
"change",
"listeners",
"implementations",
"of",
"sliders",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractTagLayout.java#L515-L549 |
52,312 | eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleSpServerRtExceptions | @ExceptionHandler(AbstractServerRtException.class)
public ResponseEntity<ExceptionInfo> handleSpServerRtExceptions(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(ex);
final HttpStatus responseSta... | java | @ExceptionHandler(AbstractServerRtException.class)
public ResponseEntity<ExceptionInfo> handleSpServerRtExceptions(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(ex);
final HttpStatus responseSta... | [
"@",
"ExceptionHandler",
"(",
"AbstractServerRtException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleSpServerRtExceptions",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Exception",
"ex",
")",
"{",
"logRequest",
"... | method for handling exception of type AbstractServerRtException. Called
by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing the exception information
as entity. | [
"method",
"for",
"handling",
"exception",
"of",
"type",
"AbstractServerRtException",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework",
"for",
"exception",
"handling",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L99-L111 |
52,313 | eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleHttpMessageNotReadableException | @ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ExceptionInfo> handleHttpMessageNotReadableException(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(new MessageNotReadableEx... | java | @ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ExceptionInfo> handleHttpMessageNotReadableException(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(new MessageNotReadableEx... | [
"@",
"ExceptionHandler",
"(",
"HttpMessageNotReadableException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleHttpMessageNotReadableException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Exception",
"ex",
")",
"{",
... | Method for handling exception of type HttpMessageNotReadableException
which is thrown in case the request body is not well formed and cannot be
deserialized. Called by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded ... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"HttpMessageNotReadableException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"body",
"is",
"not",
"well",
"formed",
"and",
"cannot",
"be",
"deserialized",
".",
"Called",
"by",
"the",
"Spring"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L125-L131 |
52,314 | eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleConstraintViolationException | @ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request,
final ConstraintViolationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
r... | java | @ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request,
final ConstraintViolationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
r... | [
"@",
"ExceptionHandler",
"(",
"ConstraintViolationException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleConstraintViolationException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"ConstraintViolationException",
"ex",
"... | Method for handling exception of type ConstraintViolationException which
is thrown in case the request is rejected due to a constraint violation.
Called by the Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing t... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"ConstraintViolationException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"is",
"rejected",
"due",
"to",
"a",
"constraint",
"violation",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework"... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L145-L158 |
52,315 | eclipse/hawkbit | hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java | ResponseExceptionHandler.handleValidationException | @ExceptionHandler(ValidationException.class)
public ResponseEntity<ExceptionInfo> handleValidationException(final HttpServletRequest request,
final ValidationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
response.setMessage(ex.getMe... | java | @ExceptionHandler(ValidationException.class)
public ResponseEntity<ExceptionInfo> handleValidationException(final HttpServletRequest request,
final ValidationException ex) {
logRequest(request, ex);
final ExceptionInfo response = new ExceptionInfo();
response.setMessage(ex.getMe... | [
"@",
"ExceptionHandler",
"(",
"ValidationException",
".",
"class",
")",
"public",
"ResponseEntity",
"<",
"ExceptionInfo",
">",
"handleValidationException",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"ValidationException",
"ex",
")",
"{",
"logRequest",
... | Method for handling exception of type ValidationException which is thrown
in case the request is rejected due to invalid requests. Called by the
Spring-Framework for exception handling.
@param request
the Http request
@param ex
the exception which occurred
@return the entity to be responded containing the exception in... | [
"Method",
"for",
"handling",
"exception",
"of",
"type",
"ValidationException",
"which",
"is",
"thrown",
"in",
"case",
"the",
"request",
"is",
"rejected",
"due",
"to",
"invalid",
"requests",
".",
"Called",
"by",
"the",
"Spring",
"-",
"Framework",
"for",
"except... | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java#L172-L183 |
52,316 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/AbstractTableDetailsLayout.java | AbstractTableDetailsLayout.onBaseEntityEvent | protected void onBaseEntityEvent(final BaseUIEntityEvent<T> baseEntityEvent) {
final BaseEntityEventType eventType = baseEntityEvent.getEventType();
if (BaseEntityEventType.SELECTED_ENTITY == eventType || BaseEntityEventType.UPDATED_ENTITY == eventType
|| BaseEntityEventType.REMOVE_ENTIT... | java | protected void onBaseEntityEvent(final BaseUIEntityEvent<T> baseEntityEvent) {
final BaseEntityEventType eventType = baseEntityEvent.getEventType();
if (BaseEntityEventType.SELECTED_ENTITY == eventType || BaseEntityEventType.UPDATED_ENTITY == eventType
|| BaseEntityEventType.REMOVE_ENTIT... | [
"protected",
"void",
"onBaseEntityEvent",
"(",
"final",
"BaseUIEntityEvent",
"<",
"T",
">",
"baseEntityEvent",
")",
"{",
"final",
"BaseEntityEventType",
"eventType",
"=",
"baseEntityEvent",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"BaseEntityEventType",
".",
... | Default implementation to handle an entity event.
@param baseEntityEvent
the event | [
"Default",
"implementation",
"to",
"handle",
"an",
"entity",
"event",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/AbstractTableDetailsLayout.java#L129-L139 |
52,317 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.dmfReceiverQueue | @Bean
public Queue dmfReceiverQueue() {
return new Queue(amqpProperties.getReceiverQueue(), true, false, false,
amqpDeadletterProperties.getDeadLetterExchangeArgs(amqpProperties.getDeadLetterExchange()));
} | java | @Bean
public Queue dmfReceiverQueue() {
return new Queue(amqpProperties.getReceiverQueue(), true, false, false,
amqpDeadletterProperties.getDeadLetterExchangeArgs(amqpProperties.getDeadLetterExchange()));
} | [
"@",
"Bean",
"public",
"Queue",
"dmfReceiverQueue",
"(",
")",
"{",
"return",
"new",
"Queue",
"(",
"amqpProperties",
".",
"getReceiverQueue",
"(",
")",
",",
"true",
",",
"false",
",",
"false",
",",
"amqpDeadletterProperties",
".",
"getDeadLetterExchangeArgs",
"("... | Create the DMF API receiver queue for retrieving DMF messages.
@return the receiver queue | [
"Create",
"the",
"DMF",
"API",
"receiver",
"queue",
"for",
"retrieving",
"DMF",
"messages",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L135-L139 |
52,318 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.authenticationReceiverQueue | @Bean
public Queue authenticationReceiverQueue() {
return QueueBuilder.nonDurable(amqpProperties.getAuthenticationReceiverQueue()).autoDelete()
.withArguments(getTTLMaxArgsAuthenticationQueue()).build();
} | java | @Bean
public Queue authenticationReceiverQueue() {
return QueueBuilder.nonDurable(amqpProperties.getAuthenticationReceiverQueue()).autoDelete()
.withArguments(getTTLMaxArgsAuthenticationQueue()).build();
} | [
"@",
"Bean",
"public",
"Queue",
"authenticationReceiverQueue",
"(",
")",
"{",
"return",
"QueueBuilder",
".",
"nonDurable",
"(",
"amqpProperties",
".",
"getAuthenticationReceiverQueue",
"(",
")",
")",
".",
"autoDelete",
"(",
")",
".",
"withArguments",
"(",
"getTTLM... | Create the DMF API receiver queue for authentication requests called by
3rd party artifact storages for download authorization by devices.
@return the receiver queue | [
"Create",
"the",
"DMF",
"API",
"receiver",
"queue",
"for",
"authentication",
"requests",
"called",
"by",
"3rd",
"party",
"artifact",
"storages",
"for",
"download",
"authorization",
"by",
"devices",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L147-L151 |
52,319 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.amqpMessageHandlerService | @Bean
public AmqpMessageHandlerService amqpMessageHandlerService(final RabbitTemplate rabbitTemplate,
final AmqpMessageDispatcherService amqpMessageDispatcherService,
final ControllerManagement controllerManagement, final EntityFactory entityFactory) {
return new AmqpMessageHandlerSe... | java | @Bean
public AmqpMessageHandlerService amqpMessageHandlerService(final RabbitTemplate rabbitTemplate,
final AmqpMessageDispatcherService amqpMessageDispatcherService,
final ControllerManagement controllerManagement, final EntityFactory entityFactory) {
return new AmqpMessageHandlerSe... | [
"@",
"Bean",
"public",
"AmqpMessageHandlerService",
"amqpMessageHandlerService",
"(",
"final",
"RabbitTemplate",
"rabbitTemplate",
",",
"final",
"AmqpMessageDispatcherService",
"amqpMessageDispatcherService",
",",
"final",
"ControllerManagement",
"controllerManagement",
",",
"fin... | Create AMQP handler service bean.
@param rabbitTemplate
for converting messages
@param amqpMessageDispatcherService
to sending events to DMF client
@param controllerManagement
for target repo access
@param entityFactory
to create entities
@return handler service bean | [
"Create",
"AMQP",
"handler",
"service",
"bean",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L240-L246 |
52,320 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.listenerContainerFactory | @Bean
@ConditionalOnMissingBean(name = "listenerContainerFactory")
public RabbitListenerContainerFactory<SimpleMessageListenerContainer> listenerContainerFactory(
final SimpleRabbitListenerContainerFactoryConfigurer configurer, final ErrorHandler errorHandler) {
final ConfigurableRabbitListe... | java | @Bean
@ConditionalOnMissingBean(name = "listenerContainerFactory")
public RabbitListenerContainerFactory<SimpleMessageListenerContainer> listenerContainerFactory(
final SimpleRabbitListenerContainerFactoryConfigurer configurer, final ErrorHandler errorHandler) {
final ConfigurableRabbitListe... | [
"@",
"Bean",
"@",
"ConditionalOnMissingBean",
"(",
"name",
"=",
"\"listenerContainerFactory\"",
")",
"public",
"RabbitListenerContainerFactory",
"<",
"SimpleMessageListenerContainer",
">",
"listenerContainerFactory",
"(",
"final",
"SimpleRabbitListenerContainerFactoryConfigurer",
... | Create RabbitListenerContainerFactory bean if no listenerContainerFactory
bean found
@return RabbitListenerContainerFactory bean | [
"Create",
"RabbitListenerContainerFactory",
"bean",
"if",
"no",
"listenerContainerFactory",
"bean",
"found"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L279-L287 |
52,321 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java | AmqpConfiguration.amqpControllerAuthentication | @Bean
@ConditionalOnMissingBean(AmqpControllerAuthentication.class)
public AmqpControllerAuthentication amqpControllerAuthentication(final SystemManagement systemManagement,
final ControllerManagement controllerManagement,
final TenantConfigurationManagement tenantConfigurationManagement... | java | @Bean
@ConditionalOnMissingBean(AmqpControllerAuthentication.class)
public AmqpControllerAuthentication amqpControllerAuthentication(final SystemManagement systemManagement,
final ControllerManagement controllerManagement,
final TenantConfigurationManagement tenantConfigurationManagement... | [
"@",
"Bean",
"@",
"ConditionalOnMissingBean",
"(",
"AmqpControllerAuthentication",
".",
"class",
")",
"public",
"AmqpControllerAuthentication",
"amqpControllerAuthentication",
"(",
"final",
"SystemManagement",
"systemManagement",
",",
"final",
"ControllerManagement",
"controlle... | create the authentication bean for controller over amqp.
@param systemManagement
the systemManagement
@param controllerManagement
the controllerManagement
@param tenantConfigurationManagement
the tenantConfigurationManagement
@param tenantAware
the tenantAware
@param ddiSecruityProperties
the ddiSecruityProperties
@pa... | [
"create",
"the",
"authentication",
"bean",
"for",
"controller",
"over",
"amqp",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpConfiguration.java#L306-L314 |
52,322 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/AbstractNotificationView.java | AbstractNotificationView.refreshView | public void refreshView(final Set<Class<?>> eventContainers) {
eventContainers.stream().filter(this::supportNotificationEventContainer).forEach(this::refreshContainer);
clear();
} | java | public void refreshView(final Set<Class<?>> eventContainers) {
eventContainers.stream().filter(this::supportNotificationEventContainer).forEach(this::refreshContainer);
clear();
} | [
"public",
"void",
"refreshView",
"(",
"final",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"eventContainers",
")",
"{",
"eventContainers",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"this",
"::",
"supportNotificationEventContainer",
")",
".",
"forEach",
"(",
... | Refresh the view by event container changes.
@param eventContainers
event container which container changed | [
"Refresh",
"the",
"view",
"by",
"event",
"container",
"changes",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/AbstractNotificationView.java#L122-L125 |
52,323 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/TextFieldBuilder.java | TextFieldBuilder.createSearchField | public TextField createSearchField(final TextChangeListener textChangeListener) {
final TextField textField = style("filter-box").styleName("text-style filter-box-hide").buildTextComponent();
textField.setWidth(100.0F, Unit.PERCENTAGE);
textField.addTextChangeListener(textChangeListener);
... | java | public TextField createSearchField(final TextChangeListener textChangeListener) {
final TextField textField = style("filter-box").styleName("text-style filter-box-hide").buildTextComponent();
textField.setWidth(100.0F, Unit.PERCENTAGE);
textField.addTextChangeListener(textChangeListener);
... | [
"public",
"TextField",
"createSearchField",
"(",
"final",
"TextChangeListener",
"textChangeListener",
")",
"{",
"final",
"TextField",
"textField",
"=",
"style",
"(",
"\"filter-box\"",
")",
".",
"styleName",
"(",
"\"text-style filter-box-hide\"",
")",
".",
"buildTextComp... | Create a search text field.
@param textChangeListener
listener when text is changed.
@return the textfield | [
"Create",
"a",
"search",
"text",
"field",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/builder/TextFieldBuilder.java#L41-L49 |
52,324 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java | DistributionSetSelectWindow.showForTargetFilter | public void showForTargetFilter(final Long tfqId) {
this.tfqId = tfqId;
final TargetFilterQuery tfq = targetFilterQueryManagement.get(tfqId)
.orElseThrow(() -> new EntityNotFoundException(TargetFilterQuery.class, tfqId));
final VerticalLayout verticalLayout = initView();
... | java | public void showForTargetFilter(final Long tfqId) {
this.tfqId = tfqId;
final TargetFilterQuery tfq = targetFilterQueryManagement.get(tfqId)
.orElseThrow(() -> new EntityNotFoundException(TargetFilterQuery.class, tfqId));
final VerticalLayout verticalLayout = initView();
... | [
"public",
"void",
"showForTargetFilter",
"(",
"final",
"Long",
"tfqId",
")",
"{",
"this",
".",
"tfqId",
"=",
"tfqId",
";",
"final",
"TargetFilterQuery",
"tfq",
"=",
"targetFilterQueryManagement",
".",
"get",
"(",
"tfqId",
")",
".",
"orElseThrow",
"(",
"(",
"... | Shows a distribution set select window for the given target filter query
@param tfqId
target filter query id | [
"Shows",
"a",
"distribution",
"set",
"select",
"window",
"for",
"the",
"given",
"target",
"filter",
"query"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java#L100-L121 |
52,325 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java | DistributionSetSelectWindow.saveOrUpdate | @Override
public void saveOrUpdate() {
if (checkBox.getValue() && dsCombo.getValue() != null) {
final ActionType autoAssignActionType = ((ActionTypeOption) actionTypeOptionGroupLayout
.getActionTypeOptionGroup().getValue()).getActionType();
updateTargetFilterQuery... | java | @Override
public void saveOrUpdate() {
if (checkBox.getValue() && dsCombo.getValue() != null) {
final ActionType autoAssignActionType = ((ActionTypeOption) actionTypeOptionGroupLayout
.getActionTypeOptionGroup().getValue()).getActionType();
updateTargetFilterQuery... | [
"@",
"Override",
"public",
"void",
"saveOrUpdate",
"(",
")",
"{",
"if",
"(",
"checkBox",
".",
"getValue",
"(",
")",
"&&",
"dsCombo",
".",
"getValue",
"(",
")",
"!=",
"null",
")",
"{",
"final",
"ActionType",
"autoAssignActionType",
"=",
"(",
"(",
"ActionT... | Is called when the new value should be saved after the save button has
been clicked | [
"Is",
"called",
"when",
"the",
"new",
"value",
"should",
"be",
"saved",
"after",
"the",
"save",
"button",
"has",
"been",
"clicked"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/DistributionSetSelectWindow.java#L181-L190 |
52,326 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/ManagementViewClientCriterion.java | ManagementViewClientCriterion.createViewComponentClientCriteria | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[4];
// Target table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilder()
... | java | static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[4];
// Target table acceptable components.
criteria[0] = ServerViewComponentClientCriterion.createBuilder()
... | [
"static",
"ServerViewComponentClientCriterion",
"[",
"]",
"createViewComponentClientCriteria",
"(",
")",
"{",
"final",
"ServerViewComponentClientCriterion",
"[",
"]",
"criteria",
"=",
"new",
"ServerViewComponentClientCriterion",
"[",
"4",
"]",
";",
"// Target table acceptable... | Configures the elements of the composite accept criterion for the
Management View.
@return accept criterion elements | [
"Configures",
"the",
"elements",
"of",
"the",
"composite",
"accept",
"criterion",
"for",
"the",
"Management",
"View",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/dd/criteria/ManagementViewClientCriterion.java#L49-L78 |
52,327 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.trimAndNullIfEmpty | public static String trimAndNullIfEmpty(final String text) {
if (text != null && !text.trim().isEmpty()) {
return text.trim();
}
return null;
} | java | public static String trimAndNullIfEmpty(final String text) {
if (text != null && !text.trim().isEmpty()) {
return text.trim();
}
return null;
} | [
"public",
"static",
"String",
"trimAndNullIfEmpty",
"(",
"final",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
"&&",
"!",
"text",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"text",
".",
"trim",
"(",
")",
";... | Trims the text and converts into null in case of an empty string.
@param text
text to be trimmed
@return null if the text is null or if the text is blank, text.trim() if
the text is not empty. | [
"Trims",
"the",
"text",
"and",
"converts",
"into",
"null",
"in",
"case",
"of",
"an",
"empty",
"string",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L90-L95 |
52,328 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.concatStrings | public static String concatStrings(final String delimiter, final String... texts) {
final String delim = delimiter == null ? "" : delimiter;
final StringBuilder conCatStrBldr = new StringBuilder();
if (null != texts) {
for (final String text : texts) {
conCatStrBldr.a... | java | public static String concatStrings(final String delimiter, final String... texts) {
final String delim = delimiter == null ? "" : delimiter;
final StringBuilder conCatStrBldr = new StringBuilder();
if (null != texts) {
for (final String text : texts) {
conCatStrBldr.a... | [
"public",
"static",
"String",
"concatStrings",
"(",
"final",
"String",
"delimiter",
",",
"final",
"String",
"...",
"texts",
")",
"{",
"final",
"String",
"delim",
"=",
"delimiter",
"==",
"null",
"?",
"\"\"",
":",
"delimiter",
";",
"final",
"StringBuilder",
"c... | Concatenate the given text all the string arguments with the given
delimiter.
@param delimiter
the delimiter text to be used while concatenation.
@param texts
all these string values will be concatenated with the given
delimiter.
@return null in case no text arguments to be compared. just concatenation
of all texts ar... | [
"Concatenate",
"the",
"given",
"text",
"all",
"the",
"string",
"arguments",
"with",
"the",
"given",
"delimiter",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L111-L122 |
52,329 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getSoftwareModuleName | public static String getSoftwareModuleName(final String caption, final String name) {
return new StringBuilder()
.append(DIV_DESCRIPTION_START + caption + " : " + getBoldHTMLText(getFormattedName(name)))
.append(DIV_DESCRIPTION_END).toString();
} | java | public static String getSoftwareModuleName(final String caption, final String name) {
return new StringBuilder()
.append(DIV_DESCRIPTION_START + caption + " : " + getBoldHTMLText(getFormattedName(name)))
.append(DIV_DESCRIPTION_END).toString();
} | [
"public",
"static",
"String",
"getSoftwareModuleName",
"(",
"final",
"String",
"caption",
",",
"final",
"String",
"name",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"DIV_DESCRIPTION_START",
"+",
"caption",
"+",
"\" : \"",
"+",
"g... | Get Label for Artifact Details.
@param caption
as caption of the details
@param name
as name
@return SoftwareModuleName | [
"Get",
"Label",
"for",
"Artifact",
"Details",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L152-L156 |
52,330 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getPollStatusToolTip | public static String getPollStatusToolTip(final PollStatus pollStatus, final VaadinMessageSource i18N) {
if (pollStatus != null && pollStatus.getLastPollDate() != null && pollStatus.isOverdue()) {
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
return i18N.getMessage(UIMessageId... | java | public static String getPollStatusToolTip(final PollStatus pollStatus, final VaadinMessageSource i18N) {
if (pollStatus != null && pollStatus.getLastPollDate() != null && pollStatus.isOverdue()) {
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
return i18N.getMessage(UIMessageId... | [
"public",
"static",
"String",
"getPollStatusToolTip",
"(",
"final",
"PollStatus",
"pollStatus",
",",
"final",
"VaadinMessageSource",
"i18N",
")",
"{",
"if",
"(",
"pollStatus",
"!=",
"null",
"&&",
"pollStatus",
".",
"getLastPollDate",
"(",
")",
"!=",
"null",
"&&"... | Get tool tip for Poll status.
@param pollStatus
@param i18N
@return PollStatusToolTip | [
"Get",
"tool",
"tip",
"for",
"Poll",
"status",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L165-L174 |
52,331 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getFormattedName | public static String getFormattedName(final String orgText) {
return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText;
} | java | public static String getFormattedName(final String orgText) {
return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText;
} | [
"public",
"static",
"String",
"getFormattedName",
"(",
"final",
"String",
"orgText",
")",
"{",
"return",
"trimAndNullIfEmpty",
"(",
"orgText",
")",
"==",
"null",
"?",
"SPUIDefinitions",
".",
"SPACE",
":",
"orgText",
";",
"}"
] | Null check for text.
@param orgText
text to be formatted
@return String formatted text | [
"Null",
"check",
"for",
"text",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L183-L185 |
52,332 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getArtifactUploadPopupWidth | public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) {
final float extraWidth = findRequiredSwModuleExtraWidth(newBrowserWidth);
if (extraWidth + minPopupWidth > SPUIDefinitions.MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH) {
return SPUIDefinitions.MAX... | java | public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) {
final float extraWidth = findRequiredSwModuleExtraWidth(newBrowserWidth);
if (extraWidth + minPopupWidth > SPUIDefinitions.MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH) {
return SPUIDefinitions.MAX... | [
"public",
"static",
"float",
"getArtifactUploadPopupWidth",
"(",
"final",
"float",
"newBrowserWidth",
",",
"final",
"int",
"minPopupWidth",
")",
"{",
"final",
"float",
"extraWidth",
"=",
"findRequiredSwModuleExtraWidth",
"(",
"newBrowserWidth",
")",
";",
"if",
"(",
... | Get artifact upload pop up width.
@param newBrowserWidth
new browser width
@param minPopupWidth
minimum popup width
@return float new pop up width | [
"Get",
"artifact",
"upload",
"pop",
"up",
"width",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L202-L208 |
52,333 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.removePrefix | public static String removePrefix(final String text, final String prefix) {
if (text != null) {
return text.replaceFirst(prefix, "");
}
return null;
} | java | public static String removePrefix(final String text, final String prefix) {
if (text != null) {
return text.replaceFirst(prefix, "");
}
return null;
} | [
"public",
"static",
"String",
"removePrefix",
"(",
"final",
"String",
"text",
",",
"final",
"String",
"prefix",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"return",
"text",
".",
"replaceFirst",
"(",
"prefix",
",",
"\"\"",
")",
";",
"}",
"retu... | Remove the prefix from text.
@param text
name
@param prefix
text to be removed
@return String name | [
"Remove",
"the",
"prefix",
"from",
"text",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L234-L239 |
52,334 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getFormatedLabel | public static Label getFormatedLabel(final String labelContent) {
final Label labelValue = new Label(labelContent, ContentMode.HTML);
labelValue.setSizeFull();
labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE);
labelValue.addStyleName("label-style");
return labelValue;
} | java | public static Label getFormatedLabel(final String labelContent) {
final Label labelValue = new Label(labelContent, ContentMode.HTML);
labelValue.setSizeFull();
labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE);
labelValue.addStyleName("label-style");
return labelValue;
} | [
"public",
"static",
"Label",
"getFormatedLabel",
"(",
"final",
"String",
"labelContent",
")",
"{",
"final",
"Label",
"labelValue",
"=",
"new",
"Label",
"(",
"labelContent",
",",
"ContentMode",
".",
"HTML",
")",
";",
"labelValue",
".",
"setSizeFull",
"(",
")",
... | Get formatted label.Appends ellipses if content does not fit the label.
@param labelContent
content
@return Label | [
"Get",
"formatted",
"label",
".",
"Appends",
"ellipses",
"if",
"content",
"does",
"not",
"fit",
"the",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L248-L254 |
52,335 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createAssignmentMessage | public static String createAssignmentMessage(final String tagName,
final AssignmentResult<? extends NamedEntity> result, final VaadinMessageSource i18n) {
final StringBuilder formMsg = new StringBuilder();
final int assignedCount = result.getAssigned();
final int alreadyAssignedCount... | java | public static String createAssignmentMessage(final String tagName,
final AssignmentResult<? extends NamedEntity> result, final VaadinMessageSource i18n) {
final StringBuilder formMsg = new StringBuilder();
final int assignedCount = result.getAssigned();
final int alreadyAssignedCount... | [
"public",
"static",
"String",
"createAssignmentMessage",
"(",
"final",
"String",
"tagName",
",",
"final",
"AssignmentResult",
"<",
"?",
"extends",
"NamedEntity",
">",
"result",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"final",
"StringBuilder",
"formMsg... | Display Target Tag action message.
@param tagName
as tag name
@param result
as TargetTagAssigmentResult
@param i18n
I18N
@return message | [
"Display",
"Target",
"Tag",
"action",
"message",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L296-L320 |
52,336 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createLazyQueryContainer | public static LazyQueryContainer createLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, SPUILabelDefinitions.VAR_NAME), queryF... | java | public static LazyQueryContainer createLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, SPUILabelDefinitions.VAR_NAME), queryF... | [
"public",
"static",
"LazyQueryContainer",
"createLazyQueryContainer",
"(",
"final",
"BeanQueryFactory",
"<",
"?",
"extends",
"AbstractBeanQuery",
"<",
"?",
">",
">",
"queryFactory",
")",
"{",
"queryFactory",
".",
"setQueryConfiguration",
"(",
"Collections",
".",
"empt... | Create a lazy query container for the given query bean factory with empty
configurations.
@param queryFactory
is reference of {@link BeanQueryFactory<? extends
AbstractBeanQuery>} on which lazy container should create.
@return instance of {@link LazyQueryContainer}. | [
"Create",
"a",
"lazy",
"query",
"container",
"for",
"the",
"given",
"query",
"bean",
"factory",
"with",
"empty",
"configurations",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L331-L335 |
52,337 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.createDSLazyQueryContainer | public static LazyQueryContainer createDSLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory);
} | java | public static LazyQueryContainer createDSLazyQueryContainer(
final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) {
queryFactory.setQueryConfiguration(Collections.emptyMap());
return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory);
} | [
"public",
"static",
"LazyQueryContainer",
"createDSLazyQueryContainer",
"(",
"final",
"BeanQueryFactory",
"<",
"?",
"extends",
"AbstractBeanQuery",
"<",
"?",
">",
">",
"queryFactory",
")",
"{",
"queryFactory",
".",
"setQueryConfiguration",
"(",
"Collections",
".",
"em... | Create lazy query container for DS type.
@param queryFactory
@return LazyQueryContainer | [
"Create",
"lazy",
"query",
"container",
"for",
"DS",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L343-L347 |
52,338 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getDsTableColumnProperties | public static void getDsTableColumnProperties(final Container container) {
final LazyQueryContainer lqc = (LazyQueryContainer) container;
lqc.addContainerProperty(SPUILabelDefinitions.VAR_ID, Long.class, null, false, false);
lqc.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, "... | java | public static void getDsTableColumnProperties(final Container container) {
final LazyQueryContainer lqc = (LazyQueryContainer) container;
lqc.addContainerProperty(SPUILabelDefinitions.VAR_ID, Long.class, null, false, false);
lqc.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, "... | [
"public",
"static",
"void",
"getDsTableColumnProperties",
"(",
"final",
"Container",
"container",
")",
"{",
"final",
"LazyQueryContainer",
"lqc",
"=",
"(",
"LazyQueryContainer",
")",
"container",
";",
"lqc",
".",
"addContainerProperty",
"(",
"SPUILabelDefinitions",
".... | Set distribution table column properties.
@param container
table container | [
"Set",
"distribution",
"table",
"column",
"properties",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L355-L365 |
52,339 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getScriptSMHighlightWithColor | public static String getScriptSMHighlightWithColor(final String colorCSS) {
return new StringBuilder().append(SM_HIGHLIGHT_SCRIPT_CURRENT)
.append("smHighlightStyle = smHighlightStyle + \"").append(colorCSS).append("\";")
.append(SM_HIGHLIGHT_SCRIPT_APPEND).toString();
} | java | public static String getScriptSMHighlightWithColor(final String colorCSS) {
return new StringBuilder().append(SM_HIGHLIGHT_SCRIPT_CURRENT)
.append("smHighlightStyle = smHighlightStyle + \"").append(colorCSS).append("\";")
.append(SM_HIGHLIGHT_SCRIPT_APPEND).toString();
} | [
"public",
"static",
"String",
"getScriptSMHighlightWithColor",
"(",
"final",
"String",
"colorCSS",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"SM_HIGHLIGHT_SCRIPT_CURRENT",
")",
".",
"append",
"(",
"\"smHighlightStyle = smHighlightStyle + ... | Highlight software module rows with the color of sw-type.
@param colorCSS
color to generate the css script.
@return javascript to append software module table rows with highlighted
color. | [
"Highlight",
"software",
"module",
"rows",
"with",
"the",
"color",
"of",
"sw",
"-",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L384-L388 |
52,340 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.changeToNewSelectedPreviewColor | public static String changeToNewSelectedPreviewColor(final String colorPickedPreview) {
return new StringBuilder().append(NEW_PREVIEW_COLOR_REMOVE_SCRIPT).append(NEW_PREVIEW_COLOR_CREATE_SCRIPT)
.append("var newColorPreviewStyle = \".v-app .new-tag-name{ border: solid 3px ")
.app... | java | public static String changeToNewSelectedPreviewColor(final String colorPickedPreview) {
return new StringBuilder().append(NEW_PREVIEW_COLOR_REMOVE_SCRIPT).append(NEW_PREVIEW_COLOR_CREATE_SCRIPT)
.append("var newColorPreviewStyle = \".v-app .new-tag-name{ border: solid 3px ")
.app... | [
"public",
"static",
"String",
"changeToNewSelectedPreviewColor",
"(",
"final",
"String",
"colorPickedPreview",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"NEW_PREVIEW_COLOR_REMOVE_SCRIPT",
")",
".",
"append",
"(",
"NEW_PREVIEW_COLOR_CREATE... | Get javascript to reflect new color selection in color picker preview for
name and description fields .
@param colorPickedPreview
changed color
@return javascript for the selected color. | [
"Get",
"javascript",
"to",
"reflect",
"new",
"color",
"selection",
"in",
"color",
"picker",
"preview",
"for",
"name",
"and",
"description",
"fields",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L398-L407 |
52,341 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getPreviewButtonColorScript | public static String getPreviewButtonColorScript(final String color) {
return new StringBuilder().append(PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT).append(PREVIEW_BUTTON_COLOR_CREATE_SCRIPT)
.append("var tagColorPreviewStyle = \".v-app .tag-color-preview{ height: 15px !important; padding: 0 10px !impor... | java | public static String getPreviewButtonColorScript(final String color) {
return new StringBuilder().append(PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT).append(PREVIEW_BUTTON_COLOR_CREATE_SCRIPT)
.append("var tagColorPreviewStyle = \".v-app .tag-color-preview{ height: 15px !important; padding: 0 10px !impor... | [
"public",
"static",
"String",
"getPreviewButtonColorScript",
"(",
"final",
"String",
"color",
")",
"{",
"return",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"PREVIEW_BUTTON_COLOR_REMOVE_SCRIPT",
")",
".",
"append",
"(",
"PREVIEW_BUTTON_COLOR_CREATE_SCRIPT",
... | Get javascript to reflect new color selection for preview button.
@param color
changed color
@return javascript for the selected color. | [
"Get",
"javascript",
"to",
"reflect",
"new",
"color",
"selection",
"for",
"preview",
"button",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L416-L422 |
52,342 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.applyStatusLblStyle | public static void applyStatusLblStyle(final Table targetTable, final Button pinBtn, final Object itemId) {
final Item item = targetTable.getItem(itemId);
if (item != null) {
final TargetUpdateStatus updateStatus = (TargetUpdateStatus) item
.getItemProperty(SPUILabelDefin... | java | public static void applyStatusLblStyle(final Table targetTable, final Button pinBtn, final Object itemId) {
final Item item = targetTable.getItem(itemId);
if (item != null) {
final TargetUpdateStatus updateStatus = (TargetUpdateStatus) item
.getItemProperty(SPUILabelDefin... | [
"public",
"static",
"void",
"applyStatusLblStyle",
"(",
"final",
"Table",
"targetTable",
",",
"final",
"Button",
"pinBtn",
",",
"final",
"Object",
"itemId",
")",
"{",
"final",
"Item",
"item",
"=",
"targetTable",
".",
"getItem",
"(",
"itemId",
")",
";",
"if",... | Apply style for status label in target table.
@param targetTable
target table
@param pinBtn
pin button used for status display and pin on mouse over
@param itemId
id of the tabel row | [
"Apply",
"style",
"for",
"status",
"label",
"in",
"target",
"table",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L434-L452 |
52,343 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.formattingFinishedPercentage | public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) {
float tmpFinishedPercentage = 0;
switch (rolloutGroup.getStatus()) {
case READY:
case SCHEDULED:
case ERROR:
tmpFinishedPercentage = 0.0F;
... | java | public static String formattingFinishedPercentage(final RolloutGroup rolloutGroup, final float finishedPercentage) {
float tmpFinishedPercentage = 0;
switch (rolloutGroup.getStatus()) {
case READY:
case SCHEDULED:
case ERROR:
tmpFinishedPercentage = 0.0F;
... | [
"public",
"static",
"String",
"formattingFinishedPercentage",
"(",
"final",
"RolloutGroup",
"rolloutGroup",
",",
"final",
"float",
"finishedPercentage",
")",
"{",
"float",
"tmpFinishedPercentage",
"=",
"0",
";",
"switch",
"(",
"rolloutGroup",
".",
"getStatus",
"(",
... | Formats the finished percentage of a rollout group into a string with one
digit after comma.
@param rolloutGroup
the rollout group
@param finishedPercentage
the calculated finished percentage of the rolloutgroup
@return formatted String value | [
"Formats",
"the",
"finished",
"percentage",
"of",
"a",
"rollout",
"group",
"into",
"a",
"string",
"with",
"one",
"digit",
"after",
"comma",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L464-L482 |
52,344 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getStatusLabelDetailsInString | public static String getStatusLabelDetailsInString(final String value, final String style, final String id) {
final StringBuilder val = new StringBuilder();
if (!StringUtils.isEmpty(value)) {
val.append("value:").append(value).append(",");
}
if (!StringUtils.isEmpty(style)) {... | java | public static String getStatusLabelDetailsInString(final String value, final String style, final String id) {
final StringBuilder val = new StringBuilder();
if (!StringUtils.isEmpty(value)) {
val.append("value:").append(value).append(",");
}
if (!StringUtils.isEmpty(style)) {... | [
"public",
"static",
"String",
"getStatusLabelDetailsInString",
"(",
"final",
"String",
"value",
",",
"final",
"String",
"style",
",",
"final",
"String",
"id",
")",
"{",
"final",
"StringBuilder",
"val",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"... | Returns a formatted string as needed by label custom render .This string
holds the properties of a status label.
@param value
label value
@param style
label style
@param id
label id
@return formatted string | [
"Returns",
"a",
"formatted",
"string",
"as",
"needed",
"by",
"label",
"custom",
"render",
".",
"This",
"string",
"holds",
"the",
"properties",
"of",
"a",
"status",
"label",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L496-L505 |
52,345 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getCodePoint | public static String getCodePoint(final StatusFontIcon statusFontIcon) {
if (statusFontIcon == null) {
return null;
}
return statusFontIcon.getFontIcon() != null ? Integer.toString(statusFontIcon.getFontIcon().getCodepoint())
: null;
} | java | public static String getCodePoint(final StatusFontIcon statusFontIcon) {
if (statusFontIcon == null) {
return null;
}
return statusFontIcon.getFontIcon() != null ? Integer.toString(statusFontIcon.getFontIcon().getCodepoint())
: null;
} | [
"public",
"static",
"String",
"getCodePoint",
"(",
"final",
"StatusFontIcon",
"statusFontIcon",
")",
"{",
"if",
"(",
"statusFontIcon",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"statusFontIcon",
".",
"getFontIcon",
"(",
")",
"!=",
"null",
... | Receive the code point of a given StatusFontIcon.
@param statusFontIcon
the status font icon
@return the code point of the StatusFontIcon | [
"Receive",
"the",
"code",
"point",
"of",
"a",
"given",
"StatusFontIcon",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L514-L520 |
52,346 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getCurrentLocale | public static Locale getCurrentLocale() {
final UI currentUI = UI.getCurrent();
return currentUI == null ? Locale.getDefault() : currentUI.getLocale();
} | java | public static Locale getCurrentLocale() {
final UI currentUI = UI.getCurrent();
return currentUI == null ? Locale.getDefault() : currentUI.getLocale();
} | [
"public",
"static",
"Locale",
"getCurrentLocale",
"(",
")",
"{",
"final",
"UI",
"currentUI",
"=",
"UI",
".",
"getCurrent",
"(",
")",
";",
"return",
"currentUI",
"==",
"null",
"?",
"Locale",
".",
"getDefault",
"(",
")",
":",
"currentUI",
".",
"getLocale",
... | Gets the locale of the current Vaadin UI. If the locale can not be
determined, the default locale is returned instead.
@return the current locale, never {@code null}.
@see com.vaadin.ui.UI#getLocale()
@see java.util.Locale#getDefault() | [
"Gets",
"the",
"locale",
"of",
"the",
"current",
"Vaadin",
"UI",
".",
"If",
"the",
"locale",
"can",
"not",
"be",
"determined",
"the",
"default",
"locale",
"is",
"returned",
"instead",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L530-L533 |
52,347 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getArtifactoryDetailsLabelId | public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) {
String caption;
if (StringUtils.hasText(name)) {
caption = i18n.getMessage(UIMessageIdProvider.CAPTION_ARTIFACT_DETAILS_OF,
HawkbitCommonUtil.getBoldHTMLText(name));
... | java | public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) {
String caption;
if (StringUtils.hasText(name)) {
caption = i18n.getMessage(UIMessageIdProvider.CAPTION_ARTIFACT_DETAILS_OF,
HawkbitCommonUtil.getBoldHTMLText(name));
... | [
"public",
"static",
"String",
"getArtifactoryDetailsLabelId",
"(",
"final",
"String",
"name",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"String",
"caption",
";",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"name",
")",
")",
"{",
"caption",
"=",... | Creates the caption of the Artifact Details table
@param name
name of the software module, if one is selected
@param i18n
VaadinMessageSource
@return complete caption text of the table | [
"Creates",
"the",
"caption",
"of",
"the",
"Artifact",
"Details",
"table"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L554-L563 |
52,348 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.getLocaleToBeUsed | public static Locale getLocaleToBeUsed(final UiProperties.Localization localizationProperties,
final Locale desiredLocale) {
final List<String> availableLocals = localizationProperties.getAvailableLocals();
// ckeck if language code of UI locale matches an available local.
// Country... | java | public static Locale getLocaleToBeUsed(final UiProperties.Localization localizationProperties,
final Locale desiredLocale) {
final List<String> availableLocals = localizationProperties.getAvailableLocals();
// ckeck if language code of UI locale matches an available local.
// Country... | [
"public",
"static",
"Locale",
"getLocaleToBeUsed",
"(",
"final",
"UiProperties",
".",
"Localization",
"localizationProperties",
",",
"final",
"Locale",
"desiredLocale",
")",
"{",
"final",
"List",
"<",
"String",
">",
"availableLocals",
"=",
"localizationProperties",
".... | Determine the language that should be used considering localization
properties and a desired Locale
@param localizationProperties
UI Localization settings
@param desiredLocale
desired Locale
@return Locale to be used according to UI and properties | [
"Determine",
"the",
"language",
"that",
"should",
"be",
"used",
"considering",
"localization",
"properties",
"and",
"a",
"desired",
"Locale"
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L575-L585 |
52,349 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java | HawkbitCommonUtil.initLocalization | public static void initLocalization(final UI ui, final Localization localizationProperties,
final VaadinMessageSource i18n) {
ui.setLocale(HawkbitCommonUtil.getLocaleToBeUsed(localizationProperties, ui.getSession().getLocale()));
ui.getReconnectDialogConfiguration()
.setDialo... | java | public static void initLocalization(final UI ui, final Localization localizationProperties,
final VaadinMessageSource i18n) {
ui.setLocale(HawkbitCommonUtil.getLocaleToBeUsed(localizationProperties, ui.getSession().getLocale()));
ui.getReconnectDialogConfiguration()
.setDialo... | [
"public",
"static",
"void",
"initLocalization",
"(",
"final",
"UI",
"ui",
",",
"final",
"Localization",
"localizationProperties",
",",
"final",
"VaadinMessageSource",
"i18n",
")",
"{",
"ui",
".",
"setLocale",
"(",
"HawkbitCommonUtil",
".",
"getLocaleToBeUsed",
"(",
... | Set localization considering properties and UI settings.
@param ui
UI to setup
@param localizationProperties
UI localization settings
@param i18n
Localization message source | [
"Set",
"localization",
"considering",
"properties",
"and",
"UI",
"settings",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L597-L602 |
52,350 | eclipse/hawkbit | hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/DistributionSetMetadataDetailsLayout.java | DistributionSetMetadataDetailsLayout.populateDSMetadata | public void populateDSMetadata(final DistributionSet distributionSet) {
removeAllItems();
if (null == distributionSet) {
return;
}
selectedDistSetId = distributionSet.getId();
final List<DistributionSetMetadata> dsMetadataList = distributionSetManagement
... | java | public void populateDSMetadata(final DistributionSet distributionSet) {
removeAllItems();
if (null == distributionSet) {
return;
}
selectedDistSetId = distributionSet.getId();
final List<DistributionSetMetadata> dsMetadataList = distributionSetManagement
... | [
"public",
"void",
"populateDSMetadata",
"(",
"final",
"DistributionSet",
"distributionSet",
")",
"{",
"removeAllItems",
"(",
")",
";",
"if",
"(",
"null",
"==",
"distributionSet",
")",
"{",
"return",
";",
"}",
"selectedDistSetId",
"=",
"distributionSet",
".",
"ge... | Populate distribution set metadata.
@param distributionSet | [
"Populate",
"distribution",
"set",
"metadata",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/detailslayout/DistributionSetMetadataDetailsLayout.java#L61-L72 |
52,351 | eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java | DmfDownloadAndUpdateRequest.addSoftwareModule | public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>();
}
softwareModules.add(createSoftwareModule);
} | java | public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>();
}
softwareModules.add(createSoftwareModule);
} | [
"public",
"void",
"addSoftwareModule",
"(",
"final",
"DmfSoftwareModule",
"createSoftwareModule",
")",
"{",
"if",
"(",
"softwareModules",
"==",
"null",
")",
"{",
"softwareModules",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"softwareModules",
".",
"add",... | Add a Software module.
@param createSoftwareModule
the module | [
"Add",
"a",
"Software",
"module",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java#L56-L63 |
52,352 | eclipse/hawkbit | hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaTenantConfigurationManagement.java | JpaTenantConfigurationManagement.validateTenantConfigurationDataType | static <T> void validateTenantConfigurationDataType(final TenantConfigurationKey configurationKey,
final Class<T> propertyType) {
if (!configurationKey.getDataType().isAssignableFrom(propertyType)) {
throw new TenantConfigurationValidatorException(
String.format("Can... | java | static <T> void validateTenantConfigurationDataType(final TenantConfigurationKey configurationKey,
final Class<T> propertyType) {
if (!configurationKey.getDataType().isAssignableFrom(propertyType)) {
throw new TenantConfigurationValidatorException(
String.format("Can... | [
"static",
"<",
"T",
">",
"void",
"validateTenantConfigurationDataType",
"(",
"final",
"TenantConfigurationKey",
"configurationKey",
",",
"final",
"Class",
"<",
"T",
">",
"propertyType",
")",
"{",
"if",
"(",
"!",
"configurationKey",
".",
"getDataType",
"(",
")",
... | Validates the data type of the tenant configuration. If it is possible to
cast to the given data type.
@param configurationKey
the key
@param propertyType
the class | [
"Validates",
"the",
"data",
"type",
"of",
"the",
"tenant",
"configuration",
".",
"If",
"it",
"is",
"possible",
"to",
"cast",
"to",
"the",
"given",
"data",
"type",
"."
] | 9884452ad42f3b4827461606d8a9215c8625a7fe | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaTenantConfigurationManagement.java#L75-L83 |
52,353 | 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 |
52,354 | 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 |
52,355 | 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 |
52,356 | 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 |
52,357 | 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 |
52,358 | 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 |
52,359 | 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 |
52,360 | 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 |
52,361 | 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 |
52,362 | 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 |
52,363 | 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 |
52,364 | 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 |
52,365 | 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 |
52,366 | 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 |
52,367 | 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 |
52,368 | 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 |
52,369 | 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 |
52,370 | 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 |
52,371 | 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 |
52,372 | 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 |
52,373 | 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 |
52,374 | 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 |
52,375 | 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 |
52,376 | 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 |
52,377 | 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 |
52,378 | 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 |
52,379 | 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 |
52,380 | 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 |
52,381 | 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 |
52,382 | 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 |
52,383 | 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 |
52,384 | 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 |
52,385 | 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 |
52,386 | 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 |
52,387 | 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 |
52,388 | 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 |
52,389 | 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 |
52,390 | 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 |
52,391 | 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 |
52,392 | 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 |
52,393 | 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 |
52,394 | 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 |
52,395 | 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 |
52,396 | 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 |
52,397 | 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 |
52,398 | 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 |
52,399 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.