Search in sources :

Example 1 with PatternConditionMetaData

use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.ConditionColumnSynchronizer.PatternConditionMetaData in project drools-wb by kiegroup.

the class ModelSynchronizerImpl method updateColumn.

@Override
@SuppressWarnings("unchecked")
public List<BaseColumnFieldDiff> updateColumn(final Pattern52 originalPattern, final ConditionCol52 originalColumn, final Pattern52 editedPattern, final ConditionCol52 editedColumn) throws VetoException {
    final PatternConditionMetaData originalMetaData = new PatternConditionMetaData(originalPattern, originalColumn);
    final PatternConditionMetaData editedMetaData = new PatternConditionMetaData(editedPattern, editedColumn);
    for (Synchronizer synchronizer : synchronizers) {
        if (synchronizer.handlesUpdate(originalMetaData)) {
            return synchronizer.update(originalMetaData, editedMetaData);
        }
    }
    return Collections.emptyList();
}
Also used : Synchronizer(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer) ModelSynchronizer(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer) PatternConditionMetaData(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.ConditionColumnSynchronizer.PatternConditionMetaData)

Example 2 with PatternConditionMetaData

use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.ConditionColumnSynchronizer.PatternConditionMetaData in project drools-wb by kiegroup.

the class ModelSynchronizerImpl method appendColumn.

@Override
@SuppressWarnings("unchecked")
public void appendColumn(final Pattern52 pattern, final ConditionCol52 column) throws VetoException {
    final PatternConditionMetaData metaData = new PatternConditionMetaData(pattern, column);
    for (Synchronizer synchronizer : synchronizers) {
        if (synchronizer.handlesAppend(metaData)) {
            synchronizer.append(metaData);
            break;
        }
    }
    fireAfterColumnInsertedEvent(column);
}
Also used : Synchronizer(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer) ModelSynchronizer(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer) PatternConditionMetaData(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.ConditionColumnSynchronizer.PatternConditionMetaData)

Aggregations

ModelSynchronizer (org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer)2 Synchronizer (org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer)2 PatternConditionMetaData (org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.ConditionColumnSynchronizer.PatternConditionMetaData)2