From 33dbde9dc92042288b033fb28598d3a7e5588629 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Tue, 9 Sep 2014 12:32:35 +0000 Subject: [PATCH] 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 --- .classpath | 6 +-- .settings/com.google.gdt.eclipse.core.prefs | 2 +- distro/INSTALL | 2 + distro/LICENSE | 7 +++ distro/MAINTAINERS | 6 +++ distro/README | 35 ++++++++++++++ distro/changelog.xml | 6 +++ distro/descriptor.xml | 48 +++++++++++++++++++ distro/profile.xml | 25 ++++++++++ distro/svnpath.txt | 1 + pom.xml | 6 +-- .../vremembers/server/MembersServiceImpl.java | 17 ++++--- .../user/vremembers/VreMembers.gwt.xml | 2 +- 13 files changed, 144 insertions(+), 19 deletions(-) create mode 100644 distro/INSTALL create mode 100644 distro/LICENSE create mode 100644 distro/MAINTAINERS create mode 100644 distro/README create mode 100644 distro/changelog.xml create mode 100644 distro/descriptor.xml create mode 100644 distro/profile.xml create mode 100644 distro/svnpath.txt diff --git a/.classpath b/.classpath index 8844579..fa1d908 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -28,8 +28,8 @@ - + - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index 107fda2..3cdae2a 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 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 warSrcDirIsOutput=false diff --git a/distro/INSTALL b/distro/INSTALL new file mode 100644 index 0000000..139597f --- /dev/null +++ b/distro/INSTALL @@ -0,0 +1,2 @@ + + diff --git a/distro/LICENSE b/distro/LICENSE new file mode 100644 index 0000000..cdb5851 --- /dev/null +++ b/distro/LICENSE @@ -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. + diff --git a/distro/MAINTAINERS b/distro/MAINTAINERS new file mode 100644 index 0000000..680cebb --- /dev/null +++ b/distro/MAINTAINERS @@ -0,0 +1,6 @@ +Mantainers +------- + +* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa, + Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo". + diff --git a/distro/README b/distro/README new file mode 100644 index 0000000..0aad29e --- /dev/null +++ b/distro/README @@ -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. diff --git a/distro/changelog.xml b/distro/changelog.xml new file mode 100644 index 0000000..9f6a20d --- /dev/null +++ b/distro/changelog.xml @@ -0,0 +1,6 @@ + + + First Release + + diff --git a/distro/descriptor.xml b/distro/descriptor.xml new file mode 100644 index 0000000..4efc827 --- /dev/null +++ b/distro/descriptor.xml @@ -0,0 +1,48 @@ + + servicearchive + + tar.gz + + / + + + ${distroDirectory} + / + true + + README + LICENSE + INSTALL + MAINTAINERS + changelog.xml + + 755 + true + + + target/apidocs + /${artifactId}/doc/api + true + 755 + + + + + ${distroDirectory}/profile.xml + ./ + true + + + target/${build.finalName}.war + /${artifactId} + + + ${distroDirectory}/svnpath.txt + /${artifactId} + true + + + \ No newline at end of file diff --git a/distro/profile.xml b/distro/profile.xml new file mode 100644 index 0000000..ee9da4e --- /dev/null +++ b/distro/profile.xml @@ -0,0 +1,25 @@ + + + + Service + + gCube VRE Members Portlet + PortletUser + ${artifactId} + ${version} + + + ${artifactId} + ${version} + + ${groupId} + ${artifactId} + ${version} + + + target/${build.finalName}.war + + + + + diff --git a/distro/svnpath.txt b/distro/svnpath.txt new file mode 100644 index 0000000..edacb04 --- /dev/null +++ b/distro/svnpath.txt @@ -0,0 +1 @@ +${scm.url} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 029d6b8..47429fa 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user vre-members war - 0.1.0-SNAPSHOT + 1.0.0-SNAPSHOT gCube VRE Members Portlet VRE Members display the members of the current VRE @@ -66,10 +66,6 @@ custom-portal-handler provided - - com.google - gwt-jsonmaker - org.gcube.applicationsupportlayer aslcore diff --git a/src/main/java/org/gcube/portlets/user/vremembers/server/MembersServiceImpl.java b/src/main/java/org/gcube/portlets/user/vremembers/server/MembersServiceImpl.java index cc2fed7..e04fe6e 100644 --- a/src/main/java/org/gcube/portlets/user/vremembers/server/MembersServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/vremembers/server/MembersServiceImpl.java @@ -31,7 +31,7 @@ import com.liferay.portal.service.UserLocalServiceUtil; @SuppressWarnings("serial") public class MembersServiceImpl extends RemoteServiceServlet implements MembersService { private static final Logger _log = LoggerFactory.getLogger(MembersServiceImpl.class); - + /** * the current ASLSession * @return the session @@ -42,7 +42,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS if (user == null) { _log.warn("USER IS NULL setting test.user and Running OUTSIDE PORTAL"); user = getDevelopmentUser(); - SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube"); + SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube"); } return SessionManager.getInstance().getASLSession(sessionID, user); } @@ -87,7 +87,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS GroupManager gm = new LiferayGroupManager(); ScopeBean sb = new ScopeBean(scope); List users = null; - + if (sb.is(Type.INFRASTRUCTURE)) users = um.listUsersByGroup(gm.getRootVO().getGroupId()); 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)); } } - + } else { //test users 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); return portalUsers; } - + private String getUserProfileLink(String username) { - return GCubeSocialNetworking.USER_PROFILE_LINK - +"?"+ - new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+ - new String(Base64.encodeBase64(username.getBytes())); + return (username.compareTo(getASLSession().getUsername()) != 0) ? + "profile?"+ new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+new String(Base64.encodeBase64(username.getBytes())) + : "profile"; } } diff --git a/src/main/resources/org/gcube/portlets/user/vremembers/VreMembers.gwt.xml b/src/main/resources/org/gcube/portlets/user/vremembers/VreMembers.gwt.xml index 67e2250..21b714d 100644 --- a/src/main/resources/org/gcube/portlets/user/vremembers/VreMembers.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/vremembers/VreMembers.gwt.xml @@ -3,7 +3,7 @@ - +