Migrated to Liferay 6.2
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@128919 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c0d9f6fea0
commit
cc022f3cf1
|
@ -1,7 +1,12 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="portlets-widgets.workspace-explorer.1-4-0"
|
||||
date="2016-05-31">
|
||||
<Change>[Feature #4128] Migration to Liferay 6.2</Change>
|
||||
</Changeset>
|
||||
<Changeset component="portlets-widgets.workspace-explorer.1-3-0"
|
||||
date="2016-05-04">
|
||||
<Change>[Feature #2546] Endow Workspace Resources Explorer with filtering and display features</Change>
|
||||
<Change>[Feature #2546] Endow Workspace Resources Explorer with
|
||||
filtering and display features</Change>
|
||||
</Changeset>
|
||||
<Changeset component="portlets-widgets.workspace-explorer.1-2-1"
|
||||
date="2016-03-22">
|
||||
|
|
28
pom.xml
28
pom.xml
|
@ -10,7 +10,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>workspace-explorer</artifactId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>1.4.0-SNAPSHOT</version>
|
||||
<name>gCube Workspace Explorer</name>
|
||||
<description>
|
||||
gCube Workspace Explorer widget allows to navigate (gCube) Workspace
|
||||
|
@ -38,7 +38,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>2.6.0-SNAPSHOT</version>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
<exclusions>
|
||||
|
@ -53,19 +53,6 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>xerces</groupId> -->
|
||||
<!-- <artifactId>xerces</artifactId> -->
|
||||
<!-- <version>2.4.0</version> -->
|
||||
<!-- <scope>compile</scope> -->
|
||||
<!-- </dependency> -->
|
||||
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>com.thoughtworks.xstream</groupId> -->
|
||||
<!-- <artifactId>xstream</artifactId> -->
|
||||
<!-- <version>1.4.7</version> -->
|
||||
<!-- </dependency> -->
|
||||
|
||||
<!-- Google Web Toolkit (GWT) -->
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
|
@ -129,7 +116,14 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
<scope>compile</scope>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- LOGGER -->
|
||||
|
@ -153,8 +147,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package org.gcube.portlets.widgets.wsexplorer.server;
|
||||
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementPortalException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.UserModel;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
@ -19,7 +18,7 @@ import com.liferay.portal.service.UserLocalServiceUtil;
|
|||
* Jun 30, 2015
|
||||
*/
|
||||
public class UserUtil {
|
||||
|
||||
|
||||
private static UserManager um = new LiferayUserManager();
|
||||
private static Logger logger = org.slf4j.LoggerFactory.getLogger(UserUtil.class);
|
||||
|
||||
|
@ -33,37 +32,35 @@ public class UserUtil {
|
|||
logger.trace("Get user full name for: "+portalLogin);
|
||||
if(portalLogin==null)
|
||||
return "";
|
||||
|
||||
|
||||
if (isWithinPortal()) { //INTO PORTAL
|
||||
UserModel curr = null;
|
||||
GCubeUser curr = null;
|
||||
try {
|
||||
try {
|
||||
curr = um.getUserByScreenName(portalLogin);
|
||||
curr = um.getUserByUsername(portalLogin);
|
||||
} catch (UserManagementSystemException e) {
|
||||
logger.error("An error occurred in getUserFullName "+e,e);
|
||||
logger.error("An error occurred in getUserByUsername "+e,e);
|
||||
} catch (UserRetrievalFault e) {
|
||||
logger.error("An error occurred in getUserFullName "+e,e);
|
||||
logger.error("An error occurred in getUserByUsername "+e,e);
|
||||
}
|
||||
} catch (UserManagementPortalException ume) {
|
||||
logger.error("An error occurred in getUserFullName "+ume,ume);
|
||||
}catch (Exception e) {
|
||||
logger.error("An error occurred in getUserFullName "+e,e);
|
||||
logger.error("An error occurred in getUserByUsername "+e,e);
|
||||
logger.warn("Return portal login "+portalLogin);
|
||||
return portalLogin;
|
||||
}
|
||||
|
||||
|
||||
if (curr != null)
|
||||
return curr.getFullname();
|
||||
return curr.getFullname();
|
||||
}else{
|
||||
logger.trace("DEVELOPEMENT MODE ON");
|
||||
logger.trace("Returning portal login: "+portalLogin);
|
||||
return portalLogin;
|
||||
}
|
||||
|
||||
|
||||
logger.trace("Returning portal login: "+portalLogin);
|
||||
return portalLogin;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if is within portal.
|
||||
*
|
||||
|
@ -73,10 +70,10 @@ public class UserUtil {
|
|||
try {
|
||||
UserLocalServiceUtil.getService();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.trace("Is within portal: no! Development Mode ON");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue