summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-03-01 02:06:42 (EST)
committer Sven Rottstock2013-03-11 06:38:11 (EDT)
commit8cb3c0e8fb8a2942bf1027f36c481a69d704f915 (patch)
tree36810e878d28b00e62f2b1934949b14725a37847
parent8b9b556e80c327bec293a93351c22931447fcf7b (diff)
downloadorg.eclipse.stardust.ui.web-8cb3c0e8fb8a2942bf1027f36c481a69d704f915.zip
org.eclipse.stardust.ui.web-8cb3c0e8fb8a2942bf1027f36c481a69d704f915.tar.gz
org.eclipse.stardust.ui.web-8cb3c0e8fb8a2942bf1027f36c481a69d704f915.tar.bz2
Jira-ID: CRNT-28041
Added code to count the pendingActivityCnt in TrafficLightViewManagerBean and use as check which showing totalActivityCnt in AggregateActivityColumnItem. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63370 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/legacy/traffic/AggregateActivityColumnItem.java16
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/TrafficLightViewManagerBean.java13
2 files changed, 26 insertions, 3 deletions
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/legacy/traffic/AggregateActivityColumnItem.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/legacy/traffic/AggregateActivityColumnItem.java
index 36a6a2c..5e05370 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/legacy/traffic/AggregateActivityColumnItem.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/legacy/traffic/AggregateActivityColumnItem.java
@@ -71,6 +71,8 @@ public class AggregateActivityColumnItem implements IColumnItem
private List/* <ActivityInstance> */aInstances = new ArrayList();
private int totalActivityCnt = 0;
+
+ private int pendingActivityCnt = 0;
public AggregateActivityColumnItem(String id,String qualifiedId, String name, IRowItem rowItem)
{
@@ -89,6 +91,16 @@ public class AggregateActivityColumnItem implements IColumnItem
{
this.totalActivityCnt = this.totalActivityCnt + 1;
}
+
+ public int getPendingActivityCnt()
+ {
+ return pendingActivityCnt;
+ }
+
+ public void setPendingActivityCnt(int pendingActivityCnt)
+ {
+ this.pendingActivityCnt = pendingActivityCnt;
+ }
public String getId()
{
@@ -188,10 +200,10 @@ public String getName()
public String getCompletedIcon()
{
String completedIcon = null;
-
+
if ((this.rowItem.getTotalCount().longValue() == this.completed
|| (this.completed > 0 && this.completed == this.totalActivityCnt))
- && this.rowItem.getTotalCount().longValue() != 0)
+ && this.rowItem.getTotalCount().longValue() != 0 && this.pendingActivityCnt == 0)
{
completedIcon = TRAFFIC_LIGHT_COMPLETED;
}
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/TrafficLightViewManagerBean.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/TrafficLightViewManagerBean.java
index ec1aa26..e734a29 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/TrafficLightViewManagerBean.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/TrafficLightViewManagerBean.java
@@ -274,7 +274,7 @@ public void init()
else if (obj[j] instanceof AggregateActivityColumnItem)
{
aggregateActivityColumnItem = (AggregateActivityColumnItem) obj[j];
-
+
trafficLightDyna.add(new TrafficLightViewDynamicUserObject(aggregateActivityColumnItem.getId(),
aggregateActivityColumnItem.getQualifiedId(), Integer.toString(aggregateActivityColumnItem
.getCompleted()), aggregateActivityColumnItem.getSymbolUrl(), aggregateActivityColumnItem
@@ -479,6 +479,8 @@ public void init()
ActivityInstance aInstance;
IColumnItem columnItem;
Long totalCount;
+ //Calcualte the pending activities count for all rows
+ int pendingActivityCount = 0;
for (int i = 0; i < rows.size(); i++)
{
@@ -506,6 +508,10 @@ public void init()
columnItem.addCompletedActivity();
columnItem.addActivityInstance(aInstance);
}
+ else
+ {
+ pendingActivityCount+= pendingActivityCount+1;
+ }
}
if (value == null && UNDEFINED_ROW_ITEM_ID.equals(categoryValue))
@@ -518,6 +524,10 @@ public void init()
columnItem.addCompletedActivity();
columnItem.addActivityInstance(aInstance);
}
+ else
+ {
+ pendingActivityCount+= pendingActivityCount+1;
+ }
}
}
@@ -567,6 +577,7 @@ public void init()
{
AggregateActivityColumnItem aggregateActivity = (AggregateActivityColumnItem) columnItem;
aggregateActivity.addTotalActivityCnt();
+ aggregateActivity.setPendingActivityCnt(pendingActivityCount);
}
}