81: Allow the creation and use of expressions on multi column in TDM portlet
Task-Url: https://support.d4science.org/issues/81 Updated apply rule on table git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@115075 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cb904672af
commit
fbc19f9e7e
|
@ -0,0 +1,25 @@
|
||||||
|
package org.gcube.portlets.user.td.expressionwidget.client.properties;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
|
||||||
|
|
||||||
|
import com.google.gwt.editor.client.Editor.Path;
|
||||||
|
import com.sencha.gxt.core.client.ValueProvider;
|
||||||
|
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||||
|
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi"
|
||||||
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface ColumnDataProperties extends
|
||||||
|
PropertyAccess<ColumnData> {
|
||||||
|
|
||||||
|
@Path("id")
|
||||||
|
ModelKeyProvider<ColumnData> id();
|
||||||
|
|
||||||
|
ValueProvider<ColumnData,String> label();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
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;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyTableRuleSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
||||||
|
@ -77,6 +78,10 @@ public interface ExpressionService extends RemoteService {
|
||||||
public void setDetachColumnRules(DetachColumnRulesSession detachColumnRulesSession)
|
public void setDetachColumnRules(DetachColumnRulesSession detachColumnRulesSession)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
public String startApplyTableRule(ApplyTableRuleSession applyTableRuleSession)
|
||||||
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
|
||||||
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId)
|
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.AppliedRulesResponseData;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.AppliedRulesResponseData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyTableRuleSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescriptionData;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescriptionData;
|
||||||
|
@ -67,6 +68,12 @@ public interface ExpressionServiceAsync {
|
||||||
DetachColumnRulesSession detachColumnRulesSession,
|
DetachColumnRulesSession detachColumnRulesSession,
|
||||||
AsyncCallback<Void> callback);
|
AsyncCallback<Void> callback);
|
||||||
|
|
||||||
|
void startApplyTableRule(
|
||||||
|
ApplyTableRuleSession applyTableRuleSession,
|
||||||
|
AsyncCallback<String> callback);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void getActiveRulesByTabularResourceId(TRId trId,
|
void getActiveRulesByTabularResourceId(TRId trId,
|
||||||
AsyncCallback<AppliedRulesResponseData> callback);
|
AsyncCallback<AppliedRulesResponseData> callback);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ 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;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyTableRuleSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.DetachColumnRulesSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescriptionData;
|
import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescriptionData;
|
||||||
|
@ -630,6 +631,27 @@ public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String startApplyTableRule(
|
||||||
|
ApplyTableRuleSession applyTableRuleSession)
|
||||||
|
throws TDGWTServiceException {
|
||||||
|
try {
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
String taskId = startApplyTableRule(
|
||||||
|
applyTableRuleSession, session);
|
||||||
|
return taskId;
|
||||||
|
|
||||||
|
} catch (TDGWTServiceException e) {
|
||||||
|
throw e;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
|
|
@ -23,6 +23,8 @@ public interface RuleDescriptionDataProperties extends
|
||||||
|
|
||||||
ValueProvider<RuleDescriptionData, String> scopeLabel();
|
ValueProvider<RuleDescriptionData, String> scopeLabel();
|
||||||
|
|
||||||
|
ValueProvider<RuleDescriptionData, String> creationDate();
|
||||||
|
|
||||||
ValueProvider<RuleDescriptionData, String> description();
|
ValueProvider<RuleDescriptionData, String> description();
|
||||||
|
|
||||||
ValueProvider<RuleDescriptionData, String> ownerLogin();
|
ValueProvider<RuleDescriptionData, String> ownerLogin();
|
||||||
|
|
Loading…
Reference in New Issue