From 4a5027657ca8a07feb11685344552f1a94888d9a Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 23 Jun 2016 15:33:38 +0000 Subject: [PATCH] refs:4408: org.gcube.portlets-user.tabular-data-expression-widget.1-8-0 https://support.d4science.org/issues/4408 Updated to Liferay 6.2 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@129382 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 +++--- .settings/org.eclipse.wst.common.component | 2 +- ...org.eclipse.wst.common.project.facet.core.xml | 1 - distro/changelog.xml | 4 ++++ pom.xml | 2 +- .../server/CExpressionMapServlet.java | 14 ++++++++++++++ .../server/ExpressionServiceImpl.java | 16 +++++++++++++++- 7 files changed, 38 insertions(+), 7 deletions(-) diff --git a/.classpath b/.classpath index 6e3e0a9..a31d5dc 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -32,5 +32,5 @@ - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index ba09c09..b87a383 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,7 +4,7 @@ - + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index fffd28a..4045d87 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -4,5 +4,4 @@ - diff --git a/distro/changelog.xml b/distro/changelog.xml index 9bd9605..50391f7 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,8 @@ + + Updated to Liferay 6.2 + Fixel Layout diff --git a/pom.xml b/pom.xml index b9b37ca..fcf346f 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 4.0.0 org.gcube.portlets.user tabular-data-expression-widget - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT tabular-data-expression-widget diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/CExpressionMapServlet.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/CExpressionMapServlet.java index b69df61..ca88b88 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/CExpressionMapServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/CExpressionMapServlet.java @@ -13,8 +13,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.gcube.application.framework.core.session.ASLSession; import org.gcube.data.analysis.tabulardata.expression.Expression; import org.gcube.portlets.user.td.expressionwidget.shared.exception.ExpressionParserException; +import org.gcube.portlets.user.td.gwtservice.server.SessionUtil; +import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException; import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +63,17 @@ public class CExpressionMapServlet extends HttpServlet { } logger.info("CExpressionMapServlet import session id: " + session.getId()); + + try { + ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); + + } catch (TDGWTServiceException e) { + logger.error(e.getLocalizedMessage()); + e.printStackTrace(); + throw new ServletException(e.getLocalizedMessage()); + } ObjectInputStream in = new ObjectInputStream(request.getInputStream()); C_Expression exp=null; diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java index 662317d..24d1aa2 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/ExpressionServiceImpl.java @@ -254,7 +254,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); - + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); + logger.debug("GetRules()"); AuthorizationProvider.instance.set(new AuthorizationToken( aslSession.getUsername(), aslSession.getScope())); @@ -306,6 +308,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("GetRules(): " + scope); AuthorizationProvider.instance.set(new AuthorizationToken( @@ -358,6 +362,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("GetApplicableBaseColumnRules(): " + columnData); AuthorizationProvider.instance.set(new AuthorizationToken( @@ -428,6 +434,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("GetAppliedRulesByTabularResourceId(): " + trId); AuthorizationProvider.instance.set(new AuthorizationToken( @@ -489,6 +497,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("SaveRule() :" + ruleDescriptionData); AuthorizationProvider.instance.set(new AuthorizationToken( @@ -566,6 +576,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("UpdateColumnRule() :" + ruleDescriptionData); AuthorizationProvider.instance.set(new AuthorizationToken( @@ -617,6 +629,8 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements try { session = this.getThreadLocalRequest().getSession(); ASLSession aslSession = SessionUtil.getAslSession(session); + String token = SessionUtil.getToken(aslSession); + logger.debug("UserToken: " + token); logger.debug("RemoveRuleById() :" + rules); if (rules == null || !(rules.size() > 0)) {