use of org.talend.designer.abstractmap.model.tableentry.IColumnEntry in project tdi-studio-se by Talend.
the class ProblemsManager method checkProblemsForAllEntries.
/**
*
* DOC amaumont Comment method "checkProblemsForAllEntries".
*
* @param dataMapTableView
* @param forceRefreshData
* @return true if has errors
*/
@SuppressWarnings("unchecked")
public boolean checkProblemsForAllEntries(DataMapTableView dataMapTableView, boolean forceRefreshData) {
if (forceRefreshData) {
mapperManager.getAbstractMapComponent().restoreMapperModelFromInternalData();
checkProblems();
}
boolean hasProblemsWasNull = false;
if (hasProblems == null) {
hasProblems = Boolean.FALSE;
hasProblemsWasNull = true;
}
if (dataMapTableView.getDataMapTable() instanceof AbstractInOutTable) {
AbstractInOutTable table = (AbstractInOutTable) dataMapTableView.getDataMapTable();
if (table.isActivateExpressionFilter()) {
checkProblemsForTableEntry(table.getExpressionFilter(), false);
}
}
List<IColumnEntry> columnsEntriesList = dataMapTableView.getDataMapTable().getColumnEntries();
checkProblemsForAllEntries(columnsEntriesList);
if (refreshTableEntries) {
dataMapTableView.getTableViewerCreatorForColumns().getTableViewer().refresh(true);
}
if (dataMapTableView.getZone() == Zone.OUTPUTS) {
List<ITableEntry> constraintEntriesList = dataMapTableView.getTableViewerCreatorForFilters().getInputList();
checkProblemsForAllEntries(constraintEntriesList);
if (refreshTableEntries) {
dataMapTableView.getTableViewerCreatorForFilters().getTableViewer().refresh(true);
}
}
boolean returnedValue = hasProblems;
if (hasProblemsWasNull) {
hasProblems = null;
}
return returnedValue;
}
use of org.talend.designer.abstractmap.model.tableentry.IColumnEntry in project tdi-studio-se by Talend.
the class TableEntriesManager method addTableEntry.
/**
* DOC amaumont Comment method "addTableEntry".
*
* @param dataMapTableEntry
* @param index
*/
public void addTableEntry(ITableEntry dataMapTableEntry, Integer index) {
if (dataMapTableEntry == null) {
throw new IllegalArgumentException(Messages.getString(//$NON-NLS-1$
"TableEntriesManager.exceptionMessage.dataMapTableEntryCannotNull"));
}
add(dataMapTableEntry);
IDataMapTable dataMapTable = dataMapTableEntry.getParent();
if (dataMapTableEntry instanceof IColumnEntry) {
if (index == null) {
dataMapTable.addColumnEntry((IColumnEntry) dataMapTableEntry);
} else {
dataMapTable.addColumnEntry((IColumnEntry) dataMapTableEntry, index);
}
} else if (dataMapTableEntry instanceof FilterTableEntry) {
if (index == null) {
((OutputTable) dataMapTable).addFilterEntry((FilterTableEntry) dataMapTableEntry);
} else {
((OutputTable) dataMapTable).addFilterEntry((FilterTableEntry) dataMapTableEntry, index);
}
} else if (dataMapTableEntry instanceof GlobalMapEntry) {
if (index == null) {
((InputTable) dataMapTable).addGlobalMapEntry((GlobalMapEntry) dataMapTableEntry);
} else {
((InputTable) dataMapTable).addGlobalMapEntry((GlobalMapEntry) dataMapTableEntry, index);
}
} else {
String exceptionMessage = Messages.getString("TableEntriesManager.exceptionMessage.typeIsNotValid", //$NON-NLS-1$
dataMapTableEntry.getClass().toString());
throw new IllegalArgumentException(exceptionMessage);
}
// TableEntriesManagerEvent event = new TableEntriesManagerEvent(EVENT_TYPE.ADD);
// event.entry = dataMapTableEntry;
// fireEvent(event);
}
Aggregations