Added javadoc
Signed-off-by: asharani-murugesh <asharani.murugesh@in.bosch.com>
This commit is contained in:
@@ -8,9 +8,15 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.ui.customrenderers.client;
|
package org.eclipse.hawkbit.ui.customrenderers.client;
|
||||||
|
|
||||||
|
import org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlButtonRenderer;
|
||||||
|
|
||||||
import com.vaadin.client.connectors.ButtonRendererConnector;
|
import com.vaadin.client.connectors.ButtonRendererConnector;
|
||||||
import com.vaadin.shared.ui.Connect;
|
import com.vaadin.shared.ui.Connect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A connector for {@link HtmlButtonRenderer}.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlButtonRenderer.class)
|
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlButtonRenderer.class)
|
||||||
public class HtmlButtonRendererConnector extends ButtonRendererConnector {
|
public class HtmlButtonRendererConnector extends ButtonRendererConnector {
|
||||||
private static final long serialVersionUID = 7987417436367399331L;
|
private static final long serialVersionUID = 7987417436367399331L;
|
||||||
|
|||||||
@@ -8,9 +8,16 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.ui.customrenderers.client;
|
package org.eclipse.hawkbit.ui.customrenderers.client;
|
||||||
|
|
||||||
|
import org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlLabelRenderer;
|
||||||
|
|
||||||
import com.vaadin.client.connectors.AbstractRendererConnector;
|
import com.vaadin.client.connectors.AbstractRendererConnector;
|
||||||
import com.vaadin.shared.ui.Connect;
|
import com.vaadin.shared.ui.Connect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* A connector for {@link HtmlLabelRenderer}.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlLabelRenderer.class)
|
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlLabelRenderer.class)
|
||||||
public class HtmlLabelRendererConnector extends AbstractRendererConnector<String> {
|
public class HtmlLabelRendererConnector extends AbstractRendererConnector<String> {
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,16 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.ui.customrenderers.client;
|
package org.eclipse.hawkbit.ui.customrenderers.client;
|
||||||
|
|
||||||
|
import org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer;
|
||||||
|
|
||||||
import com.vaadin.client.connectors.ButtonRendererConnector;
|
import com.vaadin.client.connectors.ButtonRendererConnector;
|
||||||
import com.vaadin.shared.ui.Connect;
|
import com.vaadin.shared.ui.Connect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* A connector for {@link LinkRenderer}.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer.class)
|
@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer.class)
|
||||||
public class LinkRendererConnector extends ButtonRendererConnector {
|
public class LinkRendererConnector extends ButtonRendererConnector {
|
||||||
private static final long serialVersionUID = 7987417436367399331L;
|
private static final long serialVersionUID = 7987417436367399331L;
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ import com.vaadin.client.renderers.ButtonRenderer;
|
|||||||
import com.vaadin.client.ui.VButton;
|
import com.vaadin.client.ui.VButton;
|
||||||
import com.vaadin.client.widget.grid.RendererCellReference;
|
import com.vaadin.client.widget.grid.RendererCellReference;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders button with provided HTML content.
|
||||||
|
* Used to display button with icons.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HtmlButtonRenderer extends ButtonRenderer {
|
public class HtmlButtonRenderer extends ButtonRenderer {
|
||||||
@Override
|
@Override
|
||||||
public void render(RendererCellReference cell, String text, Button button) {
|
public void render(RendererCellReference cell, String text, Button button) {
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ import com.vaadin.client.renderers.WidgetRenderer;
|
|||||||
import com.vaadin.client.ui.VLabel;
|
import com.vaadin.client.ui.VLabel;
|
||||||
import com.vaadin.client.widget.grid.RendererCellReference;
|
import com.vaadin.client.widget.grid.RendererCellReference;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders label with provided value and style.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HtmlLabelRenderer extends WidgetRenderer<String, VLabel> {
|
public class HtmlLabelRenderer extends WidgetRenderer<String, VLabel> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ import com.vaadin.client.renderers.ButtonRenderer;
|
|||||||
import com.vaadin.client.ui.VButton;
|
import com.vaadin.client.ui.VButton;
|
||||||
import com.vaadin.client.widget.grid.RendererCellReference;
|
import com.vaadin.client.widget.grid.RendererCellReference;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders link with provided text.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class LinkRenderer extends ButtonRenderer {
|
public class LinkRenderer extends ButtonRenderer {
|
||||||
@Override
|
@Override
|
||||||
public void render(RendererCellReference cell, String text, Button button) {
|
public void render(RendererCellReference cell, String text, Button button) {
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ package org.eclipse.hawkbit.ui.customrenderers.renderers;
|
|||||||
|
|
||||||
import com.vaadin.ui.renderers.ButtonRenderer;
|
import com.vaadin.ui.renderers.ButtonRenderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders button with provided HTML content.
|
||||||
|
* Used to display button with icons.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HtmlButtonRenderer extends ButtonRenderer {
|
public class HtmlButtonRenderer extends ButtonRenderer {
|
||||||
private static final long serialVersionUID = -1242995370043404892L;
|
private static final long serialVersionUID = -1242995370043404892L;
|
||||||
public HtmlButtonRenderer() {
|
public HtmlButtonRenderer() {
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ package org.eclipse.hawkbit.ui.customrenderers.renderers;
|
|||||||
|
|
||||||
import com.vaadin.ui.Grid.AbstractRenderer;
|
import com.vaadin.ui.Grid.AbstractRenderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders label with provided value and style.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HtmlLabelRenderer extends AbstractRenderer<String> {
|
public class HtmlLabelRenderer extends AbstractRenderer<String> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -7675588068526774915L;
|
private static final long serialVersionUID = -7675588068526774915L;
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ package org.eclipse.hawkbit.ui.customrenderers.renderers;
|
|||||||
|
|
||||||
import com.vaadin.ui.renderers.ButtonRenderer;
|
import com.vaadin.ui.renderers.ButtonRenderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Renders link with provided text.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class LinkRenderer extends ButtonRenderer {
|
public class LinkRenderer extends ButtonRenderer {
|
||||||
private static final long serialVersionUID = -1242995370043404892L;
|
private static final long serialVersionUID = -1242995370043404892L;
|
||||||
public LinkRenderer() {
|
public LinkRenderer() {
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ import com.vaadin.ui.Window;
|
|||||||
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
|
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
|
||||||
import com.vaadin.ui.renderers.HtmlRenderer;
|
import com.vaadin.ui.renderers.HtmlRenderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Rollout list grid component.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@SpringComponent
|
@SpringComponent
|
||||||
@ViewScope
|
@ViewScope
|
||||||
public class RolloutListGrid extends AbstractGrid {
|
public class RolloutListGrid extends AbstractGrid {
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ import com.vaadin.spring.annotation.ViewScope;
|
|||||||
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
|
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
|
||||||
import com.vaadin.ui.renderers.HtmlRenderer;
|
import com.vaadin.ui.renderers.HtmlRenderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Rollout group list grid component.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@SpringComponent
|
@SpringComponent
|
||||||
@ViewScope
|
@ViewScope
|
||||||
public class RolloutGroupListGrid extends AbstractGrid {
|
public class RolloutGroupListGrid extends AbstractGrid {
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import org.vaadin.addons.lazyquerycontainer.AbstractBeanQuery;
|
|||||||
import org.vaadin.addons.lazyquerycontainer.QueryDefinition;
|
import org.vaadin.addons.lazyquerycontainer.QueryDefinition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gah6kor
|
* Simple implementation of generics bean query which dynamically loads a batch
|
||||||
*
|
* of {@link ProxyTarget} beans.
|
||||||
*/
|
*/
|
||||||
public class RolloutGroupTargetsBeanQuery extends AbstractBeanQuery<ProxyTarget> {
|
public class RolloutGroupTargetsBeanQuery extends AbstractBeanQuery<ProxyTarget> {
|
||||||
|
|
||||||
@@ -83,8 +83,9 @@ public class RolloutGroupTargetsBeanQuery extends AbstractBeanQuery<ProxyTarget>
|
|||||||
if (startIndex == 0 && firstPageTargetSets != null) {
|
if (startIndex == 0 && firstPageTargetSets != null) {
|
||||||
rolloutGroupTargetsList = firstPageTargetSets.getContent();
|
rolloutGroupTargetsList = firstPageTargetSets.getContent();
|
||||||
} else if (null != rolloutGroup) {
|
} else if (null != rolloutGroup) {
|
||||||
rolloutGroupTargetsList = getRolloutGroupManagement().findAllTargetsWithActionStatus(
|
rolloutGroupTargetsList = getRolloutGroupManagement()
|
||||||
new PageRequest(startIndex / count, count), rolloutGroup).getContent();
|
.findAllTargetsWithActionStatus(new PageRequest(startIndex / count, count), rolloutGroup)
|
||||||
|
.getContent();
|
||||||
}
|
}
|
||||||
return getProxyRolloutGroupTargetsList(rolloutGroupTargetsList);
|
return getProxyRolloutGroupTargetsList(rolloutGroupTargetsList);
|
||||||
}
|
}
|
||||||
@@ -113,8 +114,8 @@ public class RolloutGroupTargetsBeanQuery extends AbstractBeanQuery<ProxyTarget>
|
|||||||
prxyTarget.setTargetInfo(targ.getTargetInfo());
|
prxyTarget.setTargetInfo(targ.getTargetInfo());
|
||||||
prxyTarget.setId(targ.getId());
|
prxyTarget.setId(targ.getId());
|
||||||
if (targ.getAssignedDistributionSet() != null) {
|
if (targ.getAssignedDistributionSet() != null) {
|
||||||
prxyTarget.setAssignedDistNameVersion(HawkbitCommonUtil.getFormattedNameVersion(targ
|
prxyTarget.setAssignedDistNameVersion(HawkbitCommonUtil.getFormattedNameVersion(
|
||||||
.getAssignedDistributionSet().getName(), targ.getAssignedDistributionSet().getVersion()));
|
targ.getAssignedDistributionSet().getName(), targ.getAssignedDistributionSet().getVersion()));
|
||||||
}
|
}
|
||||||
proxyTargetBeans.add(prxyTarget);
|
proxyTargetBeans.add(prxyTarget);
|
||||||
|
|
||||||
@@ -133,8 +134,8 @@ public class RolloutGroupTargetsBeanQuery extends AbstractBeanQuery<ProxyTarget>
|
|||||||
public int size() {
|
public int size() {
|
||||||
long size = 0;
|
long size = 0;
|
||||||
if (null != rolloutGroup) {
|
if (null != rolloutGroup) {
|
||||||
firstPageTargetSets = getRolloutGroupManagement().findAllTargetsWithActionStatus(
|
firstPageTargetSets = getRolloutGroupManagement()
|
||||||
new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), rolloutGroup);
|
.findAllTargetsWithActionStatus(new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), rolloutGroup);
|
||||||
size = firstPageTargetSets.getTotalElements();
|
size = firstPageTargetSets.getTotalElements();
|
||||||
}
|
}
|
||||||
getRolloutUIState().setRolloutGroupTargetsTotalCount(size);
|
getRolloutUIState().setRolloutGroupTargetsTotalCount(size);
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ import com.vaadin.spring.annotation.ViewScope;
|
|||||||
import com.vaadin.ui.Label;
|
import com.vaadin.ui.Label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* count message label for the targets of the rollout group.
|
* Count message label for the targets of the rollout group.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@SpringComponent
|
@SpringComponent
|
||||||
@ViewScope
|
@ViewScope
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ import com.vaadin.server.FontAwesome;
|
|||||||
import com.vaadin.spring.annotation.SpringComponent;
|
import com.vaadin.spring.annotation.SpringComponent;
|
||||||
import com.vaadin.spring.annotation.ViewScope;
|
import com.vaadin.spring.annotation.ViewScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Grid component with targets of rollout group.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@SpringComponent
|
@SpringComponent
|
||||||
@ViewScope
|
@ViewScope
|
||||||
public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||||
|
|||||||
Reference in New Issue
Block a user