From 357b6520b306d5a624270d6c44931059d9b2551f Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 25 May 2015 17:00:04 +0000 Subject: [PATCH] 81: Allow the creation and use of expressions on multi column in TDM portlet Task-Url: https://support.d4science.org/issues/81 Updated MultiColumnExpressionPanel git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@114888 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/ColumnExpressionPanel.java | 8 +- .../client/MultiColumnExpressionPanel.java | 507 ++++++++---------- .../client/RuleOnTableCreateDialog.java | 12 +- .../TemplateColumnExpressionDialog.java | 2 +- .../TemplateMultiColumnExpressionDialog.java | 3 +- .../MultiColumnExpressionPanelException.java | 21 + .../client/resources/ExpressionResources.java | 136 ++--- .../client/resources/rule-table-add.png | Bin 0 -> 889 bytes .../client/resources/rule-table-add_32.png | Bin 0 -> 1958 bytes .../client/resources/rule-table-apply.png | Bin 0 -> 872 bytes .../client/resources/rule-table-apply_32.png | Bin 0 -> 1818 bytes .../client/resources/rule-table-add.png | Bin 0 -> 889 bytes .../client/resources/rule-table-add_32.png | Bin 0 -> 1958 bytes .../client/resources/rule-table-apply.png | Bin 0 -> 872 bytes .../client/resources/rule-table-apply_32.png | Bin 0 -> 1818 bytes 15 files changed, 323 insertions(+), 366 deletions(-) create mode 100644 src/main/java/org/gcube/portlets/user/td/expressionwidget/client/exception/MultiColumnExpressionPanelException.java create mode 100644 src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png create mode 100644 src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add_32.png create mode 100644 src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-apply.png create mode 100644 src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-apply_32.png create mode 100644 src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png create mode 100644 src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add_32.png create mode 100644 src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-apply.png create mode 100644 src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-apply_32.png diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java index 50ffaf0..ffbf660 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java @@ -508,14 +508,14 @@ public class ColumnExpressionPanel extends FramedPanel { Log.debug("ConditionWidget" + conditionWidget); conditionsField.add(conditionWidget); - btnApply = new TextButton("Apply"); - btnApply.setIcon(ExpressionResources.INSTANCE.apply()); + btnApply = new TextButton("Add"); + btnApply.setIcon(ExpressionResources.INSTANCE.ruleColumnAdd()); btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setToolTip("Apply rule"); + btnApply.setToolTip("Add"); btnApply.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { - Log.debug("Pressed Apply"); + Log.debug("Pressed Add"); applySeleceted(); } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/MultiColumnExpressionPanel.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/MultiColumnExpressionPanel.java index 45e7a31..6c39075 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/MultiColumnExpressionPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/MultiColumnExpressionPanel.java @@ -3,38 +3,32 @@ package org.gcube.portlets.user.td.expressionwidget.client; import java.util.ArrayList; import java.util.Date; +import org.gcube.portlets.user.td.expressionwidget.client.exception.MultiColumnExpressionPanelException; import org.gcube.portlets.user.td.expressionwidget.client.expression.ConditionOnMultiColumnWidget; import org.gcube.portlets.user.td.expressionwidget.client.notification.ExpressionWrapperNotification; -import org.gcube.portlets.user.td.expressionwidget.client.properties.ColumnDataTypeProperties; import org.gcube.portlets.user.td.expressionwidget.client.resources.ExpressionResources; -import org.gcube.portlets.user.td.expressionwidget.client.store.ColumnDataTypeElement; -import org.gcube.portlets.user.td.expressionwidget.client.store.ColumnDataTypeStore; import org.gcube.portlets.user.td.expressionwidget.shared.exception.ConditionTypeMapException; import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_Not; +import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleColumnPlaceHolderDescriptor; 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.type.TDRuleTableType; import org.gcube.portlets.user.td.gwtservice.shared.rule.type.TDRuleType; import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.widgetcommonevent.client.expression.C_ExpressionContainer; import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper; import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; -import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType; -import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode; import com.allen_sauer.gwt.log.client.Log; -import com.google.gwt.core.client.GWT; import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.user.client.ui.HTML; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign; -import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction; import com.sencha.gxt.core.client.util.Margins; -import com.sencha.gxt.data.shared.LabelProvider; -import com.sencha.gxt.data.shared.ListStore; import com.sencha.gxt.widget.core.client.FramedPanel; import com.sencha.gxt.widget.core.client.button.TextButton; import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData; @@ -50,7 +44,7 @@ import com.sencha.gxt.widget.core.client.form.FieldLabel; import com.sencha.gxt.widget.core.client.form.FieldSet; import com.sencha.gxt.widget.core.client.form.TextArea; import com.sencha.gxt.widget.core.client.form.TextField; -import com.sencha.gxt.widget.core.client.info.Info; +import com.sencha.gxt.widget.core.client.form.validator.EmptyValidator; /** * @@ -61,18 +55,21 @@ import com.sencha.gxt.widget.core.client.info.Info; public class MultiColumnExpressionPanel extends FramedPanel { private static final String WIDTH = "929px"; private static final String HEIGHT = "352px"; - private static final String ROW_DELETE_BY_EXPRESSION_HEIGHT = "388px"; + private static final String ROWS_DELETE_HEIGHT = "388px"; + private static final String RULE_HEIGHT= "312px"; + + private static final String RULE_MULTI_CONDITION_WIDTH = "890px"; + private static final String RULE_MULTI_CONDITION_HEIGHT = "228px"; + + private static final String RULE_DESCRIPTION_HEIGHT = "44px"; - private static final String RULE_PLACE_HOLDER_ID = "Column"; private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm"); - + private enum MultiColumnExpressionPanelType { ColumnFilter, RowDeleteByExpression, Template, RuleOnTable; } - - private MultiColumnExpressionPanelType type; private TemplateMultiColumnExpressionDialog parentTemplateDialog; @@ -95,14 +92,6 @@ public class MultiColumnExpressionPanel extends FramedPanel { private TextField ruleName; private TextArea ruleDescription; - private ComboBox comboDataType; - - private FieldLabel comboDataTypeLabel; - //private RuleDescriptionData ruleDescriptionData; - - - - /** * * @param parent @@ -130,10 +119,10 @@ public class MultiColumnExpressionPanel extends FramedPanel { */ public MultiColumnExpressionPanel( RowsDeleteByMultiColumnExpressionDialog parent, - ArrayList columns, EventBus eventBus) { + ArrayList columns, EventBus eventBus) { super(); setWidth(WIDTH); - setHeight(ROW_DELETE_BY_EXPRESSION_HEIGHT); + setHeight(ROWS_DELETE_HEIGHT); type = MultiColumnExpressionPanelType.RowDeleteByExpression; this.parentRowsDeleteByExpressionDialog = parent; this.columns = columns; @@ -163,86 +152,151 @@ public class MultiColumnExpressionPanel extends FramedPanel { * @param parent * @param eventBus */ - public MultiColumnExpressionPanel(RuleOnTableCreateDialog parent, RuleDescriptionData initialRuleDescriptionData, EventBus eventBus) { + public MultiColumnExpressionPanel(RuleOnTableCreateDialog parent, + RuleDescriptionData initialRuleDescriptionData) + throws MultiColumnExpressionPanelException { super(); + Log.debug("MultiColumnExpressionPanel"); setWidth(WIDTH); - setHeight(HEIGHT); + setHeight(RULE_HEIGHT); type = MultiColumnExpressionPanelType.RuleOnTable; this.parentRuleOnTableCreateDialog = parent; - this.initialRuleDescriptionData=initialRuleDescriptionData; - this.columns = null; - createOnRule(); + this.initialRuleDescriptionData = initialRuleDescriptionData; + retrieveColumns(); } + + + - - protected void createOnRule() { - forceLayoutOnResize = true; - - setBodyBorder(false); - setHeaderVisible(false); - - VerticalLayoutContainer basicLayout = new VerticalLayoutContainer(); - basicLayout.setAdjustForScroll(true); - - HBoxLayoutContainer flowButton = new HBoxLayoutContainer(); - flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); - flowButton.setPack(BoxLayoutPack.CENTER); - - conditionsField = new FieldSet(); - conditionsField.setHeadingText("Conditions"); - conditionsField.setCollapsible(false); - - conditionWidget = new ConditionOnMultiColumnWidget(columns); - conditionsField.add(conditionWidget); - - btnApply = new TextButton("Save"); - btnApply.setIcon(ExpressionResources.INSTANCE.ruleColumnAdd()); - btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setToolTip("Save rule"); - btnApply.addSelectHandler(new SelectHandler() { - - public void onSelect(SelectEvent event) { - Log.debug("Pressed Save"); - applySeleceted(); - - } - }); - - btnClose = new TextButton("Close"); - btnClose.setIcon(ExpressionResources.INSTANCE.close()); - btnClose.setIconAlign(IconAlign.RIGHT); - btnClose.setToolTip("Cancel rule"); - btnClose.addSelectHandler(new SelectHandler() { - - public void onSelect(SelectEvent event) { - Log.debug("Pressed Close"); - close(); - } - }); - - flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); - - flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); - - basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, - new Margins(1))); - basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins( - 5, 2, 5, 2))); - add(basicLayout); - + protected void retrieveColumns() throws MultiColumnExpressionPanelException { if (initialRuleDescriptionData == null) { - conditionWidget.disable(); - } else { - updateCondition(); + Log.error("No rules description data present!"); + throw new MultiColumnExpressionPanelException( + "No rules description data present!"); } + TDRuleType tdRuleType = initialRuleDescriptionData.getTdRuleType(); + if (tdRuleType == null) { + Log.error("No Rule Type present!"); + throw new MultiColumnExpressionPanelException( + "No Rule Type present!"); + } + + if (tdRuleType instanceof TDRuleTableType) { + TDRuleTableType tdRuleTableType = (TDRuleTableType) tdRuleType; + ArrayList listDescriptors = tdRuleTableType + .getRuleColumnPlaceHolderDescriptors(); + columns = new ArrayList(); + for (RuleColumnPlaceHolderDescriptor ruleColumnPlaceHolderDescriptor : listDescriptors) { + ColumnData col = new ColumnData(); + col.setId(ruleColumnPlaceHolderDescriptor.getId()); + col.setColumnId(ruleColumnPlaceHolderDescriptor.getLabel()); + col.setLabel(ruleColumnPlaceHolderDescriptor.getLabel()); + col.setDataTypeName(ruleColumnPlaceHolderDescriptor + .getColumnDataType().getId()); + columns.add(col); + } + + createOnRule(); + + } else { + Log.error("No Table Rule Type present!"); + throw new MultiColumnExpressionPanelException( + "No Table Rule Type present!"); + } } - - - @SuppressWarnings("unused") - private void createColumnMockUp(VerticalLayoutContainer propertiesLayout) { + protected void createOnRule() throws MultiColumnExpressionPanelException { + try { + forceLayoutOnResize = true; + + setBodyBorder(false); + setHeaderVisible(false); + + VerticalLayoutContainer basicLayout = new VerticalLayoutContainer(); + basicLayout.setAdjustForScroll(true); + + FieldSet propertiesField = new FieldSet(); + propertiesField.setHeadingText("Properties"); + propertiesField.setCollapsible(false); + + VerticalLayoutContainer propertiesLayout = new VerticalLayoutContainer(); + createRuleOnTableDecription(propertiesLayout); + propertiesField.add(propertiesLayout); + + conditionsField = new FieldSet(); + conditionsField.setHeadingText("Conditions"); + conditionsField.setCollapsible(false); + + conditionWidget = new ConditionOnMultiColumnWidget(columns,RULE_MULTI_CONDITION_WIDTH,RULE_MULTI_CONDITION_HEIGHT); + conditionsField.add(conditionWidget); + + HBoxLayoutContainer flowButton = new HBoxLayoutContainer(); + flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); + flowButton.setPack(BoxLayoutPack.CENTER); + + btnApply = new TextButton("Save"); + btnApply.setIcon(ExpressionResources.INSTANCE.ruleColumnAdd()); + btnApply.setIconAlign(IconAlign.RIGHT); + btnApply.setToolTip("Save rule"); + btnApply.addSelectHandler(new SelectHandler() { + + public void onSelect(SelectEvent event) { + Log.debug("Pressed Save"); + applySeleceted(); + + } + }); + + btnClose = new TextButton("Close"); + btnClose.setIcon(ExpressionResources.INSTANCE.close()); + btnClose.setIconAlign(IconAlign.RIGHT); + btnClose.setToolTip("Cancel rule"); + btnClose.addSelectHandler(new SelectHandler() { + + public void onSelect(SelectEvent event) { + Log.debug("Pressed Close"); + close(); + } + }); + + flowButton + .add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); + + flowButton + .add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); + + basicLayout.add(propertiesField, new VerticalLayoutData(1, -1, + new Margins(1))); + + basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, + new Margins(1))); + + if (parentRuleOnTableCreateDialog != null) { + basicLayout.add(flowButton, new VerticalLayoutData(1, 36, + new Margins(5, 2, 5, 2))); + } + add(basicLayout); + + if (initialRuleDescriptionData == null) { + conditionWidget.disable(); + } else { + if (initialRuleDescriptionData.getExpression() == null) { + + } else { + + } + } + } catch (Throwable e) { + Log.debug("Error in createOnRule(): "+e.getLocalizedMessage()); + e.printStackTrace(); + } + } + + private void createRuleOnTableDecription( + VerticalLayoutContainer propertiesLayout) { ruleName = new TextField(); + ruleName.addValidator(new EmptyValidator()); ruleName.setToolTip("Rule Name"); if (initialRuleDescriptionData != null) { ruleName.setValue(initialRuleDescriptionData.getName()); @@ -250,6 +304,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { FieldLabel ruleNameLabel = new FieldLabel(ruleName, "Rule Name"); ruleDescription = new TextArea(); + ruleDescription.addValidator(new EmptyValidator()); ruleDescription.setHeight(RULE_DESCRIPTION_HEIGHT); ruleDescription.setToolTip("Rule Description"); if (initialRuleDescriptionData != null) { @@ -259,193 +314,38 @@ public class MultiColumnExpressionPanel extends FramedPanel { FieldLabel ruleDescriptionLabel = new FieldLabel(ruleDescription, "Rule Description"); - - // comboDataType - ColumnDataTypeProperties propsDataType = GWT - .create(ColumnDataTypeProperties.class); - ListStore storeComboDataType = new ListStore( - propsDataType.id()); - storeComboDataType.addAll(ColumnDataTypeStore.getAttributeType()); - - comboDataType = new ComboBox( - storeComboDataType, propsDataType.label()); - Log.trace("ComboDataType created"); - - addHandlersForComboAttributeType(propsDataType.label()); - - comboDataType.setEmptyText("Select a column type..."); - comboDataType.setWidth(191); - comboDataType.setTypeAhead(true); - comboDataType.setTriggerAction(TriggerAction.ALL); - - if (initialRuleDescriptionData != null) { - Log.debug("Initial RuleDescriptionData: " - + initialRuleDescriptionData); - ColumnDataType cdt = retrieveColumnDataType(); - if (cdt != null) { - Log.debug("Retrieved column data type: " + cdt); - ColumnDataTypeElement cdte = ColumnDataTypeStore - .selectedAttributeElement(cdt); - if (cdte != null) { - comboDataType.setValue(cdte); - - } - } else { - Log.debug("Retrieved column data type null"); - } - } - - comboDataTypeLabel = new FieldLabel(comboDataType, - "Data Type"); - propertiesLayout.add(ruleNameLabel, new VerticalLayoutData(1, -1, new Margins(0))); propertiesLayout.add(ruleDescriptionLabel, new VerticalLayoutData(1, -1, new Margins(0))); - - propertiesLayout.add(comboDataTypeLabel, new VerticalLayoutData(1, - -1, new Margins(0))); - - } - private ColumnDataType retrieveColumnDataType() { - TDRuleType tdRuleTableType = initialRuleDescriptionData - .getTdRuleType(); - - return null; - - } - - - protected void addHandlersForComboAttributeType( - final LabelProvider labelProvider) { - comboDataType - .addSelectionHandler(new SelectionHandler() { - public void onSelection( - SelectionEvent event) { - Info.display( - "Attribute Type Selected", - "You selected " - + (event.getSelectedItem() == null ? "nothing" - : labelProvider.getLabel(event - .getSelectedItem()) - + "!")); - Log.debug("ComboAttributeType selected: " - + event.getSelectedItem()); - ColumnDataTypeElement attributeType = event - .getSelectedItem(); - updateDataType(attributeType.getType()); - } - - }); - } - - - protected void updateCondition() { - ColumnMockUp columnMockUp = retrieveColumnMockUp(); - if (columnMockUp != null) { - column = new ColumnData(); - column.setId(columnMockUp.getId()); - column.setColumnId(columnMockUp.getColumnId()); - column.setLabel(columnMockUp.getLabel()); - column.setDataTypeName(columnMockUp.getColumnDataType().toString()); - conditionWidget.update(columns); - conditionWidget.enable(); - } else { - conditionWidget.disable(); - } - forceLayout(); - } - - - - protected ColumnMockUp retrieveColumnMockUp() { - ColumnMockUp columnMockUp = null; - - ColumnDataTypeElement columnDataTypeElement = comboDataType - .getCurrentValue(); - if (columnDataTypeElement != null) { - ColumnDataType dataType = columnDataTypeElement.getType(); - if (dataType != null) { - columnMockUp = new ColumnMockUp(null, RULE_PLACE_HOLDER_ID, - dataType, RULE_PLACE_HOLDER_ID); - - } else { - - } - } else { - - } - - return columnMockUp; - } - - protected ColumnMockUp checkEnterData() { - ColumnMockUp columnMockUp = null; - - String ruleNameS = ruleName.getCurrentValue(); - - if (ruleNameS != null && !ruleNameS.isEmpty()) { - - String ruleDescriptionS = ruleDescription.getCurrentValue(); - - if (ruleDescriptionS != null && !ruleDescriptionS.isEmpty()) { - ColumnDataTypeElement columnDataTypeElement = comboDataType - .getCurrentValue(); - if (columnDataTypeElement != null) { - ColumnDataType dataType = columnDataTypeElement.getType(); - if (dataType != null) { - columnMockUp = new ColumnMockUp(null, - RULE_PLACE_HOLDER_ID, dataType, - RULE_PLACE_HOLDER_ID); - - } else { - UtilsGXT3.alert("Attention", - "Column data type not selected!"); - } + protected RuleDescriptionData retrieveRuleDescriptionData(C_Expression exp) + throws MultiColumnExpressionPanelException { + if (ruleName.validate()) { + if (ruleDescription.validate()) { + if (exp != null) { + String ruleNameS = ruleName.getCurrentValue(); + String ruleDescriptionS = ruleDescription.getCurrentValue(); + RuleDescriptionData ruleDescriptionData = new RuleDescriptionData( + 0, ruleNameS, ruleDescriptionS, + sdf.format(new Date()), null, null, + RuleScopeType.TABLE, exp, + initialRuleDescriptionData.getTdRuleType()); + return ruleDescriptionData; } else { - UtilsGXT3.alert("Attention", - "Column data type not selected!"); + throw new MultiColumnExpressionPanelException( + "Enter a valid condition!"); } - } else { - UtilsGXT3.alert("Attention", + throw new MultiColumnExpressionPanelException( "Enter a valid description for the rule!"); } } else { - UtilsGXT3.alert("Attention", "Enter a valid name for the rule!"); + throw new MultiColumnExpressionPanelException( + "Enter a valid name for the rule!"); } - return columnMockUp; - - } - - protected RuleDescriptionData retrieveRuleDescriptionData(C_Expression exp) { - ColumnMockUp columnMockUp = checkEnterData(); - if (columnMockUp != null) { - if (exp != null) { - String ruleNameS = ruleName.getCurrentValue(); - String ruleDescriptionS = ruleDescription.getCurrentValue(); - //TODO - RuleDescriptionData ruleDescriptionData = new RuleDescriptionData( - 0, ruleNameS, ruleDescriptionS, sdf.format(new Date()), null, null, - RuleScopeType.TABLE, exp,initialRuleDescriptionData.getTdRuleType()); - return ruleDescriptionData; - } else { - UtilsGXT3.alert("Attention", "Enter a valid condition!"); - return null; - } - } else { - return null; - } - } - - - - protected void updateDataType(ColumnDataType type) { - Log.debug("Update ColumnDataType: " + type); - updateCondition(); } @@ -464,7 +364,6 @@ public class MultiColumnExpressionPanel extends FramedPanel { flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - conditionsField = new FieldSet(); conditionsField.setHeadingText("Conditions"); conditionsField.setCollapsible(false); @@ -473,14 +372,14 @@ public class MultiColumnExpressionPanel extends FramedPanel { Log.debug("ConditionWidget" + conditionWidget); conditionsField.add(conditionWidget); - btnApply = new TextButton("Apply"); - btnApply.setIcon(ExpressionResources.INSTANCE.apply()); + btnApply = new TextButton("Add"); + btnApply.setIcon(ExpressionResources.INSTANCE.ruleTableAdd()); btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setToolTip("Apply rule"); + btnApply.setToolTip("Add rule"); btnApply.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { - Log.debug("Pressed Apply"); + Log.debug("Pressed Add"); applySeleceted(); } @@ -489,7 +388,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { btnClose = new TextButton("Close"); btnClose.setIcon(ExpressionResources.INSTANCE.close()); btnClose.setIconAlign(IconAlign.RIGHT); - btnClose.setToolTip("Cancel rule"); + btnClose.setToolTip("Close"); btnClose.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -522,7 +421,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { HBoxLayoutContainer flowButton = new HBoxLayoutContainer(); flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - + conditionsField = new FieldSet(); conditionsField.setHeadingText("Conditions"); conditionsField.setCollapsible(false); @@ -557,7 +456,6 @@ public class MultiColumnExpressionPanel extends FramedPanel { flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); - basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1))); basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins( @@ -579,7 +477,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { HBoxLayoutContainer flowButton = new HBoxLayoutContainer(); flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - + conditionsField = new FieldSet(); conditionsField.setHeadingText("Conditions"); conditionsField.setCollapsible(false); @@ -588,7 +486,6 @@ public class MultiColumnExpressionPanel extends FramedPanel { Log.debug("ConditionWidget" + conditionWidget); conditionsField.add(conditionWidget); - btnApply = new TextButton("Delete"); btnApply.setIcon(ExpressionResources.INSTANCE .tableRowDeleteByExpression()); @@ -602,7 +499,6 @@ public class MultiColumnExpressionPanel extends FramedPanel { } }); - btnClose = new TextButton("Close"); btnClose.setIcon(ExpressionResources.INSTANCE.close()); @@ -618,15 +514,12 @@ public class MultiColumnExpressionPanel extends FramedPanel { flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); - basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1))); basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins( 5, 2, 5, 2))); add(basicLayout); - - } @@ -696,9 +589,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { return selectionHandler; } - protected void applySeleceted() { - C_Expression exp; C_ExpressionContainer condContainer = null; @@ -717,12 +608,11 @@ public class MultiColumnExpressionPanel extends FramedPanel { condContainer.setId(C_ExpressionContainer.Contains.C_Expression); condContainer.setExp(exp); condContainer.setReadableExpression(exp.getReadableExpression()); - exWrapper = new ExpressionWrapper(column.getTrId(), column, - condContainer); + exWrapper = new ExpressionWrapper(null, null, condContainer); ExpressionWrapperNotification expressionWrapperNotification = new ExpressionWrapperNotification( exWrapper); - Log.debug("Apply: "+expressionWrapperNotification); + Log.debug("Apply: " + expressionWrapperNotification); parentTemplateDialog.onExpression(expressionWrapperNotification); break; case RuleOnTable: @@ -737,9 +627,19 @@ public class MultiColumnExpressionPanel extends FramedPanel { UtilsGXT3.alert("Attention", e.getLocalizedMessage()); return; } - RuleDescriptionData ruleDescriptionData = retrieveRuleDescriptionData(exp); + + RuleDescriptionData ruleDescriptionData = null; + try { + ruleDescriptionData = retrieveRuleDescriptionData(exp); + } catch (MultiColumnExpressionPanelException e1) { + Log.debug(e1.getLocalizedMessage()); + UtilsGXT3.alert("Attention", e1.getLocalizedMessage()); + return; + } if (ruleDescriptionData != null) { - parentRuleOnTableCreateDialog.addRule(ruleDescriptionData); + if (parentRuleOnTableCreateDialog != null) { + parentRuleOnTableCreateDialog.addRule(ruleDescriptionData); + } } break; case ColumnFilter: @@ -750,7 +650,7 @@ public class MultiColumnExpressionPanel extends FramedPanel { UtilsGXT3.alert("Attention", e.getLocalizedMessage()); return; } - Log.debug("Apply: "+exp); + Log.debug("Apply: " + exp); parentMultiFilterDialog.applyFilter(exp); break; case RowDeleteByExpression: @@ -762,25 +662,46 @@ public class MultiColumnExpressionPanel extends FramedPanel { return; } C_Expression notExp = new C_Not(exp); - Log.debug("Apply: "+exp); - parentRowsDeleteByExpressionDialog.deleteRowsByExpression( - notExp); + Log.debug("Apply: " + exp); + parentRowsDeleteByExpressionDialog.deleteRowsByExpression(notExp); break; - + default: break; } } + public RuleDescriptionData getRuleOnTable() + throws MultiColumnExpressionPanelException { + if (!conditionWidget.isEnabled()) { + throw new MultiColumnExpressionPanelException("Fill all field!"); + } + + C_Expression exp; + + try { + exp = conditionWidget.getExpression(); + } catch (ConditionTypeMapException e) { + Log.debug(e.getLocalizedMessage()); + throw new MultiColumnExpressionPanelException( + e.getLocalizedMessage()); + } + RuleDescriptionData ruleDescriptionData = retrieveRuleDescriptionData(exp); + return ruleDescriptionData; + + } + protected void close() { switch (type) { case Template: parentTemplateDialog.close(); break; case RuleOnTable: - parentRuleOnTableCreateDialog.close(); + if (parentRuleOnTableCreateDialog != null) { + parentRuleOnTableCreateDialog.close(); + } break; case ColumnFilter: parentMultiFilterDialog.close(); diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/RuleOnTableCreateDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/RuleOnTableCreateDialog.java index 8f36b4e..99d71d6 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/RuleOnTableCreateDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/RuleOnTableCreateDialog.java @@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.expressionwidget.client; import java.util.ArrayList; +import org.gcube.portlets.user.td.expressionwidget.client.exception.MultiColumnExpressionPanelException; import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleDialogNotification; import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleDialogNotification.HasRuleDialogNotificationListener; import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleDialogNotification.RuleDialogNotificationListener; @@ -46,8 +47,13 @@ public class RuleOnTableCreateDialog extends Window implements initWindow(); this.eventBus = eventBus; this.initialRuleDescriptionData=ruleDescriptionData; - multiColumnExpressionPanel = new MultiColumnExpressionPanel(this, ruleDescriptionData,eventBus); - add(multiColumnExpressionPanel); + try { + multiColumnExpressionPanel = new MultiColumnExpressionPanel(this, ruleDescriptionData); + add(multiColumnExpressionPanel); + } catch (MultiColumnExpressionPanelException e) { + UtilsGXT3.alert("Attention", e.getLocalizedMessage()); + } + } @@ -60,7 +66,7 @@ public class RuleOnTableCreateDialog extends Window implements setClosable(true); setModal(true); forceLayoutOnResize = true; - getHeader().setIcon(ExpressionResources.INSTANCE.ruleColumnAdd()); + getHeader().setIcon(ExpressionResources.INSTANCE.ruleTableAdd()); } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateColumnExpressionDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateColumnExpressionDialog.java index 97237d9..febb428 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateColumnExpressionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateColumnExpressionDialog.java @@ -88,7 +88,7 @@ public class TemplateColumnExpressionDialog extends Window implements setClosable(true); setModal(true); forceLayoutOnResize = true; - getHeader().setIcon(ExpressionResources.INSTANCE.ruleAdd()); + getHeader().setIcon(ExpressionResources.INSTANCE.ruleColumnAdd()); } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateMultiColumnExpressionDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateMultiColumnExpressionDialog.java index 842715f..7fd7b4a 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateMultiColumnExpressionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/TemplateMultiColumnExpressionDialog.java @@ -44,6 +44,7 @@ public class TemplateMultiColumnExpressionDialog extends Window implements columns = new ArrayList(); for (ColumnMockUp columnMockUp : columnsMockUp) { ColumnData column = new ColumnData(); + column.setId(columnMockUp.getColumnId()); column.setColumnId(columnMockUp.getColumnId()); column.setLabel(columnMockUp.getLabel()); column.setDataTypeName(columnMockUp.getColumnDataType().toString()); @@ -78,7 +79,7 @@ public class TemplateMultiColumnExpressionDialog extends Window implements setClosable(true); setModal(true); forceLayoutOnResize = true; - getHeader().setIcon(ExpressionResources.INSTANCE.ruleAdd()); + getHeader().setIcon(ExpressionResources.INSTANCE.ruleTableAdd()); } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/exception/MultiColumnExpressionPanelException.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/exception/MultiColumnExpressionPanelException.java new file mode 100644 index 0000000..3bbf741 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/exception/MultiColumnExpressionPanelException.java @@ -0,0 +1,21 @@ +package org.gcube.portlets.user.td.expressionwidget.client.exception; + +/** + * + * @author giancarlo + * email: g.panichi@isti.cnr.it + * + */ +public class MultiColumnExpressionPanelException extends Exception { + + private static final long serialVersionUID = -4619188268507480346L; + + public MultiColumnExpressionPanelException(String message) { + super(message); + } + + public MultiColumnExpressionPanelException(String message, Throwable cause) { + super(message, cause); + } + +} diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/ExpressionResources.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/ExpressionResources.java index 2bbe718..70e541d 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/ExpressionResources.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/ExpressionResources.java @@ -1,76 +1,84 @@ package org.gcube.portlets.user.td.expressionwidget.client.resources; - - import com.google.gwt.core.client.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ImageResource; - /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author "Giancarlo Panichi" g.panichi@isti.cnr.it * */ -public interface ExpressionResources extends ClientBundle { - - public static final ExpressionResources INSTANCE = GWT.create(ExpressionResources.class); - - @Source("add.png") - ImageResource add(); - - @Source("delete.png") - ImageResource delete(); - - @Source("wrench-database.png") - ImageResource save(); - - @Source("close-red.png") - ImageResource close(); - - @Source("rule-add.png") - ImageResource ruleAdd(); - - @Source("rule-add_32.png") - ImageResource ruleAdd32(); - - @Source("rule-edit_32.png") - ImageResource ruleEdit32(); +public interface ExpressionResources extends ClientBundle { + + public static final ExpressionResources INSTANCE = GWT + .create(ExpressionResources.class); + + @Source("add.png") + ImageResource add(); + + @Source("delete.png") + ImageResource delete(); + + @Source("wrench-database.png") + ImageResource save(); + + @Source("close-red.png") + ImageResource close(); + + @Source("rule-add.png") + ImageResource ruleAdd(); + + @Source("rule-add_32.png") + ImageResource ruleAdd32(); + + @Source("rule-edit_32.png") + ImageResource ruleEdit32(); + + @Source("rule-edit.png") + ImageResource ruleEdit(); + + @Source("rule-column-add.png") + ImageResource ruleColumnAdd(); + + @Source("rule-column-add_32.png") + ImageResource ruleColumnAdd32(); + + @Source("rule-table-add.png") + ImageResource ruleTableAdd(); + + @Source("rule-table-add_32.png") + ImageResource ruleTableAdd32(); + + @Source("rule-table-apply.png") + ImageResource ruleTableApply(); + + @Source("rule-table-apply_32.png") + ImageResource ruleTableApply32(); + + @Source("wrench-go.png") + ImageResource apply(); + + @Source("wrench-manage.png") + ImageResource search(); + + @Source("column-filter.png") + ImageResource filter(); + + @Source("column-filter-go.png") + ImageResource applyFilter(); + + @Source("column-replace-by-expression_32.png") + ImageResource columnReplaceByExpression32(); + + @Source("column-replace-by-expression.png") + ImageResource columnReplaceByExpression(); + + @Source("table-row-delete-byexpression_32.png") + ImageResource tableRowDeleteByExpression32(); + + @Source("table-row-delete-byexpression.png") + ImageResource tableRowDeleteByExpression(); - @Source("rule-edit.png") - ImageResource ruleEdit(); - - - @Source("rule-column-add.png") - ImageResource ruleColumnAdd(); - - @Source("rule-column-add_32.png") - ImageResource ruleColumnAdd32(); - - @Source("wrench-go.png") - ImageResource apply(); - - @Source("wrench-manage.png") - ImageResource search(); - - @Source("column-filter.png") - ImageResource filter(); - - @Source("column-filter-go.png") - ImageResource applyFilter(); - - @Source("column-replace-by-expression_32.png") - ImageResource columnReplaceByExpression32(); - - @Source("column-replace-by-expression.png") - ImageResource columnReplaceByExpression(); - - - @Source("table-row-delete-byexpression_32.png") - ImageResource tableRowDeleteByExpression32(); - - @Source("table-row-delete-byexpression.png") - ImageResource tableRowDeleteByExpression(); - } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png new file mode 100644 index 0000000000000000000000000000000000000000..4e0cece133acd0db1ab5d8ab7e65ac7378fa6b81 GIT binary patch literal 889 zcmV-<1BU#GP)AFezT6#KZsq0|rS% zK~y-)MUu^HTxAr-fA5_;z4>m;m}I7nAW3a#L()jqNNb@&p|;?n3n_?L=t?N!La6o+ zP!Yk6R9$r;hzg=^#YGWfrDCZRByBN~IBhcNG#@7Oap%78Img8e_Su}XJI{H3j{~^! z^Ll^Y=*d(tF}x_EhKdnX2*D5p@j@_AF`8Lue02Wcj=OSoy+0rEV|hKBFjEVn1W`m3 zFM=IkhYZv5Fz$h;zNXdH5nO z;*r`W9?1a;YKDlSV#H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*IN4e3oXXSrkrJ6^nYb!Tx za&U|xwl$8P`zbT!3%qyDN9kh-fUsJl7zI4^;BLCQS6vr?vr~)so=LkScja184lPf= zI!DfP*t#jtw&67t<9=Q~<5Q^$QU<@2Sag|C{*}5r@=NgLP>)cp~ICrT+d2|t{G{&-7rZ?Y@gUhc+f6Qc9VDs9Y zs9K(WZ6-_MMtEWSaQ-^M18~0lvvB}otArIOmSVPS%;UQ*HCy4tTaPg||0q%JdrZ`R z!khjvmffr5{a$u%-a~Is7stfYwA8F++s0k2>)n7=K~)-El51S<8QH^2W6$yYnSJbe*LV2h{U7QWg0Z(2 z2t0GW2fp;gn>SeEr}|g8& z79r;wCa;t^8!WbT%c_dwm_+8=Jm6u>{TtSH;d_bksAj2D1!GLgSfLtM0muivY5bBG z4%cz0L=}#mK8h8~S9U+nmi0T@TKBBL^>leyD~Q`9L{_BB!8Bx2RdEc&qMW~6rV_=x zHvSSeEh1Kh*w$Fzw~-z1ypLmNo@1uC$U3u^A3c-9%IgX6_Lmh^tQC549#(X&0U);g zZE~)v>1AM7PgViV2*4k+)|RkM{(|8rk>>_6>MAKZV4r}lpg^Ml7u@Q?1kVPoVAs@yF?ShMniQ*#df z<{Mjz59~Y1;cwm9IJo7TtDT;l_e)Xk5UUUWec$|_|C?s{UsjzqbCaq6+yDRo07*qo IM6N<$f@An{l>h($ literal 0 HcmV?d00001 diff --git a/src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png b/src/main/resources/org/gcube/portlets/user/td/expressionwidget/client/resources/rule-table-add.png new file mode 100644 index 0000000000000000000000000000000000000000..4e0cece133acd0db1ab5d8ab7e65ac7378fa6b81 GIT binary patch literal 889 zcmV-<1BU#GP)AFezT6#KZsq0|rS% zK~y-)MUu^HTxAr-fA5_;z4>m;m}I7nAW3a#L()jqNNb@&p|;?n3n_?L=t?N!La6o+ zP!Yk6R9$r;hzg=^#YGWfrDCZRByBN~IBhcNG#@7Oap%78Img8e_Su}XJI{H3j{~^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