summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-01-24 06:42:37 (EST)
committerSven Rottstock2013-01-24 06:42:37 (EST)
commit85d171ec042a5ed18622f250f6d15b91567f8209 (patch)
tree0f3432bcc4059190d96ae0e5d92ae944483c19e6
parent9962517721e258933a2978b76fa1b7198977eded (diff)
downloadorg.eclipse.stardust.ui.web-85d171ec042a5ed18622f250f6d15b91567f8209.zip
org.eclipse.stardust.ui.web-85d171ec042a5ed18622f250f6d15b91567f8209.tar.gz
org.eclipse.stardust.ui.web-85d171ec042a5ed18622f250f6d15b91567f8209.tar.bz2
Jira-ID: CRNT-27702
Used ProcessInstanceUtils.getPriorityLabel(processPriority) to fetch I18ned priority in WorklistTableEntry Changed param for ProcessInstanceUtils.getPriorityValue() and used in PriorityAutocompleteSelector.java. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@62337 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java4
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableEntry.java6
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/PriorityAutocompleteSelector.java2
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessInstanceUtils.java35
4 files changed, 21 insertions, 26 deletions
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
index f0d644a..0ef3636 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
@@ -708,13 +708,13 @@ public class WorklistTableBean extends UIComponentBean
{
pi = ProcessInstanceUtils.getProcessInstance(ai);
}
- String priorityValue = ProcessInstanceUtils.getPriorityValue(pi);
+
List<Note> notes = ProcessInstanceUtils.getNotes(pi);
int notesSize = null != notes ? ProcessInstanceUtils.getNotes(pi).size() : 0;
worklistTableEntry = new WorklistTableEntry(I18nUtils.getActivityName(ai.getActivity()),
processDescriptorsList, ActivityInstanceUtils.isActivatable(ai),
- ActivityInstanceUtils.getLastPerformer(ai), priorityValue, pi.getPriority(), ai.getStartTime(),
+ ActivityInstanceUtils.getLastPerformer(ai), pi.getPriority(), ai.getStartTime(),
ai.getLastModificationTime(), ai.getOID(), this.getDuration(ai), notesSize, descriptorValues,
ai.getProcessInstanceOID(), ai, currentPerformerOID);
}
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableEntry.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableEntry.java
index 0ae3c2f..499c351 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableEntry.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableEntry.java
@@ -108,7 +108,7 @@ public class WorklistTableEntry extends DefaultRowModel
* @param activityInstance
*/
public WorklistTableEntry(String processName, List<ProcessDescriptor> processDescriptorsList,
- boolean activatable, String lastPerformer, String priority, int processPriority, Date startDate,
+ boolean activatable, String lastPerformer, int processPriority, Date startDate,
Date lastModificationTime, long oid, String duration, int notesCount, Map<String, Object> descriptorValues,
long processInstanceOid, ActivityInstance activityInstance, long currentPerformerOID)
{
@@ -118,8 +118,8 @@ public class WorklistTableEntry extends DefaultRowModel
this.processDescriptorsList = processDescriptorsList;
this.activatable = activatable;
this.lastPerformer = lastPerformer;
- this.priority = priority;
- this.priorityIcon = ProcessInstanceUtils.getPriorityIcon(priority.toLowerCase());
+ this.priority = ProcessInstanceUtils.getPriorityLabel(processPriority);
+ this.priorityIcon = ProcessInstanceUtils.getPriorityIcon(ProcessInstanceUtils.getPriorityValue(processPriority));
this.processPriority = processPriority;
this.startDate = startDate;
this.duration = duration;
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/PriorityAutocompleteSelector.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/PriorityAutocompleteSelector.java
index a72ef12..70eddd3 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/PriorityAutocompleteSelector.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/PriorityAutocompleteSelector.java
@@ -301,7 +301,7 @@ class PriorityAutocompleteDataProvider implements IAutocompleteDataProvider
{
// Populate PriorityAutoCompleteItem with priority Label ,priority and icon
String iconVal = ProcessInstanceUtils.getPriorityLabel(i);
- String iconPath = ProcessInstanceUtils.getPriorityIcon(iconVal.toLowerCase());
+ String iconPath = ProcessInstanceUtils.getPriorityIcon(ProcessInstanceUtils.getPriorityValue(i));
PriorityAutoCompleteItem pItem = new PriorityAutoCompleteItem(iconVal, iconPath, i);
if (pItem.getLabel().toUpperCase().startsWith(searchValue.toUpperCase()))
{
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessInstanceUtils.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessInstanceUtils.java
index 121c130..e68a200 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessInstanceUtils.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessInstanceUtils.java
@@ -1127,32 +1127,27 @@ public class ProcessInstanceUtils
/**
*
- * @param pi
+ * @param priority
* @return
*/
- public static String getPriorityValue(ProcessInstance pi)
+ public static String getPriorityValue(int priority)
{
String priorityValue = null;
- if (null != pi)
+ switch (priority)
{
- int priority = pi.getPriority();
-
- switch (priority)
- {
- case ProcessInstancePriority.LOW:
- priorityValue = PRIORITY_LOW;
- break;
- case ProcessInstancePriority.NORMAL:
- priorityValue = PRIORITY_NORMAL;
- break;
- case ProcessInstancePriority.HIGH:
- priorityValue = PRIORITY_HIGH;
- break;
- default:
- priorityValue = PRIORITY_NORMAL;
- break;
- }
+ case ProcessInstancePriority.LOW:
+ priorityValue = PRIORITY_LOW;
+ break;
+ case ProcessInstancePriority.NORMAL:
+ priorityValue = PRIORITY_NORMAL;
+ break;
+ case ProcessInstancePriority.HIGH:
+ priorityValue = PRIORITY_HIGH;
+ break;
+ default:
+ priorityValue = PRIORITY_NORMAL;
+ break;
}
return priorityValue;