summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-12-28 01:14:27 (EST)
committerStephan Born2013-01-25 12:39:51 (EST)
commit40e371537d145ef50a93798aecc5c170af5b24a0 (patch)
treefc3d482a5e1fd6c4bedf812c6dbc88aeca861d77
parent1bb5d092597c64cac7a07cdd8006f52dc0ac57f1 (diff)
downloadorg.eclipse.stardust.ui.web-40e371537d145ef50a93798aecc5c170af5b24a0.zip
org.eclipse.stardust.ui.web-40e371537d145ef50a93798aecc5c170af5b24a0.tar.gz
org.eclipse.stardust.ui.web-40e371537d145ef50a93798aecc5c170af5b24a0.tar.bz2
Jira-ID: CRNT-27243
Made changes to refreshDescriptorTable to calculate commonDescriptors for Case in ProcessSearchBean git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@61710 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
index 7ea8f96..9ded162 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
@@ -132,6 +132,7 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
private List<DataMappingWrapper> descriptorItems = new ArrayList<DataMappingWrapper>();
private List<DataMappingWrapper> caseDescriptorItems = new ArrayList<DataMappingWrapper>();
private DataPath[] commonDescriptors;
+ private List<DataPath> caseDataPath;
// Case
private UserAutocompleteMultiSelector ownerSelector;
@@ -867,11 +868,35 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
& ((SEARCH_OPTION.PROCESSES.equals(selectedSearchOption) & getFilterAttributes().isCaseOnlySearch()) || removedCaseProcess))
{
descriptorItems.addAll(caseDescriptorItems);
+ commonDescriptors = updateCommonDescriptorsForCase();
}
}
}
/**
+ *
+ * @return
+ */
+ private DataPath[] updateCommonDescriptorsForCase()
+ {
+ int i = 0;
+ DataPath[] caseDataPathArr = caseDataPath.toArray(new DataPath[0]);
+ // Common Descriptors will contains non-case and case descriptors
+ DataPath[] commonDescriptorsWithCase = new DataPath[commonDescriptors.length + caseDataPathArr.length];
+ // Add selected PD excluding case PD descriptors to commonDescriptors array
+ for (i = 0; i < commonDescriptors.length; i++)
+ {
+ commonDescriptorsWithCase[i] = commonDescriptors[i];
+ }
+ // Add Case descriptors to commonDescriptors array
+ for (int j = 0; j < caseDataPathArr.length; j++, i++)
+ {
+ commonDescriptorsWithCase[i] = caseDataPathArr[j];
+ }
+ return commonDescriptorsWithCase;
+ }
+
+ /**
* If selected Process is Case Process, return true
*
* @param dp
@@ -1054,7 +1079,7 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
ProcessDefinition caseProcessDefinition = ProcessDefinitionUtils
.getProcessDefinition(PredefinedConstants.CASE_PROCESS_ID);
- List<DataPath> caseDataPath = caseProcessDefinition.getAllDataPaths();
+ caseDataPath = caseProcessDefinition.getAllDataPaths();
caseDescriptorItems.clear();
GenericDataMapping mapping;
DataMappingWrapper dmWrapper;