added set id for report references

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@90500 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-01-24 15:25:54 +00:00
parent 8daa22c5ef
commit e3d900c9dd
6 changed files with 21 additions and 14 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/reports-4.7.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/reports-4.7.3-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -28,8 +28,8 @@
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/reports-4.7.2-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/reports-4.7.3-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -2,6 +2,6 @@
<<<<<<<=.mine
>>>>>>>=.r71295
eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.7.2-SNAPSHOT
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.7.3-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>reports</artifactId>
<packaging>war</packaging>
<version>4.7.2-SNAPSHOT</version>
<version>4.7.3-SNAPSHOT</version>
<name>gCube Reports Manager</name>
<description>
gCube Reports Portlet.
@ -229,12 +229,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -390,6 +390,7 @@ public class TemplateComponent {
if (refs != null) {
ArrayList<Tuple> tuple = refs.getTuples();
ClientReportReference cmSeq = new ClientReportReference(presenter, refs.getRefType(), tuple, refs.isSingleRelation());
cmSeq.setId(sc.getId());
cmSeq.setMetadata(sc.getMetadata());
this.content = cmSeq;
} else
@ -531,6 +532,7 @@ public class TemplateComponent {
break;
case REPORT_REFERENCE:
ClientReportReference cRef = (ClientReportReference) this.content;
id = cRef.getId();
metas = cRef.getMetadata();
ReportReferences ref = new ReportReferences(cRef.getRefType(), cRef.getTupleList(), cRef.isSingleRelation());
content = ref;

View File

@ -25,6 +25,9 @@ import com.google.gwt.user.client.ui.VerticalPanel;
public class ClientReportReference extends Composite implements ClientSequence, Cloneable {
private final int indentationValue = 20;
private String id;
private List<Metadata> metas;
protected ArrayList<TemplateComponent> groupedComponents = new ArrayList<TemplateComponent>();
private VerticalPanel myPanel = new VerticalPanel();
@ -206,4 +209,11 @@ public class ClientReportReference extends Composite implements ClientSequence,
public void setMetadata(List<Metadata> metas) {
this.metas = metas;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@ -44,6 +44,7 @@ import org.gcube.application.rsg.service.dto.ReportType;
import org.gcube.application.rsg.support.builder.exceptions.ReportBuilderException;
import org.gcube.application.rsg.support.builder.impl.ReportManagerReportBuilder;
import org.gcube.application.rsg.support.model.components.impl.CompiledReport;
import org.gcube.application.rsg.support.model.utils.CompiledReportUtils;
import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
import org.gcube.applicationsupportlayer.social.NotificationsManager;
import org.gcube.common.homelibrary.home.HomeLibrary;
@ -1619,7 +1620,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
CompiledReport toSend = null;
try {
toSend = new ReportManagerReportBuilder().extract(template, model);
} catch (ReportBuilderException e) {
} catch (Exception e) {
e.printStackTrace();
}
//Actual RSG client interface exposes different methods (publish / publishDelta etc.) that need to be updated