Rollout management issues

Signed-off-by: venu1278 <venugopal.boodidadinne@in.bosch.com>
This commit is contained in:
venu1278
2016-04-15 15:22:16 +05:30
parent 20c045f997
commit b9c389d8db
5 changed files with 187 additions and 167 deletions

View File

@@ -13,6 +13,11 @@ import com.vaadin.client.renderers.ClickableRenderer;
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 CustomObject.
* Used to display button with link.
*
*/
public class CustomObjectRenederer extends ClickableRenderer<CustomObject, VButton> { public class CustomObjectRenederer extends ClickableRenderer<CustomObject, VButton> {
@Override @Override

View File

@@ -15,26 +15,36 @@ import com.vaadin.ui.renderers.ClickableRenderer;
import elemental.json.JsonValue; import elemental.json.JsonValue;
/**
* Renders button with provided CustomObject.
* Used to display button with link.
*
*/
public class CustomObjectRenderer extends ClickableRenderer<CustomObject> { public class CustomObjectRenderer extends ClickableRenderer<CustomObject> {
/**
*
*/
private static final long serialVersionUID = -8754180585906263554L; private static final long serialVersionUID = -8754180585906263554L;
/** /**
* Creates a new image renderer. * Creates a new custom object renderer.
*/ */
public CustomObjectRenderer() { public CustomObjectRenderer() {
super(CustomObject.class, null); super(CustomObject.class, null);
} }
/**
* Initialize custom object renderer with {@link Class<CustomObject>}
*
* @param presentationType
* Class<CustomObject>
*/
public CustomObjectRenderer(Class<CustomObject> presentationType) { public CustomObjectRenderer(Class<CustomObject> presentationType) {
super(presentationType); super(presentationType);
} }
/** /**
* Creates a new image renderer and adds the given click listener to it. * Creates a new custom object renderer and adds the given click listener to it.
* *
* @param listener * @param listener
* the click listener to register * the click listener to register

View File

@@ -14,7 +14,7 @@ import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject;
import com.vaadin.server.FontAwesome; import com.vaadin.server.FontAwesome;
/** /**
* Proxy rollout with suctome properties. * Proxy rollout with custom properties.
* *
*/ */
public class ProxyRollout extends Rollout { public class ProxyRollout extends Rollout {

View File

@@ -97,6 +97,10 @@ public class RolloutListGrid extends AbstractGrid {
private transient Map<RolloutStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutStatus.class); private transient Map<RolloutStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutStatus.class);
/**
* Handles the RolloutEvent to refresh Grid.
*
*/
@EventBusListenerMethod(scope = EventScope.SESSION) @EventBusListenerMethod(scope = EventScope.SESSION)
void onEvent(final RolloutEvent event) { void onEvent(final RolloutEvent event) {
switch (event) { switch (event) {
@@ -419,6 +423,9 @@ public class RolloutListGrid extends AbstractGrid {
((LazyQueryContainer) getContainerDataSource()).refresh(); ((LazyQueryContainer) getContainerDataSource()).refresh();
} }
/**
* Generator to generate fontIcon by String.
*/
public final class FontIconGenerator extends PropertyValueGenerator<String> { public final class FontIconGenerator extends PropertyValueGenerator<String> {
private static final long serialVersionUID = 2544026030795375748L; private static final long serialVersionUID = 2544026030795375748L;
@@ -585,11 +592,9 @@ public class RolloutListGrid extends AbstractGrid {
} }
/** /**
* * Converter to convert 0 to empty, if total target groups is zero.
* Converter to convert 0 to empty , if total target groups is zero.
* *
*/ */
class TotalTargetGroupsConverter implements Converter<String, Long> { class TotalTargetGroupsConverter implements Converter<String, Long> {
private static final long serialVersionUID = 6589305227035220369L; private static final long serialVersionUID = 6589305227035220369L;

View File

@@ -12,36 +12,36 @@ import org.eclipse.hawkbit.repository.model.RolloutGroup;
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject; import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject;
/** /**
* Proxy rollout group with suctome properties. * Proxy rollout group with custom properties.
* *
*/ */
public class ProxyRolloutGroup extends RolloutGroup { public class ProxyRolloutGroup extends RolloutGroup {
private static final long serialVersionUID = -2745056813306692356L; private static final long serialVersionUID = -2745056813306692356L;
private String createdDate; private String createdDate;
private String modifiedDate; private String modifiedDate;
private String finishedPercentage; private String finishedPercentage;
private Long runningTargetsCount; private Long runningTargetsCount;
private Long scheduledTargetsCount; private Long scheduledTargetsCount;
private Long cancelledTargetsCount; private Long cancelledTargetsCount;
private Long errorTargetsCount; private Long errorTargetsCount;
private Long finishedTargetsCount; private Long finishedTargetsCount;
private Long notStartedTargetsCount; private Long notStartedTargetsCount;
private Boolean isActionRecieved = Boolean.FALSE; private Boolean isActionRecieved = Boolean.FALSE;
private String totalTargetsCount; private String totalTargetsCount;
private CustomObject customObject; private CustomObject customObject;
public CustomObject getCustomObject() { public CustomObject getCustomObject() {
return customObject; return customObject;
@@ -51,169 +51,169 @@ public class ProxyRolloutGroup extends RolloutGroup {
this.customObject = customObject; this.customObject = customObject;
} }
/** /**
* @return the createdDate * @return the createdDate
*/ */
public String getCreatedDate() { public String getCreatedDate() {
return createdDate; return createdDate;
} }
/** /**
* @param createdDate * @param createdDate
* the createdDate to set * the createdDate to set
*/ */
public void setCreatedDate(final String createdDate) { public void setCreatedDate(final String createdDate) {
this.createdDate = createdDate; this.createdDate = createdDate;
} }
/** /**
* @return the modifiedDate * @return the modifiedDate
*/ */
public String getModifiedDate() { public String getModifiedDate() {
return modifiedDate; return modifiedDate;
} }
/** /**
* @param modifiedDate * @param modifiedDate
* the modifiedDate to set * the modifiedDate to set
*/ */
public void setModifiedDate(final String modifiedDate) { public void setModifiedDate(final String modifiedDate) {
this.modifiedDate = modifiedDate; this.modifiedDate = modifiedDate;
} }
/** /**
* @return the finishedPercentage * @return the finishedPercentage
*/ */
public String getFinishedPercentage() { public String getFinishedPercentage() {
return finishedPercentage; return finishedPercentage;
} }
/** /**
* @param finishedPercentage * @param finishedPercentage
* the finishedPercentage to set * the finishedPercentage to set
*/ */
public void setFinishedPercentage(final String finishedPercentage) { public void setFinishedPercentage(final String finishedPercentage) {
this.finishedPercentage = finishedPercentage; this.finishedPercentage = finishedPercentage;
} }
/** /**
* @return the runningTargetsCount * @return the runningTargetsCount
*/ */
public Long getRunningTargetsCount() { public Long getRunningTargetsCount() {
return runningTargetsCount; return runningTargetsCount;
} }
/** /**
* @param runningTargetsCount * @param runningTargetsCount
* the runningTargetsCount to set * the runningTargetsCount to set
*/ */
public void setRunningTargetsCount(final Long runningTargetsCount) { public void setRunningTargetsCount(final Long runningTargetsCount) {
this.runningTargetsCount = runningTargetsCount; this.runningTargetsCount = runningTargetsCount;
} }
/** /**
* @return the scheduledTargetsCount * @return the scheduledTargetsCount
*/ */
public Long getScheduledTargetsCount() { public Long getScheduledTargetsCount() {
return scheduledTargetsCount; return scheduledTargetsCount;
} }
/** /**
* @param scheduledTargetsCount * @param scheduledTargetsCount
* the scheduledTargetsCount to set * the scheduledTargetsCount to set
*/ */
public void setScheduledTargetsCount(final Long scheduledTargetsCount) { public void setScheduledTargetsCount(final Long scheduledTargetsCount) {
this.scheduledTargetsCount = scheduledTargetsCount; this.scheduledTargetsCount = scheduledTargetsCount;
} }
/** /**
* @return the cancelledTargetsCount * @return the cancelledTargetsCount
*/ */
public Long getCancelledTargetsCount() { public Long getCancelledTargetsCount() {
return cancelledTargetsCount; return cancelledTargetsCount;
} }
/** /**
* @param cancelledTargetsCount * @param cancelledTargetsCount
* the cancelledTargetsCount to set * the cancelledTargetsCount to set
*/ */
public void setCancelledTargetsCount(final Long cancelledTargetsCount) { public void setCancelledTargetsCount(final Long cancelledTargetsCount) {
this.cancelledTargetsCount = cancelledTargetsCount; this.cancelledTargetsCount = cancelledTargetsCount;
} }
/** /**
* @return the errorTargetsCount * @return the errorTargetsCount
*/ */
public Long getErrorTargetsCount() { public Long getErrorTargetsCount() {
return errorTargetsCount; return errorTargetsCount;
} }
/** /**
* @param errorTargetsCount * @param errorTargetsCount
* the errorTargetsCount to set * the errorTargetsCount to set
*/ */
public void setErrorTargetsCount(final Long errorTargetsCount) { public void setErrorTargetsCount(final Long errorTargetsCount) {
this.errorTargetsCount = errorTargetsCount; this.errorTargetsCount = errorTargetsCount;
} }
/** /**
* @return the finishedTargetsCount * @return the finishedTargetsCount
*/ */
public Long getFinishedTargetsCount() { public Long getFinishedTargetsCount() {
return finishedTargetsCount; return finishedTargetsCount;
} }
/** /**
* @param finishedTargetsCount * @param finishedTargetsCount
* the finishedTargetsCount to set * the finishedTargetsCount to set
*/ */
public void setFinishedTargetsCount(final Long finishedTargetsCount) { public void setFinishedTargetsCount(final Long finishedTargetsCount) {
this.finishedTargetsCount = finishedTargetsCount; this.finishedTargetsCount = finishedTargetsCount;
} }
/** /**
* @return the notStartedTargetsCount * @return the notStartedTargetsCount
*/ */
public Long getNotStartedTargetsCount() { public Long getNotStartedTargetsCount() {
return notStartedTargetsCount; return notStartedTargetsCount;
} }
/** /**
* @param notStartedTargetsCount * @param notStartedTargetsCount
* the notStartedTargetsCount to set * the notStartedTargetsCount to set
*/ */
public void setNotStartedTargetsCount(final Long notStartedTargetsCount) { public void setNotStartedTargetsCount(final Long notStartedTargetsCount) {
this.notStartedTargetsCount = notStartedTargetsCount; this.notStartedTargetsCount = notStartedTargetsCount;
} }
/** /**
* @return the isActionRecieved * @return the isActionRecieved
*/ */
public Boolean getIsActionRecieved() { public Boolean getIsActionRecieved() {
return isActionRecieved; return isActionRecieved;
} }
/** /**
* @param isActionRecieved * @param isActionRecieved
* the isActionRecieved to set * the isActionRecieved to set
*/ */
public void setIsActionRecieved(final Boolean isActionRecieved) { public void setIsActionRecieved(final Boolean isActionRecieved) {
this.isActionRecieved = isActionRecieved; this.isActionRecieved = isActionRecieved;
} }
/** /**
* @return the totalTargetsCount * @return the totalTargetsCount
*/ */
public String getTotalTargetsCount() { public String getTotalTargetsCount() {
return totalTargetsCount; return totalTargetsCount;
} }
/** /**
* @param totalTargetsCount * @param totalTargetsCount
* the totalTargetsCount to set * the totalTargetsCount to set
*/ */
public void setTotalTargetsCount(final String totalTargetsCount) { public void setTotalTargetsCount(final String totalTargetsCount) {
this.totalTargetsCount = totalTargetsCount; this.totalTargetsCount = totalTargetsCount;
} }
} }