summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-02-15 05:23:12 (EST)
committerSven Rottstock2013-03-11 06:36:25 (EDT)
commit73ed4e1b6875efa3d60c8df0fc4aa3d97db39b2f (patch)
tree8b253f177e784105375af8fc113c640eb69ee6a7
parent88e8a3a2b15be9c0a1957510ea09498196e1a6fb (diff)
downloadorg.eclipse.stardust.ui.web-73ed4e1b6875efa3d60c8df0fc4aa3d97db39b2f.zip
org.eclipse.stardust.ui.web-73ed4e1b6875efa3d60c8df0fc4aa3d97db39b2f.tar.gz
org.eclipse.stardust.ui.web-73ed4e1b6875efa3d60c8df0fc4aa3d97db39b2f.tar.bz2
Jira-ID: CRNT-27941
Appended queryParams to the sourceURI in ReportViewer.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63041 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java27
1 files changed, 25 insertions, 2 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java
index cad9397..8b44425 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java
@@ -12,6 +12,8 @@ package org.eclipse.stardust.ui.web.viewscommon.views.document;
import javax.faces.context.FacesContext;
+import org.eclipse.stardust.common.CollectionUtils;
+import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.ui.web.common.app.View;
import org.eclipse.stardust.ui.web.common.util.FacesUtils;
import org.eclipse.stardust.ui.web.viewscommon.docmgmt.DocumentMgmtUtility;
@@ -21,6 +23,7 @@ import org.eclipse.stardust.ui.web.viewscommon.messages.MessagesViewsCommonBean;
import org.eclipse.stardust.ui.web.viewscommon.utils.ExceptionHandler;
import org.eclipse.stardust.ui.web.viewscommon.utils.MIMEType;
import org.eclipse.stardust.ui.web.viewscommon.utils.MimeTypesHelper;
+import org.eclipse.stardust.ui.web.viewscommon.utils.ServiceFactoryUtils;
import org.eclipse.stardust.ui.web.viewscommon.utils.UserUtils;
import org.eclipse.stardust.ui.web.viewscommon.views.reports.ArchiveReportDialog;
@@ -75,8 +78,9 @@ public class ReportViewer implements IDocumentViewer
}
this.documentContentInfo = documentContentInfo;
setFavoriteStatus(documentContentInfo.getId());
-
- sourceURI = getReportingBaseURL() + "/" + getPartitionID() + "?__report=" + reportUri;
+ String queryString = getQueryString();
+ sourceURI = getReportingBaseURL() + "/" + getPartitionID() + "?__report=" + reportUri + queryString + "&realmId="
+ + UserUtils.getRealmId() + "&workflowUserSessionId=" + ServiceFactoryUtils.getWorkflowUserSessionId();
}
/**
@@ -121,6 +125,25 @@ public class ReportViewer implements IDocumentViewer
}
/**
+ */
+ private String getQueryString()
+ {
+ if (CollectionUtils.isNotEmpty(view.getViewParams()))
+ {
+ String modelId = (String) view.getViewParams().get("ModelID");
+ String modelOId = (String) view.getViewParams().get("ModelOID");
+ StringBuilder strBuilder = new StringBuilder();
+ if (StringUtils.isNotEmpty(modelId) && StringUtils.isNotEmpty(modelOId))
+ {
+ strBuilder.append("&").append("ModelID").append("=").append(modelId);
+ strBuilder.append("&").append("ModelOID").append("=").append(modelOId);
+ }
+ return strBuilder.toString();
+ }
+ return "";
+ }
+
+ /**
* @return
*/
private String getPartitionID()