summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-05-18 07:12:30 (EDT)
committer Manik Kishore2012-06-19 07:30:07 (EDT)
commit5e33136028ad5b4c82d32a472c17c916c018b61a (patch)
treef956076f9a48c197cf35a45a741614e7454ac2a6
parent55c1fdab8d58b110325d0cec56f22e30572d1e08 (diff)
downloadorg.eclipse.stardust.ui.web-5e33136028ad5b4c82d32a472c17c916c018b61a.zip
org.eclipse.stardust.ui.web-5e33136028ad5b4c82d32a472c17c916c018b61a.tar.gz
org.eclipse.stardust.ui.web-5e33136028ad5b4c82d32a472c17c916c018b61a.tar.bz2
Jira-ID: CRNT-23507
Used ModelHelper.getParticipantName() to get the participant Info git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@56423 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/EventHistoryItem.java49
1 files changed, 5 insertions, 44 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/EventHistoryItem.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/EventHistoryItem.java
index 7558e17..67c39d1 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/EventHistoryItem.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/EventHistoryItem.java
@@ -25,6 +25,7 @@ import org.eclipse.stardust.engine.api.runtime.HistoricalEventType;
import org.eclipse.stardust.engine.api.runtime.User;
import org.eclipse.stardust.ui.web.viewscommon.common.Localizer;
import org.eclipse.stardust.ui.web.viewscommon.common.LocalizerKey;
+import org.eclipse.stardust.ui.web.viewscommon.common.ModelHelper;
import org.eclipse.stardust.ui.web.viewscommon.utils.I18nUtils;
@@ -71,30 +72,13 @@ public class EventHistoryItem extends AbstractProcessHistoryTableEntry
Participant from = delDescr.getFromPerformer();
Participant to = delDescr.getToPerformer();
StringBuffer buffer = new StringBuffer();
- ModelParticipantInfo modelParticipant;
- String deptName = null;
- String tmpDetail = I18nUtils.getParticipantName(from);
- if (from != null && !StringUtils.isEmpty(tmpDetail))
+ if (from != null)
{
- buffer.append(tmpDetail);
- if (from instanceof ModelParticipantInfo)
- {
- modelParticipant = (ModelParticipantInfo) from;
- deptName = getDepartmentLabel(modelParticipant.getDepartment());
- }
- buffer.append(StringUtils.isNotEmpty(deptName) ? deptName : " ");
+ buffer.append(ModelHelper.getParticipantName(from)).append(" ");
}
- tmpDetail = I18nUtils.getParticipantName(to);
- deptName = null;
- if (to != null && !StringUtils.isEmpty(tmpDetail))
+ if (to != null)
{
- buffer.append("-> ").append(tmpDetail);
- if (to instanceof ModelParticipantInfo)
- {
- modelParticipant = (ModelParticipantInfo) to;
- deptName = getDepartmentLabel(modelParticipant.getDepartment());
- }
- buffer.append(StringUtils.isNotEmpty(deptName) ? deptName : "");
+ buffer.append("-> ").append(ModelHelper.getParticipantName(to));
}
fullDetail = buffer.toString();
break;
@@ -172,29 +156,6 @@ public class EventHistoryItem extends AbstractProcessHistoryTableEntry
performer = user != null ? I18nUtils.getUserLabel(user) : null;
}
- /**
- *
- * @param department
- * @return
- */
- private String getDepartmentLabel(DepartmentInfo department)
- {
- StringBuffer deptString = new StringBuffer();
- if (null != department)
- {
- DepartmentDetails deptDetail = (DepartmentDetails) department;
- if (deptDetail.getOrganization().isDepartmentScoped())
- {
- deptString.append(" - ").append(department.getName()).append(" ");
- }
- }
- else
- {
- return null;
- }
- return deptString.toString();
- }
-
public String getName()
{
return name;