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:
Costantino Perciante 2016-04-27 10:50:56 +00:00
parent a9053705dc
commit d82048a6bd
4 changed files with 58 additions and 58 deletions

View File

@ -4,6 +4,9 @@
<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/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="context-root" value="user-statistics"/>
</wb-module>

View File

@ -88,11 +88,6 @@
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslcore</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>com.google</groupId>
<artifactId>gwt-jsonmaker</artifactId>
@ -153,10 +148,11 @@
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>widget-tour</artifactId>
<artifactId>callout-tour</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
</dependencies>

View File

@ -165,6 +165,52 @@ public class StatisticsPanel extends Composite {
// check which kind of information we have to show
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){
// add the border to the panel and the VRE name (check for VRE name lenght)
@ -415,55 +461,9 @@ 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();
}
}
/**
* Bind for events of increment/decrement of user's posts coming from the news-feed portlet
*/

View File

@ -8,8 +8,6 @@ import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.common.homelibrary.home.HomeLibrary;
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.scopemanager.scopehelper.ScopeHelper;
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.shared.PostsStatsBean;
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 com.google.gwt.user.server.rpc.RemoteServiceServlet;
@ -87,11 +87,12 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
private boolean isInfrastructureScope() {
boolean toReturn = false;
try {
ScopeBean scope = new ScopeBean(getASLSession().getScope());
toReturn = scope.is(Type.INFRASTRUCTURE);
GroupManager manager = new LiferayGroupManager();
long groupId = manager.getGroupIdFromInfrastructureScope(getASLSession().getScope());
toReturn = !manager.isVRE(groupId);
return toReturn;
}
catch (NullPointerException e) {
catch (Exception e) {
_log.error("NullPointerException in isInfrastructureScope returning false");
return false;
}