summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-02-14 08:40:25 (EST)
committer Sven Rottstock2013-03-11 06:36:14 (EDT)
commit6287de9d0497b184b91f82e13d74289bbcfa339a (patch)
tree4262c8bc55982be1f7db9292e243f00fe9d2f36d
parenta3706a5f284782baf87f80f2c2bdcc5a572e1a64 (diff)
downloadorg.eclipse.stardust.ui.web-6287de9d0497b184b91f82e13d74289bbcfa339a.zip
org.eclipse.stardust.ui.web-6287de9d0497b184b91f82e13d74289bbcfa339a.tar.gz
org.eclipse.stardust.ui.web-6287de9d0497b184b91f82e13d74289bbcfa339a.tar.bz2
Jira-ID: CRNT-27941
Made changes to use DMS#requestDocumentContentDownload(). to create reportUri for JCR documents Used documentContentInfo.getId for FileSystemDocument to create reportUri git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63014 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/document/ReportViewer.java35
1 files changed, 6 insertions, 29 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 a315bab..cad9397 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,11 +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.beans.SessionContext;
import org.eclipse.stardust.ui.web.viewscommon.docmgmt.DocumentMgmtUtility;
import org.eclipse.stardust.ui.web.viewscommon.docmgmt.RepositoryUtility;
import org.eclipse.stardust.ui.web.viewscommon.docmgmt.ResourceNotFoundException;
@@ -24,7 +21,6 @@ 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;
@@ -66,7 +62,7 @@ public class ReportViewer implements IDocumentViewer
JCRDocument jcrDocument = (JCRDocument) documentContentInfo;
try
{
- reportUri = getJCRReportUri(jcrDocument.getDocument().getPath());
+ reportUri = getJCRReportUri(jcrDocument.getDocument().getId());
}
catch (Exception e)
{
@@ -79,10 +75,8 @@ public class ReportViewer implements IDocumentViewer
}
this.documentContentInfo = documentContentInfo;
setFavoriteStatus(documentContentInfo.getId());
- String queryString = getQueryString();
- sourceURI = getReportingBaseURL() + "/" + getPartitionID() + "?__report=" + reportUri + queryString
- + "&realmId=" + UserUtils.getRealmId() + "&workflowUserSessionId="
- + ServiceFactoryUtils.getWorkflowUserSessionId();
+
+ sourceURI = getReportingBaseURL() + "/" + getPartitionID() + "?__report=" + reportUri;
}
/**
@@ -126,23 +120,6 @@ 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
*/
@@ -156,10 +133,10 @@ public class ReportViewer implements IDocumentViewer
* @return
* @throws ResourceNotFoundException
*/
- private String getJCRReportUri(String documentPath) throws ResourceNotFoundException
+ private String getJCRReportUri(String documentOID) throws ResourceNotFoundException
{
- return FacesUtils.getServerBaseURL() + "/jackrabbit/repository/default/ipp-repository/partitions/"
- + UserUtils.getPartitionID() + documentPath;
+ return FacesUtils.getServerBaseURL() + "/dms-content/"
+ + DocumentMgmtUtility.getDocumentManagementService().requestDocumentContentDownload(documentOID);
}
/**