diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..29e015f
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..d8746bc
--- /dev/null
+++ b/.project
@@ -0,0 +1,53 @@
+
+
+ rstudio-wrapper-portlet
+
+
+
+
+
+ org.eclipse.wst.jsdt.core.javascriptValidator
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ com.google.gdt.eclipse.core.webAppProjectValidator
+
+
+
+
+ com.google.gwt.eclipse.core.gwtProjectValidator
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+ com.google.gwt.eclipse.core.gwtNature
+
+
diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
new file mode 100644
index 0000000..b72a6a4
--- /dev/null
+++ b/.settings/.jsdtscope
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/com.google.appengine.eclipse.core.prefs b/.settings/com.google.appengine.eclipse.core.prefs
new file mode 100644
index 0000000..82c36af
--- /dev/null
+++ b/.settings/com.google.appengine.eclipse.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=
diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs
new file mode 100644
index 0000000..e9db345
--- /dev/null
+++ b/.settings/com.google.gdt.eclipse.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+lastWarOutDir=/Users/massi/Documents/workspace/rstudio-wrapper-portlet/target/rstudio-wrapper-portlet-1.0.0-SNAPSHOT
+warSrcDir=src/main/webapp
+warSrcDirIsOutput=false
diff --git a/.settings/com.google.gwt.eclipse.core.prefs b/.settings/com.google.gwt.eclipse.core.prefs
new file mode 100644
index 0000000..f23a752
--- /dev/null
+++ b/.settings/com.google.gwt.eclipse.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+entryPointModules=
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..160c7b8
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
+encoding//target/generated-sources/gwt=UTF-8
+encoding/=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..443e085
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.jst.jsp.core.prefs b/.settings/org.eclipse.jst.jsp.core.prefs
new file mode 100644
index 0000000..3a5c98d
--- /dev/null
+++ b/.settings/org.eclipse.jst.jsp.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+validateFragments=false
+validation.use-project-settings=true
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..77237b0
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
new file mode 100644
index 0000000..cc81385
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..0777079
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/distro/LICENSE b/distro/LICENSE
new file mode 100644
index 0000000..2d9616a
--- /dev/null
+++ b/distro/LICENSE
@@ -0,0 +1 @@
+${gcube.license}
\ No newline at end of file
diff --git a/distro/README b/distro/README
new file mode 100644
index 0000000..b13a32d
--- /dev/null
+++ b/distro/README
@@ -0,0 +1,62 @@
+The gCube System - ${name}
+--------------------------------------------------
+
+${description}
+
+
+${gcube.description}
+
+${gcube.funding}
+
+
+Version
+--------------------------------------------------
+
+${version} (${buildDate})
+
+Please see the file named "changelog.xml" in this directory for the release notes.
+
+
+Authors
+--------------------------------------------------
+
+* Massimiliano Assante (massimiliano.assante@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
+
+Maintainers
+-----------
+
+* Massimiliano Assante (massimiliano.assante@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
+
+Download information
+--------------------------------------------------
+
+Source code is available from SVN:
+ ${scm.url}
+
+Binaries can be downloaded from the gCube website:
+ ${gcube.website}
+
+
+Installation
+--------------------------------------------------
+
+Installation documentation is available on-line in the gCube Wiki:
+ ${gcube.wikiRoot}
+
+Documentation
+--------------------------------------------------
+
+Documentation is available on-line in the gCube Wiki:
+ ${gcube.wikiRoot}
+
+Support
+--------------------------------------------------
+
+Bugs and support requests can be reported in the gCube issue tracking tool:
+ ${gcube.issueTracking}
+
+
+Licensing
+--------------------------------------------------
+
+This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
\ No newline at end of file
diff --git a/distro/changelog.xml b/distro/changelog.xml
new file mode 100644
index 0000000..9910087
--- /dev/null
+++ b/distro/changelog.xml
@@ -0,0 +1,5 @@
+
+
+ First Release
+
+
diff --git a/distro/descriptor.xml b/distro/descriptor.xml
new file mode 100644
index 0000000..b3f5628
--- /dev/null
+++ b/distro/descriptor.xml
@@ -0,0 +1,31 @@
+
+ servicearchive
+
+ tar.gz
+
+ /
+
+
+ ${distroDirectory}
+ /
+ true
+
+ README
+ LICENSE
+ changelog.xml
+ profile.xml
+
+ 755
+ true
+
+
+
+
+
+ /${artifactId}
+
+
+
\ No newline at end of file
diff --git a/distro/profile.xml b/distro/profile.xml
new file mode 100644
index 0000000..51c3b6b
--- /dev/null
+++ b/distro/profile.xml
@@ -0,0 +1,25 @@
+
+
+
+ Service
+
+ ${description}
+ PortletUser
+ ${artifactId}
+ ${version}
+
+
+ ${artifactId}
+ ${version}
+
+ ${groupId}
+ ${artifactId}
+ ${version}
+
+
+ target/${build.finalName}.war
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..f7f09bd
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,152 @@
+
+
+
+ 4.0.0
+
+ maven-parent
+ org.gcube.tools
+ 1.0.0
+
+
+ org.gcube.portlets.user
+ rstudio-wrapper-portlet
+ war
+ 1.0.0-SNAPSHOT
+ GWT Maven Archetype
+
+
+
+ 2.7.0
+
+ 1.7
+ 1.7
+
+ UTF-8
+
+
+
+
+
+ com.google.gwt
+ gwt
+ ${gwtVersion}
+ pom
+ import
+
+
+ org.gcube.distribution
+ maven-portal-bom
+ LATEST
+ pom
+ import
+
+
+
+
+
+
+ com.google.gwt
+ gwt-servlet
+ provided
+
+
+ com.google.gwt
+ gwt-user
+ provided
+
+
+ com.google.gwt
+ gwt-dev
+ provided
+
+
+ org.gcube.applicationsupportlayer
+ aslcore
+ provided
+
+
+ org.gcube.portal
+ custom-portal-handler
+ provided
+
+
+ org.gcube.core
+ common-scope-maps
+ compile
+
+
+ org.gcube.data.analysis
+ r-connector-client
+ [2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)
+
+
+ org.gcube.common
+ authorization-client
+ provided
+
+
+ org.gcube.common
+ common-authorization
+ provided
+
+
+ com.liferay.portal
+ portal-service
+ provided
+
+
+ javax.portlet
+ portlet-api
+ provided
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ org.slf4j
+ slf4j-api
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
+
+
+
+
+
+ org.codehaus.mojo
+ gwt-maven-plugin
+ 2.7.0
+
+
+
+ compile
+ test
+ generateAsync
+
+
+
+
+
+ RStudioWrapper.html
+
+ org.gcube.portlets.user.rstudio_wrapper_portlet.RStudioWrapper
+
+
+
+
+
+
+
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages.java
new file mode 100644
index 0000000..5a26acc
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages.java
@@ -0,0 +1,10 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.client;
+
+public interface Messages extends com.google.gwt.i18n.client.Messages {
+
+ @DefaultMessage("Enter your name")
+ String nameField();
+
+ @DefaultMessage("Send")
+ String sendButton();
+}
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioService.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioService.java
new file mode 100644
index 0000000..e701803
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioService.java
@@ -0,0 +1,12 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
+
+/**
+ * The client side stub for the RPC service.
+ */
+@RemoteServiceRelativePath("greet")
+public interface RStudioService extends RemoteService {
+ String retrieveRStudioSecureURL() throws IllegalArgumentException;
+}
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioWrapper.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioWrapper.java
new file mode 100644
index 0000000..646b185
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/client/RStudioWrapper.java
@@ -0,0 +1,54 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.Window.Location;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.RootPanel;
+
+/**
+ * Entry point classes define onModuleLoad().
+ */
+public class RStudioWrapper implements EntryPoint {
+
+ /**
+ * Create a remote service proxy to talk to the server-side Greeting service.
+ */
+ private final RStudioServiceAsync rstudioService = GWT.create(RStudioService.class);
+ private final String CONTAINER_DIV = "RStudio-wrapper-DIV";
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad() {
+ final JavaScriptObject window = newWindow("", "", "");
+ rstudioService.retrieveRStudioSecureURL(new AsyncCallback() {
+
+ @Override
+ public void onFailure(Throwable caught) {
+ RootPanel.get(CONTAINER_DIV).add(new HTML("There were problems contacting the server, please report this issue: " + caught.getMessage()));
+
+ }
+
+ @Override
+ public void onSuccess(String result) {
+ RootPanel.get(CONTAINER_DIV).add(new HTML("If no new window appears, please click here to open RStudio"));
+ setWindowTarget(window, result);
+ }
+ });
+
+
+
+ }
+ private static native JavaScriptObject newWindow(String url, String name, String features)/*-{
+ var window = $wnd.open(url, name, features);
+ return window;
+}-*/;
+
+ private static native void setWindowTarget(JavaScriptObject window, String target)/*-{
+ window.location = target;
+}-*/;
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/RStudioServiceImpl.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/RStudioServiceImpl.java
new file mode 100644
index 0000000..fca7e08
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/RStudioServiceImpl.java
@@ -0,0 +1,76 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.server;
+
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gcube.application.framework.core.session.ASLSession;
+import org.gcube.application.framework.core.session.SessionManager;
+import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
+import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
+import org.gcube.portlets.user.rstudio_wrapper_portlet.client.RStudioService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.gcube.common.authorization.client.Constants.authorizationService;
+import static org.gcube.data.analysis.rconnector.client.Constants.rConnector;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+/**
+ * The server side implementation of the RPC service.
+ */
+@SuppressWarnings("serial")
+public class RStudioServiceImpl extends RemoteServiceServlet implements RStudioService {
+
+ private static final Logger _log = LoggerFactory.getLogger(RStudioServiceImpl.class);
+
+ public static final String TEST_SCOPE = "/gcube/devsec/devVRE";
+ /**
+ * the current ASLSession
+ * @return the session
+ */
+ private ASLSession getASLSession() {
+ String sessionID = this.getThreadLocalRequest().getSession().getId();
+ String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
+ if (user == null) {
+ _log.warn("USER IS NULL setting testing user and Running OUTSIDE PORTAL");
+ user = getDevelopmentUser();
+ SessionManager.getInstance().getASLSession(sessionID, user).setScope(TEST_SCOPE);
+ }
+ return SessionManager.getInstance().getASLSession(sessionID, user);
+ }
+ /**
+ * when packaging test will fail if the user is not set to test.user
+ * @return .
+ */
+ public String getDevelopmentUser() {
+ String user = "test.user";
+ user = "costantino.perciante";
+ return user;
+ }
+ private final static String DEFAULT_ROLE = "OrganizationMember";
+ @Override
+ public String retrieveRStudioSecureURL() throws IllegalArgumentException {
+ _log.debug("retrieveRStudioSecureURL()");
+
+ String toReturn = "error retrieving token";
+ List userRoles = new ArrayList<>();
+ userRoles.add(DEFAULT_ROLE);
+ _log.debug("calling authorizationService() for user " + getASLSession().getUsername());
+ String token = authorizationService().build().generate(getASLSession().getUsername(), userRoles);
+ // String token = getASLSession().getSecurityToken();
+ _log.debug("token="+token);
+ SecurityTokenProvider.instance.set(token);
+ getASLSession().getSecurityToken();
+ try {
+ _log.debug("calling rConnector with token = "+token);
+ toReturn = rConnector().build().connect().toURL().toExternalForm();
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ _log.debug("returning URL from rConnector = "+toReturn);
+ return toReturn;
+ }
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/portlet/RProxyPortlet.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/portlet/RProxyPortlet.java
new file mode 100644
index 0000000..29b338c
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/server/portlet/RProxyPortlet.java
@@ -0,0 +1,30 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.server.portlet;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RProxyPortlet extends GenericPortlet {
+ private static final Logger _log = LoggerFactory.getLogger(RProxyPortlet.class);
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
+ response.setContentType("text/html");
+ ScopeHelper.setContext(request);
+ _log.debug(" RProxyPortlet context set");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/RStudio_view.jsp");
+ dispatcher.include(request, response);
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response)
+ throws PortletException, IOException {
+ }
+}
diff --git a/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/shared/FieldVerifier.java b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/shared/FieldVerifier.java
new file mode 100644
index 0000000..52e941c
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/rstudio_wrapper_portlet/shared/FieldVerifier.java
@@ -0,0 +1,42 @@
+package org.gcube.portlets.user.rstudio_wrapper_portlet.shared;
+
+/**
+ *
+ * FieldVerifier validates that the name the user enters is valid.
+ *
+ *
+ * This class is in the shared packing because we use it in both
+ * the client code and on the server. On the client, we verify that the name is
+ * valid before sending an RPC request so the user doesn't have to wait for a
+ * network round trip to get feedback. On the server, we verify that the name is
+ * correct to ensure that the input is correct regardless of where the RPC
+ * originates.
+ *
+ *
+ * When creating a class that is used on both the client and the server, be sure
+ * that all code is translatable and does not use native JavaScript. Code that
+ * is note translatable (such as code that interacts with a database or the file
+ * system) cannot be compiled into client side JavaScript. Code that uses native
+ * JavaScript (such as Widgets) cannot be run on the server.
+ *
+ */
+public class FieldVerifier {
+
+ /**
+ * Verifies that the specified name is valid for our service.
+ *
+ * In this example, we only require that the name is at least four
+ * characters. In your application, you can use more complex checks to ensure
+ * that usernames, passwords, email addresses, URLs, and other fields have the
+ * proper syntax.
+ *
+ * @param name the name to validate
+ * @return true if valid, false if invalid
+ */
+ public static boolean isValidName(String name) {
+ if (name == null) {
+ return false;
+ }
+ return name.length() > 3;
+ }
+}
diff --git a/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapper.gwt.xml b/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapper.gwt.xml
new file mode 100644
index 0000000..707ef00
--- /dev/null
+++ b/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapper.gwt.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages_fr.properties b/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages_fr.properties
new file mode 100644
index 0000000..b4a7627
--- /dev/null
+++ b/src/main/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/client/Messages_fr.properties
@@ -0,0 +1,2 @@
+sendButton = Envoyer
+nameField = Entrez votre nom
\ No newline at end of file
diff --git a/src/main/webapp/RStudioWrapper.css b/src/main/webapp/RStudioWrapper.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/main/webapp/RStudioWrapper.html b/src/main/webapp/RStudioWrapper.html
new file mode 100644
index 0000000..53b600e
--- /dev/null
+++ b/src/main/webapp/RStudioWrapper.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Web Application Starter Project
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/RStudio_view.jsp b/src/main/webapp/WEB-INF/jsp/RStudio_view.jsp
new file mode 100644
index 0000000..8f8d6ca
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jsp/RStudio_view.jsp
@@ -0,0 +1,6 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/liferay-display.xml b/src/main/webapp/WEB-INF/liferay-display.xml
new file mode 100644
index 0000000..7026ac9
--- /dev/null
+++ b/src/main/webapp/WEB-INF/liferay-display.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
new file mode 100644
index 0000000..701d923
--- /dev/null
+++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
@@ -0,0 +1,9 @@
+name=RStudioWrapper
+module-group-id=liferay
+module-incremental-version=1
+tags=
+short-description=
+change-log=
+page-url=http://www.gcube-system.org
+author=Massimiliano Assante
+licenses=EUPL
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/liferay-portlet.xml b/src/main/webapp/WEB-INF/liferay-portlet.xml
new file mode 100644
index 0000000..afcabdc
--- /dev/null
+++ b/src/main/webapp/WEB-INF/liferay-portlet.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ RStudioWrapper
+ false
+ false
+ false
+
+
+ administrator
+ Administrator
+
+
+ guest
+ Guest
+
+
+ power-user
+ Power User
+
+
+ user
+ User
+
+
diff --git a/src/main/webapp/WEB-INF/portlet.xml b/src/main/webapp/WEB-INF/portlet.xml
new file mode 100644
index 0000000..be09bf6
--- /dev/null
+++ b/src/main/webapp/WEB-INF/portlet.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ RStudioWrapper
+ RStudio Wrapper
+ org.gcube.portlets.user.rstudio_wrapper_portlet.server.portlet.RProxyPortlet
+
+ view-jsp
+ /view.jsp
+
+ 0
+
+ text/html
+
+
+ RStudio Wrapper
+ RStudio Wrapper
+ RStudio Wrapper
+
+
+ administrator
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..23e8a38
--- /dev/null
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+ greetServlet
+ org.gcube.portlets.user.rstudio_wrapper_portlet.server.RStudioServiceImpl
+
+
+
+ greetServlet
+ /rstudiowrapper/greet
+
+
+
+
+ RStudioWrapper.html
+
+
+
diff --git a/src/test/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapperJUnit.gwt.xml b/src/test/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapperJUnit.gwt.xml
new file mode 100644
index 0000000..190597d
--- /dev/null
+++ b/src/test/resources/org/gcube/portlets/user/rstudio_wrapper_portlet/RStudioWrapperJUnit.gwt.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+