Difference between revisions of "Publish App News in User Feeds (Social Portal)"

From Gcube Wiki
Jump to: navigation, search
Line 13: Line 13:
  
 
* Button
 
* Button
* DialogBox
+
* Dialog
 +
 
 +
==Adding a gCube Quick tour guide to your gCube Portlet Project==
 +
 
 +
* Get the latest Application News Widget from Maven [http://maven.research-infrastructures.eu/nexus/index.html#nexus-search;quick~news-widget go Maven (Nexus)]
 +
** or add this dependency to your maven project (check if there is a newer version than 0.1.0 of course)
 +
<source lang="xml">
 +
<dependency>
 +
  <groupId>org.gube.portlets.user</groupId>
 +
  <artifactId>application-news-widget</artifactId>
 +
  <version>0.1.0-SNAPSHOT</version>
 +
</dependency>
 +
</source>
 +
 
 +
If you want to test your portlet within eclipse then you will have to use/download the version with dependencies:
 +
<source lang="xml">
 +
<dependency>
 +
  <groupId>org.gube.portlets.user</groupId>
 +
  <artifactId>application-news-widget</artifactId>
 +
  <version>0.1.0-SNAPSHOT</version>
 +
  <classifier>jar-with-dependencies</classifier>
 +
</dependency>
 +
</source>
 +
 
 +
 
 +
* Download the latest jar from here: [http://dl.dropbox.com/u/15737233/Portal-Bundle%20files/gcube-quicktour.jar gcube-quicktour.jar] and add it to your build path.
 +
* Add the following to your project .gwt.xml file
 +
<source lang="xml">
 +
<!-- inherits GCUBE Quick tour -->
 +
<inherits name='org.gcube.portlets.user.guidedtour.GuidedTour' />
 +
</source>
 +
 
 +
* Add the following to your project web.xml file (Replace $YOUR_SERVLET_URL_PATTERN with your actual servlet url patter value)
 +
<source lang="xml">
 +
<!-- quicktourServlet -->
 +
<servlet>
 +
<servlet-name>quicktourServlet</servlet-name>
 +
<servlet-class>org.gcube.portlets.user.guidedtour.server.TourServiceImpl</servlet-class>
 +
</servlet>
 +
 
 +
<servlet-mapping>
 +
<servlet-name>quicktourServlet</servlet-name>
 +
<url-pattern>/$YOUR_SERVLET_URL_PATTERN/quicktourServlet</url-pattern>
 +
</servlet-mapping>
 +
</source>
 +
 
 +
You are ready to use it.
  
 
===gCube Application News Widget - Button way ===
 
===gCube Application News Widget - Button way ===
Line 20: Line 66:
  
 
[[File:PostNews.png]]
 
[[File:PostNews.png]]
 +
 +
When the user clicks on the button its handler will open the DialogBox with a preview for the news you are posting like in the example below:
 +
 +
[[File:FakeNews.png]]
 +
 +
If you don't want to use the button then skip this section and go to Dialog way below.
 +
 +
 +
 +
 +
===gCube Application News Widget - Dialog way ===

Revision as of 20:10, 20 December 2012

gCube Application News Widget

gCube Application News Widget is a customizable button or dialogBox that can be loaded when your portlet wants to post News to the users News Feed (belonging to the VRE where your portlet is deployed).

The generate feed will look like the example below in all the Users News Feed registered where you portlet is deployed:

  • example:

Fake-Aquamaps.png

You have many options for posting a News from within your application, you can use the ASL Social LIbrary and do it your own, see example here or you can do it through this Widget.

Alternatively you can exploit this widget, there are 2 ways to exploit it, depending on your needs:

  • Button
  • Dialog

Adding a gCube Quick tour guide to your gCube Portlet Project

  • Get the latest Application News Widget from Maven go Maven (Nexus)
    • or add this dependency to your maven project (check if there is a newer version than 0.1.0 of course)
<dependency>
  <groupId>org.gube.portlets.user</groupId>
  <artifactId>application-news-widget</artifactId>
  <version>0.1.0-SNAPSHOT</version>
</dependency>

If you want to test your portlet within eclipse then you will have to use/download the version with dependencies:

<dependency>
  <groupId>org.gube.portlets.user</groupId>
  <artifactId>application-news-widget</artifactId>
  <version>0.1.0-SNAPSHOT</version>
  <classifier>jar-with-dependencies</classifier>
</dependency>


  • Download the latest jar from here: gcube-quicktour.jar and add it to your build path.
  • Add the following to your project .gwt.xml file
<!-- inherits GCUBE Quick tour -->
<inherits name='org.gcube.portlets.user.guidedtour.GuidedTour' />
  • Add the following to your project web.xml file (Replace $YOUR_SERVLET_URL_PATTERN with your actual servlet url patter value)
	<!-- quicktourServlet -->
	<servlet>
		<servlet-name>quicktourServlet</servlet-name>
		<servlet-class>org.gcube.portlets.user.guidedtour.server.TourServiceImpl</servlet-class>
	</servlet>
 
	<servlet-mapping>
		<servlet-name>quicktourServlet</servlet-name>
		<url-pattern>/$YOUR_SERVLET_URL_PATTERN/quicktourServlet</url-pattern>
	</servlet-mapping>

You are ready to use it.

gCube Application News Widget - Button way

The Button way it's just a simple button that you add into your gwt web application, you need to specify some simple parameters and it will do everything for you. This is how it will look like into your WebApp:

PostNews.png

When the user clicks on the button its handler will open the DialogBox with a preview for the news you are posting like in the example below:

FakeNews.png

If you don't want to use the button then skip this section and go to Dialog way below.



gCube Application News Widget - Dialog way