Branched vre-member to create new joinvre portlet
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@112290 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
commit
ed2e2b8cee
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/vre-members-1.0.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/vre-members-1.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>vre-members</name>
|
||||
<comment>vre-members project</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.maven.ide.eclipse.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp" />
|
||||
<classpathentry kind="con"
|
||||
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
|
||||
<classpathentry kind="con"
|
||||
path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true" />
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con"
|
||||
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
|
||||
<classpathentry kind="output" path="" />
|
||||
</classpath>
|
|
@ -0,0 +1,3 @@
|
|||
#Thu Jun 16 10:18:26 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
filesCopiedToWebInfLib=
|
|
@ -0,0 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
jarsExcludedFromWebInfLib=
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/vre-members/target/vre-members-1.0.1-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
|
@ -0,0 +1,5 @@
|
|||
#Thu Jun 16 11:14:17 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=gwt-servlet.jar
|
||||
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgc3JjL21haW4vd2ViYXBwXV0+PC9leHRyYS1hcmdzPjx2bS1hcmdzPjwhW0NEQVRBWy1YbXg1MTJtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLmNvbXBhbnkuU29tZU1vZHVsZTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
|
|
@ -0,0 +1,6 @@
|
|||
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/<project>=UTF-8
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="${module}">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<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="gcube-widgets-1.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="vre-members"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
</faceted-project>
|
|
@ -0,0 +1 @@
|
|||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1,2 @@
|
|||
disabled=06target
|
||||
eclipse.preferences.version=1
|
|
@ -0,0 +1,9 @@
|
|||
#Thu Sep 02 10:42:12 CEST 2010
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
fullBuildGoals=process-test-resources
|
||||
includeModules=false
|
||||
resolveWorkspaceProjects=true
|
||||
resourceFilterGoals=process-resources resources\\:testResources
|
||||
skipCompilerPlugin=true
|
||||
version=1
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/vre-members/src/test/java/org/gcube/portlets/user/vremembers/client/GwtTestVreMembers.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.user.vremembers.client.GwtTestVreMembers"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vre-members"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="true"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/vre-members/src/test/java/org/gcube/portlets/user/vremembers/client/GwtTestVreMembers.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.user.vremembers.client.GwtTestVreMembers"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vre-members"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
gCube System - License
|
||||
------------------------------------------------------------
|
||||
|
||||
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||
The software and documentation is provided by its authors/distributors "as is" and no expressed or
|
||||
implied warranty is given for its use, quality or fitness for a particular case.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
Mantainers
|
||||
-------
|
||||
|
||||
* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa,
|
||||
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
The gCube System - VRE Members Portlet
|
||||
------------------------------------------------------------
|
||||
|
||||
This work is partially funded by the European Commission in the
|
||||
context of the iMarine project (www.i-marine.eu), under the 1st call of FP7 IST priority.
|
||||
|
||||
Authors
|
||||
-------
|
||||
Massimiliano Assante
|
||||
*
|
||||
Version and Release Date
|
||||
------------------------
|
||||
Sep 2014
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
|
||||
Download information
|
||||
--------------------
|
||||
Source code is available from SVN:
|
||||
https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/notifications
|
||||
|
||||
Binaries can be downloaded from:
|
||||
http://software.d4science.research-infrastructures.eu/
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
Documentation is available on-line from the Projects Documentation Wiki:
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
|
@ -0,0 +1,11 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlet.user.vre-members.1-0-1"
|
||||
date="2014-12-13">
|
||||
<Change>Added Client scope handler, to set the scope from the client
|
||||
and help preventing the browser back button cache problem</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlet.user.vre-members.1-0-0"
|
||||
date="2014-09-09">
|
||||
<Change>First Release</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
|
@ -0,0 +1,48 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>servicearchive</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<baseDirectory>/</baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useDefaultExcludes>true</useDefaultExcludes>
|
||||
<includes>
|
||||
<include>README</include>
|
||||
<include>LICENSE</include>
|
||||
<include>INSTALL</include>
|
||||
<include>MAINTAINERS</include>
|
||||
<include>changelog.xml</include>
|
||||
</includes>
|
||||
<fileMode>755</fileMode>
|
||||
<filtered>true</filtered>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>target/apidocs</directory>
|
||||
<outputDirectory>/${artifactId}/doc/api</outputDirectory>
|
||||
<useDefaultExcludes>true</useDefaultExcludes>
|
||||
<fileMode>755</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${distroDirectory}/profile.xml</source>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>target/${build.finalName}.war</source>
|
||||
<outputDirectory>/${artifactId}</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${distroDirectory}/svnpath.txt</source>
|
||||
<outputDirectory>/${artifactId}</outputDirectory>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ID></ID>
|
||||
<Type>Service</Type>
|
||||
<Profile>
|
||||
<Description>gCube VRE Members Portlet</Description>
|
||||
<Class>PortletUser</Class>
|
||||
<Name>${artifactId}</Name>
|
||||
<Version>${version}</Version>
|
||||
<Packages>
|
||||
<Software>
|
||||
<Name>${artifactId}</Name>
|
||||
<Version>${version}</Version>
|
||||
<MavenCoordinates>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</MavenCoordinates>
|
||||
<Files>
|
||||
<File>target/${build.finalName}.war</File>
|
||||
</Files>
|
||||
</Software>
|
||||
</Packages>
|
||||
</Profile>
|
||||
</Resource>
|
|
@ -0,0 +1 @@
|
|||
${scm.url}
|
|
@ -0,0 +1,212 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>vre-members</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<name>gCube VRE Members Portlet</name>
|
||||
<description>
|
||||
VRE Members display the members of the current VRE
|
||||
</description>
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</connection>
|
||||
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</developerConnection>
|
||||
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</url>
|
||||
</scm>
|
||||
<properties>
|
||||
<!-- Convenience property to set the GWT version -->
|
||||
<gwtVersion>2.5.1</gwtVersion>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gcube-widgets</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>custom-portal-handler</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google</groupId>
|
||||
<artifactId>gwt-jsonmaker</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslcore</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>social-networking-library</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.portlet</groupId>
|
||||
<artifactId>portlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<!-- Generate compiled stuff in the folder used for developing mode -->
|
||||
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
|
||||
<plugins>
|
||||
<!-- GWT Maven Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<!-- <goal>test</goal> -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
|
||||
documentation at codehaus.org -->
|
||||
<configuration>
|
||||
<runTarget>VREMembers.html</runTarget>
|
||||
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Copy static web files before executing gwt:run -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>exploded</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<webappDirectory>${webappDirectory}</webappDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- SA Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>servicearchive</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-profile</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>profile.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.gcube.portlets.user.vremembers.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.vremembers.shared.BelongingUser;
|
||||
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("memberservice")
|
||||
public interface MembersService extends RemoteService {
|
||||
ArrayList<BelongingUser> getOrganizationUsers();
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.gcube.portlets.user.vremembers.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.vremembers.shared.BelongingUser;
|
||||
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
public interface MembersServiceAsync {
|
||||
|
||||
void getOrganizationUsers(AsyncCallback<ArrayList<BelongingUser>> callback);
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package org.gcube.portlets.user.vremembers.client;
|
||||
|
||||
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
|
||||
import org.gcube.portlets.user.vremembers.client.panels.VREMembersPanel;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.user.client.Window.Location;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
|
||||
/**
|
||||
* Entry point classes define <code>onModuleLoad()</code>.
|
||||
*/
|
||||
public class VreMembers implements EntryPoint {
|
||||
|
||||
public void onModuleLoad() {
|
||||
ClientScopeHelper.getService().setScope(Location.getHref(), new AsyncCallback<Boolean>() {
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
RootPanel.get("VRE-Members-Container").add(new VREMembersPanel());
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package org.gcube.portlets.user.vremembers.client.panels;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.vremembers.client.MembersService;
|
||||
import org.gcube.portlets.user.vremembers.client.MembersServiceAsync;
|
||||
import org.gcube.portlets.user.vremembers.client.ui.DisplayBadge;
|
||||
import org.gcube.portlets.user.vremembers.shared.BelongingUser;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.Grid;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HasAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
|
||||
public class VREMembersPanel extends Composite {
|
||||
/**
|
||||
* Create a remote service proxy to talk to the server-side Greeting service.
|
||||
*/
|
||||
private final MembersServiceAsync vreMemberService = GWT.create(MembersService.class);
|
||||
|
||||
public static final String loading = GWT.getModuleBaseURL() + "../images/members-loader.gif";
|
||||
|
||||
private Image loadingImage;
|
||||
|
||||
private VerticalPanel mainPanel = new VerticalPanel();
|
||||
public VREMembersPanel() {
|
||||
super();
|
||||
loadingImage = new Image(loading);
|
||||
mainPanel.add(loadingImage);
|
||||
showLoader();
|
||||
vreMemberService.getOrganizationUsers(new AsyncCallback<ArrayList<BelongingUser>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(ArrayList<BelongingUser> users) {
|
||||
mainPanel.clear();
|
||||
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
|
||||
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
|
||||
if (users == null || users.isEmpty()) {
|
||||
mainPanel.add(new HTML("<div class=\"frame\" style=\"font-size: 16px;\">Ops, something went wrong. Please <a href=\"javascript: location.reload();\">reload<a/> this page.</div>"));
|
||||
} else {
|
||||
Grid grid = new Grid(users.size()/4+1, 4);
|
||||
mainPanel.add(grid);
|
||||
|
||||
for (int i = 0; i < users.size(); i++) {
|
||||
grid.setWidget(i/4, i%4, new DisplayBadge(users.get(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
mainPanel.add(new HTML("<div class=\"nofeed-message\">" +
|
||||
"Sorry, looks like something is broken with the server connection<br> " +
|
||||
"Please check your connection and try refresh this page.</div>"));
|
||||
|
||||
}
|
||||
});
|
||||
initWidget(mainPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void showLoader() {
|
||||
mainPanel.clear();
|
||||
mainPanel.setWidth("100%");
|
||||
mainPanel.setHeight("300px");
|
||||
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
|
||||
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
mainPanel.add(loadingImage);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package org.gcube.portlets.user.vremembers.client.ui;
|
||||
|
||||
import org.gcube.portlets.user.vremembers.shared.BelongingUser;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.Window.Location;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class DisplayBadge extends Composite {
|
||||
protected final static String HEADLINE_TEXT = "Professional Headline";
|
||||
protected final static String ISTI_TEXT = "Company";
|
||||
|
||||
private static DisplayBadgeUiBinder uiBinder = GWT.create(DisplayBadgeUiBinder.class);
|
||||
|
||||
interface DisplayBadgeUiBinder extends UiBinder<Widget, DisplayBadge> {
|
||||
}
|
||||
public static final String avatar_default = GWT.getModuleBaseURL() + "../images/Avatar_default.png";
|
||||
public static final String loading = GWT.getModuleBaseURL() + "../images/avatarLoader.gif";
|
||||
|
||||
@UiField HTMLPanel mainPanel;
|
||||
@UiField Image avatarImage;
|
||||
@UiField HTML userFullName;
|
||||
|
||||
@UiField HTML headlineLabel;
|
||||
@UiField HTML institutionLabel;
|
||||
@UiField AnchorElement imageRedirect;
|
||||
|
||||
|
||||
private BelongingUser myUserInfo;
|
||||
|
||||
public DisplayBadge(BelongingUser user) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
avatarImage.setUrl(loading);
|
||||
mainPanel.addStyleName("profile-section");
|
||||
|
||||
myUserInfo = user;
|
||||
avatarImage.getElement().getParentElement().setAttribute("href", myUserInfo.getAvatarId());
|
||||
avatarImage.setUrl(myUserInfo.getAvatarId());
|
||||
userFullName.setHTML("<a class=\"person-link\" href=\""+user.getProfileLink()+"\">"+myUserInfo.getFullName()+"</a>");
|
||||
|
||||
|
||||
String head = (user.getHeadline() == null || user.getHeadline().compareTo("") == 0) ? "" : user.getHeadline();
|
||||
String isti = (user.getInstitution() == null || user.getInstitution().compareTo("") == 0) ? "" : user.getInstitution();
|
||||
headlineLabel.setText(head);
|
||||
institutionLabel.setText(isti);
|
||||
imageRedirect.setHref(user.getProfileLink());
|
||||
String title = "See profile of " + myUserInfo.getFullName();
|
||||
avatarImage.setTitle(title);
|
||||
userFullName.setTitle(title);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void showError(String message) {
|
||||
Window.alert("Failure: " + message);
|
||||
avatarImage.setSize("100px", "100px");
|
||||
avatarImage.setUrl(avatar_default);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:m="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements">
|
||||
<g:HTMLPanel ui:field="mainPanel" styleName="framed">
|
||||
<div class="photo-details">
|
||||
<a ui:field="imageRedirect" href="">
|
||||
<g:Image title="Profile Picture" styleName="user-photo" url=""
|
||||
ui:field="avatarImage" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-details">
|
||||
<g:HTML styleName="fullName" ui:field="userFullName"></g:HTML>
|
||||
<g:HTML styleName="headline" ui:field="headlineLabel"></g:HTML>
|
||||
<g:HTML styleName="institution" ui:field="institutionLabel"></g:HTML>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -0,0 +1,143 @@
|
|||
package org.gcube.portlets.user.vremembers.server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.gcube.application.framework.core.session.ASLSession;
|
||||
import org.gcube.application.framework.core.session.SessionManager;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portal.databook.client.GCubeSocialNetworking;
|
||||
import org.gcube.portlets.user.vremembers.client.MembersService;
|
||||
import org.gcube.portlets.user.vremembers.shared.BelongingUser;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.UserModel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
||||
/**
|
||||
* @author Massimiliano Assante, ISTI-CNR
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MembersServiceImpl extends RemoteServiceServlet implements MembersService {
|
||||
private static final Logger _log = LoggerFactory.getLogger(MembersServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 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 test.user and Running OUTSIDE PORTAL");
|
||||
user = getDevelopmentUser();
|
||||
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube");
|
||||
}
|
||||
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 = "massimiliano.assante";
|
||||
return user;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return true if you're running into the portal, false if in development
|
||||
*/
|
||||
private boolean isWithinPortal() {
|
||||
try {
|
||||
UserLocalServiceUtil.getService();
|
||||
return true;
|
||||
}
|
||||
catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
||||
_log.trace("Development Mode ON");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param session the Asl Session
|
||||
* @param withinPortal true when is on Liferay portal
|
||||
* @return the users belonging to the current organization (scope)
|
||||
*/
|
||||
@Override
|
||||
public ArrayList<BelongingUser> getOrganizationUsers() {
|
||||
ArrayList<BelongingUser> portalUsers = new ArrayList<BelongingUser>();
|
||||
String scope = getASLSession().getScope();
|
||||
if (scope == null)
|
||||
return portalUsers;
|
||||
try {
|
||||
if (isWithinPortal()) {
|
||||
UserManager um = new LiferayUserManager();
|
||||
GroupManager gm = new LiferayGroupManager();
|
||||
ScopeBean sb = new ScopeBean(scope);
|
||||
List<UserModel> users = null;
|
||||
|
||||
if (sb.is(Type.INFRASTRUCTURE)) {
|
||||
users = new ArrayList<UserModel>();
|
||||
return new ArrayList<BelongingUser>();
|
||||
}
|
||||
else if (sb.is(Type.VRE)) { //must be in VRE
|
||||
//get the name from the scope
|
||||
String orgName = scope.substring(scope.lastIndexOf("/")+1, scope.length());
|
||||
//ask the users
|
||||
users = um.listUsersByGroup(gm.getGroupId(orgName));
|
||||
}
|
||||
else {
|
||||
_log.error("Error, you must be in SCOPE VRE OR INFRASTURCTURE, you are in VO SCOPE returning no users");
|
||||
return portalUsers;
|
||||
}
|
||||
for (UserModel user : users) {
|
||||
if (user.getScreenName().compareTo("test.user") != 0) { //skip test.user
|
||||
String thumbnailURL = "";
|
||||
com.liferay.portal.model.User lifeUser = UserLocalServiceUtil.getUserByScreenName(OrganizationsUtil.getCompany().getCompanyId(), user.getScreenName());
|
||||
thumbnailURL = lifeUser.isMale() ? "/image/user_male_portrait?img_id="+lifeUser.getPortraitId() : "/image/user_female_portrait?img_id="+lifeUser.getPortraitId();
|
||||
portalUsers.add(new BelongingUser(user.getScreenName(), user.getFullname(), thumbnailURL, lifeUser.getJobTitle(), lifeUser.getOpenId(), getUserProfileLink(user.getScreenName() ),lifeUser.getPortraitId() != 0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else { //test users
|
||||
portalUsers.add(new BelongingUser("massimiliano.assante", "Test User #1", "1111", "headline", "isti", "",false));
|
||||
portalUsers.add(new BelongingUser("pino.assante", "Test Second User #2", "1111", "headline1", "istitution complex", "",false));
|
||||
portalUsers.add(new BelongingUser("pino.pino", "With Photo Third User", "1111", "hard worker", "acme Ltd", "",true));
|
||||
portalUsers.add(new BelongingUser("giorgi.giorgi", "Test Fourth User", "1111", "hard worker 3", "isti3", "",false));
|
||||
portalUsers.add(new BelongingUser("pinetti.giorgi", "Test Fifth User", "1111", "hard worker 4", "super acme Inc.", "",false));
|
||||
portalUsers.add(new BelongingUser("massimiliano.pinetti", "Test Sixth User", "1111", "hard worker the5th", "istiw", "", false));
|
||||
portalUsers.add(new BelongingUser("giorgi.assante", "Ninth Testing User", "1111", "hard worker the9th", "istiw9", "",false));
|
||||
portalUsers.add(new BelongingUser("massimiliano.giorgi", "Eighth Testing User", "1111", "hard worker the8th", "istiw56", "", false));
|
||||
portalUsers.add(new BelongingUser("giogio.giorgi", "Seventh Test User", "1111", "hard worker the7th", "istiw7", "", false));
|
||||
portalUsers.add(new BelongingUser("pino.pinetti", "Tenth Testing User Photoed", "1111", "hard worker the10th", "istiw777", "",true));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
_log.error("Error in server get all contacts ", e);
|
||||
}
|
||||
//users having photo go first
|
||||
Collections.sort(portalUsers);
|
||||
return portalUsers;
|
||||
}
|
||||
|
||||
private String getUserProfileLink(String username) {
|
||||
return (username.compareTo(getASLSession().getUsername()) != 0) ?
|
||||
"profile?"+ new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+new String(Base64.encodeBase64(username.getBytes()))
|
||||
: GCubeSocialNetworking.USER_PROFILE_LINK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
package org.gcube.portlets.user.vremembers.server.portlet;
|
||||
|
||||
import javax.portlet.GenericPortlet;
|
||||
import javax.portlet.ActionRequest;
|
||||
import javax.portlet.RenderRequest;
|
||||
import javax.portlet.ActionResponse;
|
||||
import javax.portlet.RenderResponse;
|
||||
import javax.portlet.PortletException;
|
||||
import java.io.IOException;
|
||||
import javax.portlet.PortletRequestDispatcher;
|
||||
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
|
||||
*/
|
||||
public class VREMembersPortlet extends GenericPortlet {
|
||||
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
|
||||
response.setContentType("text/html");
|
||||
ScopeHelper.setContext(request);
|
||||
PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/VREMembers_view.jsp");
|
||||
dispatcher.include(request, response);
|
||||
}
|
||||
|
||||
public void processAction(ActionRequest request, ActionResponse response)
|
||||
throws PortletException, IOException {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
package org.gcube.portlets.user.vremembers.shared;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Comparator;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class BelongingUser implements Serializable, Comparable<BelongingUser> {
|
||||
private String username;
|
||||
private String fullName;
|
||||
private String avatarId;
|
||||
private String headline;
|
||||
private String institution;
|
||||
private String profileLink;
|
||||
private boolean hasPhoto;
|
||||
|
||||
public BelongingUser(String username, String fullName, String avatarId,
|
||||
String headline, String institution, String profileLink, boolean hasPhoto) {
|
||||
super();
|
||||
this.username = username;
|
||||
this.fullName = fullName;
|
||||
this.avatarId = avatarId;
|
||||
this.headline = headline;
|
||||
this.institution = institution;
|
||||
this.hasPhoto = hasPhoto;
|
||||
this.profileLink = profileLink;
|
||||
|
||||
}
|
||||
|
||||
public BelongingUser() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
|
||||
public String getAvatarId() {
|
||||
return avatarId;
|
||||
}
|
||||
|
||||
|
||||
public void setAvatarId(String avatarId) {
|
||||
this.avatarId = avatarId;
|
||||
}
|
||||
|
||||
|
||||
public String getHeadline() {
|
||||
return headline;
|
||||
}
|
||||
|
||||
|
||||
public void setHeadline(String headline) {
|
||||
this.headline = headline;
|
||||
}
|
||||
|
||||
|
||||
public String getInstitution() {
|
||||
return institution;
|
||||
}
|
||||
|
||||
|
||||
public void setInstitution(String institution) {
|
||||
this.institution = institution;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasPhoto() {
|
||||
return hasPhoto;
|
||||
}
|
||||
|
||||
public void setHasPhoto(boolean hasPhoto) {
|
||||
this.hasPhoto = hasPhoto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getProfileLink() {
|
||||
return profileLink;
|
||||
}
|
||||
|
||||
public void setProfileLink(String profileLink) {
|
||||
this.profileLink = profileLink;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(BelongingUser o) {
|
||||
if (this.hasHeadline() && !o.hasHeadline()) {
|
||||
return -1;
|
||||
}
|
||||
if (!this.hasHeadline() && o.hasHeadline())
|
||||
return 1;
|
||||
|
||||
if ( (this.hasHeadline() && o.hasHeadline()) || ((!this.hasHeadline() && !o.hasHeadline())) ) {
|
||||
if (this.hasPhoto && !o.hasPhoto)
|
||||
return -1;
|
||||
if (!this.hasPhoto && o.hasPhoto)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
private boolean hasHeadline() {
|
||||
return (headline != null && headline.compareTo("") != 0);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
log4j.rootLogger=DEBUG, A1
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Print the date in ISO 8601 format
|
||||
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
|
||||
|
||||
# Print only messages of level TRACE or above in the package org.gcube
|
||||
log4j.logger.org.gcube=TRACE
|
||||
log4j.logger.org.gcube.application.framework.core.session=INFO
|
||||
log4j.logger.org.gcube.common.scope.impl.DefaultScopeProvider=ERROR
|
||||
log4j.logger.com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor=ERROR
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to='vremembers'>
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- <set-property name="user.agent" value="gecko1_8,safari" /> -->
|
||||
|
||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />
|
||||
<!-- Other module inherits -->
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.user.vremembers.client.VreMembers' />
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
|
||||
</module>
|
|
@ -0,0 +1,73 @@
|
|||
.framed {
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
width: 200px;
|
||||
height: 290px;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
background: #FFF;
|
||||
border-radius: 6px !important;
|
||||
-moz-border-radius: 6px !important;
|
||||
-webkit-border-radius: 6px !important;
|
||||
border: 1px solid #DBDBDB;
|
||||
}
|
||||
|
||||
.frame {
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
background: #FFF;
|
||||
border-radius: 6px !important;
|
||||
-moz-border-radius: 6px !important;
|
||||
-webkit-border-radius: 6px !important;
|
||||
border: 1px solid #DBDBDB;
|
||||
}
|
||||
|
||||
.user-photo {
|
||||
padding: 5px;
|
||||
border: 1px solid #E6E6E6;
|
||||
width: 180px;
|
||||
height: 175px;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.photo-details {
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
a.person-link {
|
||||
color: #444444;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
a.person-link,a.person-link:visited {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
font-size: 16x;
|
||||
text-decoration: none;
|
||||
color: #3B5998;
|
||||
}
|
||||
|
||||
a.person-link:hover {
|
||||
opacity: 0.8;
|
||||
font-size: 16x;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
.headline {
|
||||
font-size: 13px;
|
||||
color: #444444;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.institution {
|
||||
font-size: 11px;
|
||||
color: #444444;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<!doctype html>
|
||||
<!-- The DOCTYPE declaration above will set the -->
|
||||
<!-- browser's rendering engine into -->
|
||||
<!-- "Standards Mode". Replacing this declaration -->
|
||||
<!-- with a "Quirks Mode" doctype may lead to some -->
|
||||
<!-- differences in layout. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<!-- -->
|
||||
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||
<!-- -->
|
||||
<link type="text/css" rel="stylesheet" href="VreMembers.css">
|
||||
|
||||
<title>Vre Members Project</title>
|
||||
|
||||
<script type="text/javascript" src="vremembers/vremembers.nocache.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
|
||||
<noscript>
|
||||
<div
|
||||
style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
|
||||
Your web browser must have JavaScript enabled in order for this
|
||||
application to display correctly.</div>
|
||||
</noscript>
|
||||
<div id="VRE-Members-Container"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
|
||||
|
||||
<script type="text/javascript" language="javascript" src="<%=request.getContextPath()%>/vremembers/vremembers.nocache.js""></script>
|
||||
<div id="VRE-Members-Container"></div>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.0.0//EN" "http://www.liferay.com/dtd/liferay-display_6_0_0.dtd">
|
||||
|
||||
<display>
|
||||
<category name="gCube Social Apps">
|
||||
<portlet id="VREMembers" />
|
||||
</category>
|
||||
</display>
|
|
@ -0,0 +1,9 @@
|
|||
name=VREMembers
|
||||
module-group-id=liferay
|
||||
module-incremental-version=1
|
||||
tags=
|
||||
short-description=
|
||||
change-log=
|
||||
page-url=http://www.d4science.org
|
||||
author=D4Science.org
|
||||
licenses=EUPL
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_0_0.dtd">
|
||||
|
||||
<liferay-portlet-app>
|
||||
<portlet>
|
||||
<portlet-name>VREMembers</portlet-name>
|
||||
<layout-cacheable>false</layout-cacheable>
|
||||
<instanceable>false</instanceable>
|
||||
<ajaxable>false</ajaxable>
|
||||
<header-portlet-css>/VreMembers.css</header-portlet-css>
|
||||
</portlet>
|
||||
<role-mapper>
|
||||
<role-name>administrator</role-name>
|
||||
<role-link>Administrator</role-link>
|
||||
</role-mapper>
|
||||
<role-mapper>
|
||||
<role-name>guest</role-name>
|
||||
<role-link>Guest</role-link>
|
||||
</role-mapper>
|
||||
<role-mapper>
|
||||
<role-name>power-user</role-name>
|
||||
<role-link>Power User</role-link>
|
||||
</role-mapper>
|
||||
<role-mapper>
|
||||
<role-name>user</role-name>
|
||||
<role-link>User</role-link>
|
||||
</role-mapper>
|
||||
</liferay-portlet-app>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<portlet-app
|
||||
version="2.0"
|
||||
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
|
||||
>
|
||||
<portlet>
|
||||
<portlet-name>VREMembers</portlet-name>
|
||||
<display-name>VRE Members</display-name>
|
||||
<portlet-class>org.gcube.portlets.user.vremembers.server.portlet.VREMembersPortlet</portlet-class>
|
||||
<init-param>
|
||||
<name>view-jsp</name>
|
||||
<value>/view.jsp</value>
|
||||
</init-param>
|
||||
<expiration-cache>0</expiration-cache>
|
||||
<supports>
|
||||
<mime-type>text/html</mime-type>
|
||||
</supports>
|
||||
<portlet-info>
|
||||
<title>VRE Members</title>
|
||||
<short-title>VRE Members</short-title>
|
||||
<keywords>VRE Members</keywords>
|
||||
</portlet-info>
|
||||
<security-role-ref>
|
||||
<role-name>administrator</role-name>
|
||||
</security-role-ref>
|
||||
</portlet>
|
||||
</portlet-app>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app
|
||||
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
|
||||
<!-- Servlets -->
|
||||
<servlet>
|
||||
<servlet-name>greetServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.vremembers.server.MembersServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>greetServlet</servlet-name>
|
||||
<url-pattern>/vremembers/memberservice</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<url-pattern>/vremembers/scopeService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Default page to serve -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>VreMembers.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
Binary file not shown.
After Width: | Height: | Size: 997 B |
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module>
|
||||
<!-- Inherit our applications main module. -->
|
||||
<inherits name='org.gcube.portlets.user.vremembers.VreMembers' />
|
||||
|
||||
<!-- Specify the path to any remote services. -->
|
||||
<servlet path="/VreMembers/greet" class="org.gcube.portlets.user.vremembers.server.GreetingServiceImpl" />
|
||||
|
||||
</module>
|
Loading…
Reference in New Issue