use of org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle in project drools-wb by kiegroup.
the class ActionWorkItemSetFieldPlugin method acceptParameterType.
private boolean acceptParameterType(final PortableParameterDefinition ppd) {
final AsyncPackageDataModelOracle oracle = presenter.getDataModelOracle();
if (nil(editingWrapper().getFactField())) {
return false;
}
if (nil(ppd.getClassName())) {
return false;
}
final String fieldClassName = oracle.getFieldClassName(patternWrapper().getFactType(), editingWrapper().getFactField());
return fieldClassName.equals(ppd.getClassName());
}
use of org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle in project drools-wb by kiegroup.
the class ConditionColumnPlugin method assertDefaultValue.
void assertDefaultValue() {
final CellUtilities cellUtilities = new CellUtilities();
final AsyncPackageDataModelOracle oracle = presenter.getDataModelOracle();
final ColumnUtilities columnUtilities = new ColumnUtilities(model(), oracle);
final List<String> valueList = Arrays.asList(columnUtilities.getValueList(editingCol));
if (valueList.size() > 0) {
final String defaultValue = cellUtilities.asString(editingCol().getDefaultValue());
if (!valueList.contains(defaultValue)) {
editingCol.getDefaultValue().clearValues();
}
} else {
// Ensure the Default Value has been updated to represent the column's data-type.
final DTCellValue52 defaultValue = editingCol().getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(editingPattern(), editingCol());
cellUtilities.convertDTCellValueType(dataType, defaultValue);
}
}
use of org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle in project drools-wb by kiegroup.
the class OperatorPage method getOperatorCompletions.
void getOperatorCompletions(final Callback<String[]> callback) {
final AsyncPackageDataModelOracle oracle = presenter.getDataModelOracle();
oracle.getOperatorCompletions(plugin().getFactType(), plugin().getFactField(), callback);
}
use of org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle in project drools-wb by kiegroup.
the class BaseWidgetFactory method factory.
protected DTCellValueWidgetFactory factory() {
final GuidedDecisionTable52 model = getPlugin().getPresenter().getModel();
final AsyncPackageDataModelOracle oracle = getPlugin().getPresenter().getDataModelOracle();
final boolean allowEmptyValues = model.getTableFormat() == GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY;
return DTCellValueWidgetFactory.getInstance(model, oracle, false, allowEmptyValues);
}
use of org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle in project drools-wb by kiegroup.
the class FieldPage method forEachFactField.
void forEachFactField(Consumer<String> loadedFieldConsumer) {
if (hasEditingPattern()) {
final AsyncPackageDataModelOracle oracle = presenter.getDataModelOracle();
oracle.getFieldCompletions(factType(), getAccessor(), fieldsLoadedCallback(loadedFieldConsumer));
}
}
Aggregations