Package org.drools.workbench.models.guided.dtable.shared.auditlog

Examples of org.drools.workbench.models.guided.dtable.shared.auditlog.UpdateColumnAuditLogEntry


     * @param userName The user name.
     * @param originCol The source column.
     * @param newCol The new edited column.
     */
    private void fireUpdateColumn(String userName, BaseColumn originCol, BaseColumn newCol) {
        UpdateColumnAuditLogEntry entry = new UpdateColumnAuditLogEntry( userName, originCol, newCol);
        model.getAuditLog().add( entry );
    }
View Full Code Here


            bUpdateColumnDefinition = true;
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

                       true );
        model.getConditions().remove( origColumn );

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

    }
View Full Code Here

                       true );
        model.getConditions().remove( origColumn );

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        //Signal patterns changed event to Decision Table Widget
View Full Code Here

            bUpdateColumnDefinition = true;
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

            bUpdateColumnDefinition = true;
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

            }
            deleteColumn( origColumnIndex,
                          true );

            //Log change to column definition
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );

        } else {

            // Update column's visibility
            if ( origColumn.isHideColumn() != editColumn.isHideColumn() ) {
                setColumnVisibility( origColumn,
                                     !editColumn.isHideColumn() );
            }

            // Change in operator
            if ( !isEqualOrNull( origColumn.getOperator(),
                                 editColumn.getOperator() ) ) {
                bUpdateColumnDefinition = true;

                //Clear otherwise if column cannot accept them
                if ( !canAcceptOtherwiseValues( editColumn ) ) {
                    removeOtherwiseStates( origColumn );
                    bUpdateColumnData = true;
                }
            }

            // Update column's Cell type. Other than the obvious change in data-type if the
            // Operator changes to or from "not set" (possible for literal columns and formulae)
            // the column needs to be changed to or from Text.
            if ( !isEqualOrNull( origPattern.getFactType(),
                                 editPattern.getFactType() )
                    || !isEqualOrNull( origColumn.getFactField(),
                                       editColumn.getFactField() )
                    || !isEqualOrNull( origColumn.getFieldType(),
                                       editColumn.getFieldType() )
                    || !isEqualOrNull( origColumn.getOperator(),
                                       editColumn.getOperator() )
                    || origColumn.getConstraintValueType() != editColumn.getConstraintValueType() ) {
                bUpdateColumnData = true;
                bUpdateColumnDefinition = true;
            }

            // Update column's cell content if the Optional Value list has changed
            if ( !isEqualOrNull( origColumn.getValueList(),
                                 editColumn.getValueList() ) ) {
                bUpdateColumnDefinition = true;
                bUpdateColumnData = updateCellsForOptionValueList( editColumn,
                                                                   origColumn );
            }

            // Update column header in Header Widget
            if ( !origColumn.getHeader().equals( editColumn.getHeader() ) ) {
                bUpdateColumnDefinition = true;
            }

            // Update column binding in Header Widget
            if ( !origColumn.isBound() && editColumn.isBound() ) {
                bUpdateColumnDefinition = true;
            } else if ( origColumn.isBound() && !editColumn.isBound() ) {
                bUpdateColumnDefinition = true;
            } else if ( origColumn.isBound() && editColumn.isBound() && !origColumn.getBinding().equals( editColumn.getBinding() ) ) {
                bUpdateColumnDefinition = true;
            }

            // Update LimitedEntryValue in Header Widget
            if ( origColumn instanceof LimitedEntryCol && editColumn instanceof LimitedEntryCol ) {
                LimitedEntryCol lecOrig = (LimitedEntryCol) origColumn;
                LimitedEntryCol lecEditing = (LimitedEntryCol) editColumn;
                if ( !isEqualOrNull( lecOrig.getValue(),
                                     lecEditing.getValue() ) ) {
                    bUpdateColumnDefinition = true;
                }
            }

            //Log change to column definition
            if ( bUpdateColumnDefinition ) {
                model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                        origColumn,
                                                                        editColumn ) );
            }

            // Copy new values into original column definition
View Full Code Here

            }
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

            }
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

            bUpdateColumnDefinition = true;
        }

        //Log change to column definition
        if ( bUpdateColumnDefinition ) {
            model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
                                                                    origColumn,
                                                                    editColumn ) );
        }

        // Copy new values into original column definition
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtable.shared.auditlog.UpdateColumnAuditLogEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.