Fixed pom dependencies. Added a tour example
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@128352 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a9053705dc
commit
d82048a6bd
|
@ -4,6 +4,9 @@
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<dependent-module archiveName="callout-tour-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/callout-tour/callout-tour">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<property name="java-output-path" value="/user-statistics/target/user-statistics-portlet-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/user-statistics/target/user-statistics-portlet-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="user-statistics"/>
|
<property name="context-root" value="user-statistics"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -88,11 +88,6 @@
|
||||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||||
<artifactId>aslcore</artifactId>
|
<artifactId>aslcore</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.gcube.dvos</groupId>
|
|
||||||
<artifactId>usermanagement-core</artifactId>
|
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google</groupId>
|
<groupId>com.google</groupId>
|
||||||
<artifactId>gwt-jsonmaker</artifactId>
|
<artifactId>gwt-jsonmaker</artifactId>
|
||||||
|
@ -153,10 +148,11 @@
|
||||||
<groupId>org.gcube.dvos</groupId>
|
<groupId>org.gcube.dvos</groupId>
|
||||||
<artifactId>usermanagement-core</artifactId>
|
<artifactId>usermanagement-core</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>widget-tour</artifactId>
|
<artifactId>callout-tour</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -165,6 +165,52 @@ public class StatisticsPanel extends Composite {
|
||||||
// check which kind of information we have to show
|
// check which kind of information we have to show
|
||||||
isRoot = information.isRoot();
|
isRoot = information.isRoot();
|
||||||
|
|
||||||
|
if(!isRoot){
|
||||||
|
|
||||||
|
// Build a tour example (please look at WidgetTour.html)
|
||||||
|
GCubeTour tour = new GCubeTour("tour-example", "user-statistics-portlet", 1, null, "VRE Tour");
|
||||||
|
tour.setShowPrevButton(true);
|
||||||
|
|
||||||
|
// add steps
|
||||||
|
TourStep firstStep = new TourStep(Placement.BOTTOM, "heading");
|
||||||
|
firstStep.setContent("Welcome to this VRE. Click next to see what if offers to you");
|
||||||
|
firstStep.setTitle("Welcome");
|
||||||
|
firstStep.centerXOffset();
|
||||||
|
firstStep.centerArrowOffset();
|
||||||
|
tour.addStep(firstStep);
|
||||||
|
|
||||||
|
// another
|
||||||
|
TourStep secondStep = new TourStep(Placement.RIGHT, "statistics-container");
|
||||||
|
secondStep.setContent("Here your main statistics are reported");
|
||||||
|
secondStep.setTitle("User Statistics");
|
||||||
|
tour.addStep(secondStep);
|
||||||
|
|
||||||
|
// another
|
||||||
|
TourStep thirdStep = new TourStep(Placement.BOTTOM, "shareUpdateDiv");
|
||||||
|
thirdStep.setContent("Here you can share your updates puttin text, attaching files (drag and drop can be used)"
|
||||||
|
+ " and much more!");
|
||||||
|
thirdStep.setTitle("Share Updates");
|
||||||
|
tour.addStep(thirdStep);
|
||||||
|
|
||||||
|
TourStep fourthStep = new TourStep(Placement.TOP, "newsfeedDIV");
|
||||||
|
fourthStep.setContent("Here you can see the most recent updates made by VRE's users");
|
||||||
|
fourthStep.setTitle("News");
|
||||||
|
tour.addStep(fourthStep);
|
||||||
|
|
||||||
|
TourStep fifthStep = new TourStep(Placement.RIGHT, "invite-friends-DIV");
|
||||||
|
fifthStep.setContent("Invite your friends that want to share information with us!");
|
||||||
|
fifthStep.setTitle("Invite Friends");
|
||||||
|
tour.addStep(fifthStep);
|
||||||
|
|
||||||
|
TourStep sixthStep = new TourStep(Placement.LEFT, "LoggedinDiv");
|
||||||
|
sixthStep.setContent("Here you can see the current VRE description");
|
||||||
|
sixthStep.setTitle("VRE Description");
|
||||||
|
tour.addStep(sixthStep);
|
||||||
|
|
||||||
|
// start the tour
|
||||||
|
tour.startTour();
|
||||||
|
}
|
||||||
|
|
||||||
if(!isRoot){
|
if(!isRoot){
|
||||||
|
|
||||||
// add the border to the panel and the VRE name (check for VRE name lenght)
|
// add the border to the panel and the VRE name (check for VRE name lenght)
|
||||||
|
@ -416,52 +462,6 @@ public class StatisticsPanel extends Composite {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!isRoot){
|
|
||||||
|
|
||||||
// Build a tour example (please look at WidgetTour.html)
|
|
||||||
GCubeTour tour = new GCubeTour("tour-example", "user-statistics-portlet", 1, null, "VRE Tour");
|
|
||||||
tour.setShowPrevButton(true);
|
|
||||||
|
|
||||||
// add steps
|
|
||||||
TourStep firstStep = new TourStep(Placement.BOTTOM, "heading");
|
|
||||||
firstStep.setContent("Welcome to this VRE. Click next to see what if offers to you");
|
|
||||||
firstStep.setTitle("Welcome");
|
|
||||||
firstStep.centerXOffset();
|
|
||||||
firstStep.centerArrowOffset();
|
|
||||||
tour.addStep(firstStep);
|
|
||||||
|
|
||||||
// another
|
|
||||||
TourStep secondStep = new TourStep(Placement.RIGHT, "statistics-container");
|
|
||||||
secondStep.setContent("Here your main statistics are reported");
|
|
||||||
secondStep.setTitle("User Statistics");
|
|
||||||
tour.addStep(secondStep);
|
|
||||||
|
|
||||||
// another
|
|
||||||
TourStep thirdStep = new TourStep(Placement.BOTTOM, "shareUpdateDiv");
|
|
||||||
thirdStep.setContent("Here you can share your updates puttin text, attaching files (drag and drop can be used)"
|
|
||||||
+ " and much more!");
|
|
||||||
thirdStep.setTitle("Share Updates");
|
|
||||||
tour.addStep(thirdStep);
|
|
||||||
|
|
||||||
TourStep fourthStep = new TourStep(Placement.TOP, "newsfeedDIV");
|
|
||||||
fourthStep.setContent("Here you can see the most recent updates made by VRE's users");
|
|
||||||
fourthStep.setTitle("News");
|
|
||||||
tour.addStep(fourthStep);
|
|
||||||
|
|
||||||
TourStep fifthStep = new TourStep(Placement.RIGHT, "invite-friends-DIV");
|
|
||||||
fifthStep.setContent("Invite your friends that want to share information with us!");
|
|
||||||
fifthStep.setTitle("Invite Friends");
|
|
||||||
tour.addStep(fifthStep);
|
|
||||||
|
|
||||||
TourStep sixthStep = new TourStep(Placement.LEFT, "LoggedinDiv");
|
|
||||||
sixthStep.setContent("Here you can see the current VRE description");
|
|
||||||
sixthStep.setTitle("VRE Description");
|
|
||||||
tour.addStep(sixthStep);
|
|
||||||
|
|
||||||
// start the tour
|
|
||||||
tour.startTour();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,8 +8,6 @@ import org.gcube.application.framework.core.session.ASLSession;
|
||||||
import org.gcube.application.framework.core.session.SessionManager;
|
import org.gcube.application.framework.core.session.SessionManager;
|
||||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||||
import org.gcube.common.scope.impl.ScopeBean;
|
|
||||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
|
||||||
import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
|
import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
|
||||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||||
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
||||||
|
@ -18,6 +16,8 @@ import org.gcube.portal.databook.shared.Feed;
|
||||||
import org.gcube.portlet.user.userstatisticsportlet.client.UserStatisticsService;
|
import org.gcube.portlet.user.userstatisticsportlet.client.UserStatisticsService;
|
||||||
import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean;
|
import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean;
|
||||||
import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation;
|
import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation;
|
||||||
|
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||||
|
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||||
|
@ -87,11 +87,12 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
||||||
private boolean isInfrastructureScope() {
|
private boolean isInfrastructureScope() {
|
||||||
boolean toReturn = false;
|
boolean toReturn = false;
|
||||||
try {
|
try {
|
||||||
ScopeBean scope = new ScopeBean(getASLSession().getScope());
|
GroupManager manager = new LiferayGroupManager();
|
||||||
toReturn = scope.is(Type.INFRASTRUCTURE);
|
long groupId = manager.getGroupIdFromInfrastructureScope(getASLSession().getScope());
|
||||||
|
toReturn = !manager.isVRE(groupId);
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
catch (NullPointerException e) {
|
catch (Exception e) {
|
||||||
_log.error("NullPointerException in isInfrastructureScope returning false");
|
_log.error("NullPointerException in isInfrastructureScope returning false");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue