added descriptors for SA

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/vre-members@99612 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-09-09 12:32:35 +00:00
parent 04c43c1ae1
commit 33dbde9dc9
13 changed files with 144 additions and 19 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/vre-members-0.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/vre-members-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -28,8 +28,8 @@
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes> <attributes>
<attribute name="owner.project.facets" value="java"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/vre-members-0.1.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/vre-members-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
jarsExcludedFromWebInfLib= jarsExcludedFromWebInfLib=
lastWarOutDir=/Users/massi/Documents/workspace/vre-members/target/vre-members-0.1.0-SNAPSHOT lastWarOutDir=/Users/massi/Documents/workspace/vre-members/target/vre-members-1.0.0-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

2
distro/INSTALL Normal file
View File

@ -0,0 +1,2 @@

7
distro/LICENSE Normal file
View File

@ -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.

6
distro/MAINTAINERS Normal file
View File

@ -0,0 +1,6 @@
Mantainers
-------
* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".

35
distro/README Normal file
View File

@ -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.

6
distro/changelog.xml Normal file
View File

@ -0,0 +1,6 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlet.user.vre-members.1-0-0"
date="2014-09-09">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

48
distro/descriptor.xml Normal file
View File

@ -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>

25
distro/profile.xml Normal file
View File

@ -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>

1
distro/svnpath.txt Normal file
View File

@ -0,0 +1 @@
${scm.url}

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>vre-members</artifactId> <artifactId>vre-members</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>0.1.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<name>gCube VRE Members Portlet</name> <name>gCube VRE Members Portlet</name>
<description> <description>
VRE Members display the members of the current VRE VRE Members display the members of the current VRE
@ -66,10 +66,6 @@
<artifactId>custom-portal-handler</artifactId> <artifactId>custom-portal-handler</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google</groupId>
<artifactId>gwt-jsonmaker</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.applicationsupportlayer</groupId> <groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslcore</artifactId> <artifactId>aslcore</artifactId>

View File

@ -31,7 +31,7 @@ import com.liferay.portal.service.UserLocalServiceUtil;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class MembersServiceImpl extends RemoteServiceServlet implements MembersService { public class MembersServiceImpl extends RemoteServiceServlet implements MembersService {
private static final Logger _log = LoggerFactory.getLogger(MembersServiceImpl.class); private static final Logger _log = LoggerFactory.getLogger(MembersServiceImpl.class);
/** /**
* the current ASLSession * the current ASLSession
* @return the session * @return the session
@ -42,7 +42,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
if (user == null) { if (user == null) {
_log.warn("USER IS NULL setting test.user and Running OUTSIDE PORTAL"); _log.warn("USER IS NULL setting test.user and Running OUTSIDE PORTAL");
user = getDevelopmentUser(); user = getDevelopmentUser();
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube"); SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube");
} }
return SessionManager.getInstance().getASLSession(sessionID, user); return SessionManager.getInstance().getASLSession(sessionID, user);
} }
@ -87,7 +87,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
GroupManager gm = new LiferayGroupManager(); GroupManager gm = new LiferayGroupManager();
ScopeBean sb = new ScopeBean(scope); ScopeBean sb = new ScopeBean(scope);
List<UserModel> users = null; List<UserModel> users = null;
if (sb.is(Type.INFRASTRUCTURE)) if (sb.is(Type.INFRASTRUCTURE))
users = um.listUsersByGroup(gm.getRootVO().getGroupId()); users = um.listUsersByGroup(gm.getRootVO().getGroupId());
else if (sb.is(Type.VRE)) { //must be in VRE else if (sb.is(Type.VRE)) { //must be in VRE
@ -108,7 +108,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
portalUsers.add(new BelongingUser(user.getScreenName(), user.getFullname(), thumbnailURL, lifeUser.getJobTitle(), lifeUser.getOpenId(), getUserProfileLink(user.getScreenName() ),lifeUser.getPortraitId() != 0)); portalUsers.add(new BelongingUser(user.getScreenName(), user.getFullname(), thumbnailURL, lifeUser.getJobTitle(), lifeUser.getOpenId(), getUserProfileLink(user.getScreenName() ),lifeUser.getPortraitId() != 0));
} }
} }
} }
else { //test users else { //test users
portalUsers.add(new BelongingUser("massimiliano.assante", "Test User #1", "1111", "headline", "isti", "",false)); portalUsers.add(new BelongingUser("massimiliano.assante", "Test User #1", "1111", "headline", "isti", "",false));
@ -129,11 +129,10 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
Collections.sort(portalUsers); Collections.sort(portalUsers);
return portalUsers; return portalUsers;
} }
private String getUserProfileLink(String username) { private String getUserProfileLink(String username) {
return GCubeSocialNetworking.USER_PROFILE_LINK return (username.compareTo(getASLSession().getUsername()) != 0) ?
+"?"+ "profile?"+ new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+new String(Base64.encodeBase64(username.getBytes()))
new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+ : "profile";
new String(Base64.encodeBase64(username.getBytes()));
} }
} }

View File

@ -3,7 +3,7 @@
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<set-property name="user.agent" value="gecko1_8,safari" /> <!-- <set-property name="user.agent" value="gecko1_8,safari" /> -->
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> <inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' /> <inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />