Search in sources :

Example 6 with BaseHeaderMetaData

use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData in project drools-wb by kiegroup.

the class ActionInsertFactColumnConverter method makeHeaderMetaData.

@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    return new ArrayList<GridColumn.HeaderMetaData>() {

        {
            if (column instanceof ActionInsertFactCol52) {
                ActionInsertFactCol52 actionInsertFactColumn = (ActionInsertFactCol52) column;
                StringBuilder headerFirstRow = new StringBuilder();
                if (actionInsertFactColumn.getBoundName() != null && !actionInsertFactColumn.getBoundName().isEmpty()) {
                    headerFirstRow.append(actionInsertFactColumn.getBoundName()).append(" : ");
                }
                headerFirstRow.append(actionInsertFactColumn.getFactType());
                add(new BaseHeaderMetaData(headerFirstRow.toString(), ActionCol52.class.getName()));
                add(new BaseHeaderMetaData(column.getHeader(), headerFirstRow.toString()));
            } else {
                add(new BaseHeaderMetaData(column.getHeader(), ActionCol52.class.getName()));
            }
        }
    };
}
Also used : ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) ArrayList(java.util.ArrayList) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn)

Example 7 with BaseHeaderMetaData

use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData in project drools-wb by kiegroup.

the class ActionSetFieldColumnConverter method makeHeaderMetaData.

@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    return new ArrayList<GridColumn.HeaderMetaData>() {

        {
            if (column instanceof ActionSetFieldCol52) {
                ActionSetFieldCol52 actionSetFieldColumn = (ActionSetFieldCol52) column;
                if (actionSetFieldColumn.getBoundName() != null && !actionSetFieldColumn.getBoundName().isEmpty()) {
                    add(new BaseHeaderMetaData(actionSetFieldColumn.getBoundName(), ActionCol52.class.getName()));
                    add(new BaseHeaderMetaData(column.getHeader(), actionSetFieldColumn.getBoundName()));
                }
            } else {
                add(new BaseHeaderMetaData(column.getHeader(), ActionCol52.class.getName()));
            }
        }
    };
}
Also used : ArrayList(java.util.ArrayList) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)

Example 8 with BaseHeaderMetaData

use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData in project drools-wb by kiegroup.

the class ActionWorkItemExecuteColumnConverter method makeHeaderMetaData.

@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    final PortableWorkDefinition pwd = ((ActionWorkItemCol52) column).getWorkItemDefinition();
    final String workItemName = pwd == null ? column.getHeader() : pwd.getName();
    return new ArrayList<GridColumn.HeaderMetaData>() {

        {
            add(new BaseHeaderMetaData(workItemName, ActionCol52.class.getName()));
            add(new BaseHeaderMetaData(column.getHeader(), workItemName + "-exec"));
        }
    };
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) PortableWorkDefinition(org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition) ArrayList(java.util.ArrayList) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn)

Aggregations

BaseHeaderMetaData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData)8 ArrayList (java.util.ArrayList)7 GridColumn (org.uberfire.ext.wires.core.grids.client.model.GridColumn)6 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)2 Path (org.uberfire.backend.vfs.Path)2 PortableWorkDefinition (org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)1 ActionWorkItemCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52)1 ActionWorkItemInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52)1 ActionWorkItemSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemSetFieldCol52)1 ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)1 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)1 ColumnDefinitionBuilder (org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ColumnDefinitionBuilder)1 ColumnDefinitionFactory (org.drools.workbench.screens.guided.dtable.client.widget.table.popovers.definitions.ColumnDefinitionFactory)1 Before (org.junit.Before)1 Test (org.junit.Test)1 BaseGridColumn (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn)1 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)1 RowNumberColumn (org.uberfire.ext.wires.core.grids.client.widget.grid.columns.RowNumberColumn)1