Fixed label on shared tr when delete rule by id
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@119922 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
07dd4732f5
commit
c8b29b68c9
|
@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.expressionwidget.server;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.exception.ExpressionPa
|
||||||
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ExpressionServiceException;
|
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ExpressionServiceException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl;
|
import org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceMessagesConstants;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.ColumnDataTypeMap;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.ColumnDataTypeMap;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.AppliedRulesResponseData;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.AppliedRulesResponseData;
|
||||||
|
@ -71,10 +73,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public String startFilterColumn(FilterColumnSession filterColumnSession)
|
public String startFilterColumn(FilterColumnSession filterColumnSession)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
logger.debug("ExpressionService submitColumnFilter");
|
logger.debug("ExpressionService submitColumnFilter");
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
logger.debug("Session: " + session);
|
logger.debug("Session: " + session);
|
||||||
|
|
||||||
if (filterColumnSession == null) {
|
if (filterColumnSession == null) {
|
||||||
|
@ -103,6 +105,12 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
logger.error(e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
|
@ -116,10 +124,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
|
|
||||||
public String startAddColumn(AddColumnSession addColumnSession)
|
public String startAddColumn(AddColumnSession addColumnSession)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
logger.debug("AddColumn");
|
logger.debug("AddColumn");
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
logger.debug("Session: " + session);
|
logger.debug("Session: " + session);
|
||||||
|
|
||||||
if (addColumnSession == null) {
|
if (addColumnSession == null) {
|
||||||
|
@ -153,6 +161,13 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
logger.error(e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
|
@ -168,9 +183,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession)
|
ReplaceColumnByExpressionSession replaceColumnByExpressionSession)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
logger.debug("ExpressionService submitReplaceColumnByExpression");
|
logger.debug("ExpressionService submitReplaceColumnByExpression");
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
logger.debug("Session: " + session);
|
logger.debug("Session: " + session);
|
||||||
|
|
||||||
if (replaceColumnByExpressionSession == null) {
|
if (replaceColumnByExpressionSession == null) {
|
||||||
|
@ -215,6 +231,12 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
logger.error(e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
|
@ -228,8 +250,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<RuleDescriptionData> getRules()
|
public ArrayList<RuleDescriptionData> getRules()
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("GetRules()");
|
logger.debug("GetRules()");
|
||||||
|
@ -259,7 +282,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getRules(): " + e.getLocalizedMessage());
|
logger.error("Error in getRules(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -276,8 +302,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<RuleDescriptionData> getRules(RuleScopeType scope)
|
public ArrayList<RuleDescriptionData> getRules(RuleScopeType scope)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("GetRules(): " + scope);
|
logger.debug("GetRules(): " + scope);
|
||||||
|
@ -308,7 +335,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getRules(): " + e.getLocalizedMessage());
|
logger.error("Error in getRules(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -325,8 +354,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<RuleDescriptionData> getApplicableBaseColumnRules(
|
public ArrayList<RuleDescriptionData> getApplicableBaseColumnRules(
|
||||||
ColumnData columnData) throws TDGWTServiceException {
|
ColumnData columnData) throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("GetApplicableBaseColumnRules(): " + columnData);
|
logger.debug("GetApplicableBaseColumnRules(): " + columnData);
|
||||||
|
@ -373,7 +403,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getApplicableBaseColumnRules(): "
|
logger.error("Error in getApplicableBaseColumnRules(): "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -391,8 +424,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId)
|
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("GetAppliedRulesByTabularResourceId(): " + trId);
|
logger.debug("GetAppliedRulesByTabularResourceId(): " + trId);
|
||||||
|
@ -429,7 +463,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getActiveRulesByTabularResourceId(): "
|
logger.error("Error in getActiveRulesByTabularResourceId(): "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -448,8 +485,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
public String saveRule(
|
public String saveRule(
|
||||||
RuleDescriptionData ruleDescriptionData)
|
RuleDescriptionData ruleDescriptionData)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("SaveRule() :" + ruleDescriptionData);
|
logger.debug("SaveRule() :" + ruleDescriptionData);
|
||||||
|
@ -502,7 +540,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in save rule: "
|
logger.error("Error in save rule: "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -521,8 +562,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public void updateColumnRule(RuleDescriptionData ruleDescriptionData)
|
public void updateColumnRule(RuleDescriptionData ruleDescriptionData)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("UpdateColumnRule() :" + ruleDescriptionData);
|
logger.debug("UpdateColumnRule() :" + ruleDescriptionData);
|
||||||
|
@ -551,7 +593,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getRule(): " + e.getLocalizedMessage());
|
logger.error("Error in getRule(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -568,8 +613,9 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
@Override
|
@Override
|
||||||
public void removeRulesById(ArrayList<RuleDescriptionData> rules)
|
public void removeRulesById(ArrayList<RuleDescriptionData> rules)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
HttpSession session=null;
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
session = this.getThreadLocalRequest().getSession();
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
logger.debug("RemoveRuleById() :" + rules);
|
logger.debug("RemoveRuleById() :" + rules);
|
||||||
|
@ -594,7 +640,10 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw e;
|
ResourceBundle messages = getResourceBundle(session);
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights));
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in removeRuleById(): "
|
logger.error("Error in removeRuleById(): "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
|
Loading…
Reference in New Issue