Package org.drools.guvnor.client.decisiontable.analysis.action

Examples of org.drools.guvnor.client.decisiontable.analysis.action.ActionDetector


        } else if ( actionCol instanceof ActionInsertFactCol52 ) {
            key = new InsertFactActionDetectorKey( (ActionInsertFactCol52) actionCol );
        } else {
            key = new UnrecognizedActionDetectorKey( actionCol );
        }
        return new ActionDetector( key,
                                   realCellValue );
    }
View Full Code Here


        return actionDetectorMap.get(key);
    }

    public void putOrMergeActionDetector(ActionDetector actionDetector) {
        ActionDetectorKey key = actionDetector.getKey();
        ActionDetector originalActionDetector = actionDetectorMap.get(key);
        ActionDetector mergedActionDetector;
        if (originalActionDetector == null) {
            mergedActionDetector = actionDetector;
        } else {
            mergedActionDetector = originalActionDetector.merge(actionDetector);
        }
View Full Code Here

    }

    private void detectMultipleValuesForOneAction(Analysis analysis) {
        for (Map.Entry<ActionDetectorKey, ActionDetector> entry : actionDetectorMap.entrySet()) {
            ActionDetectorKey key = entry.getKey();
            ActionDetector actionDetector = entry.getValue();
            if (actionDetector.isMultipleValuesForOneAction()) {
                analysis.addMultipleValuesForOneAction("Multiple values for one action.");
            }
        }
    }
View Full Code Here

            boolean multipleValuesForOneAction = false;
            boolean duplicatedAction = false;

            for (Map.Entry<ActionDetectorKey, ActionDetector> entry : actionDetectorMap.entrySet()) {
                ActionDetectorKey key = entry.getKey();
                ActionDetector actionDetector = entry.getValue();
                ActionDetector otherActionDetector = otherRowDetector.getActionDetector(key);
                // If 1 field is in both
                if (otherActionDetector != null) {
                    ActionDetector mergedActionDetector = actionDetector.merge(otherActionDetector);
                    if (mergedActionDetector.isMultipleValuesForOneAction()) {
                        multipleValuesForOneAction = true;
                    }
                    if (mergedActionDetector.isDuplicated()) {
                        duplicatedAction = true;
                    }
                }
            }
            if (multipleValuesForOneAction) {
View Full Code Here

                    realCellValue = visibleCellValue;
                    cellIsNotBlank = visibleCellValue.hasValue();
                }
                // Blank cells are ignored
                if ( cellIsNotBlank ) {
                    ActionDetector actionDetector = buildActionDetector( model,
                                                                         actionCol,
                                                                         realCellValue );
                    rowDetector.putOrMergeActionDetector( actionDetector );
                }
            }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.decisiontable.analysis.action.ActionDetector

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.