Package fr.soleil.salsa.entity.event

Examples of fr.soleil.salsa.entity.event.ErrorStrategyModel


        }
        return model;
    }

    protected IErrorStrategy initModel() {
        ErrorStrategyModel strategyModel = new ErrorStrategyModel(this);
        IErrorStrategyItem itemImpl = getHooksErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setHooksErrorStrategy(itemImpl.toModel());
        }
        itemImpl = getActuatorsErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setActuatorsErrorStrategy(itemImpl.toModel());
        }

        itemImpl = getSensorsErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setSensorsErrorStrategy(itemImpl.toModel());
        }

        itemImpl = getTimebasesErrorStrategy();
        if (itemImpl != null) {
            strategyModel.setTimebasesErrorStrategy(itemImpl.toModel());
        }
        return strategyModel;
    }
View Full Code Here


                config.setScanAddOn(scanAddOns);
            }

            errorStrategy = scanAddOns.getErrorStrategy();
            if (errorStrategy == null) {
                errorStrategy = new ErrorStrategyModel();
                scanAddOns.setErrorStrategy(errorStrategy);
                errorStrategy.setContextValidationStrategy(ErrorStrategyType.IGNORE);
                errorStrategy.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
            }
View Full Code Here

            config.setScanAddOn(new ScanAddOnModel());
        }
        scanAddOns = config.getScanAddOn();

        if (scanAddOns.getErrorStrategy() == null) {
            ErrorStrategyModel strategyModel = new ErrorStrategyModel();
            strategyModel.setActuatorsErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getActuatorsErrorStrategy());
            strategyModel.setSensorsErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getSensorsErrorStrategy());
            strategyModel.setHooksErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getHooksErrorStrategy());
            strategyModel.setTimebasesErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getTimebasesErrorStrategy());
            scanAddOns.setErrorStrategy(strategyModel);
            strategyModel.setContextValidationStrategy(ErrorStrategyType.IGNORE);
            strategyModel.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
        }
        errorStrategy = scanAddOns.getErrorStrategy();

        refresh();
View Full Code Here

     * @param ies
     * @param listen
     */
    private void enableListening(IErrorStrategy ies, boolean listen) {
        if (ies instanceof ErrorStrategyModel) { // this test returns false if ies is null
            ErrorStrategyModel esm = (ErrorStrategyModel) ies;
            if (listen) {
                esm.addListener(listenerErrorStrategy);
            }
            else {
                esm.removeListener(listenerErrorStrategy);
            }
            enableListening(esm.getActuatorsErrorStrategy(), listen);
            enableListening(esm.getSensorsErrorStrategy(), listen);
            enableListening(esm.getTimebasesErrorStrategy(), listen);
            enableListening(esm.getHooksErrorStrategy(), listen);
        }
    }
View Full Code Here

            config.setScanAddOn(new ScanAddOnModel());
        }
        scanAddOns = config.getScanAddOn();

        if (scanAddOns.getErrorStrategy() == null) {
            ErrorStrategyModel strategyModel = new ErrorStrategyModel();
            strategyModel.setActuatorsErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getActuatorsErrorStrategy());
            strategyModel.setSensorsErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getSensorsErrorStrategy());
            strategyModel.setHooksErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getHooksErrorStrategy());
            strategyModel.setTimebasesErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(strategyModel.getTimebasesErrorStrategy());
            scanAddOns.setErrorStrategy(strategyModel);
            strategyModel.setContextValidationStrategy(ErrorStrategyType.IGNORE);
            strategyModel.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
        }
        errorStrategy = scanAddOns.getErrorStrategy();

        refresh();
View Full Code Here

                config.setScanAddOn(scanAddOns);
            }

            errorStrategy = scanAddOns.getErrorStrategy();
            if (errorStrategy == null) {
                errorStrategy = new ErrorStrategyModel();
                scanAddOns.setErrorStrategy(errorStrategy);
                errorStrategy.setContextValidationStrategy(ErrorStrategyType.IGNORE);
                errorStrategy.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
            }
View Full Code Here

    private void enableListening(IErrorStrategy ies, boolean listen) {
        if (ies == null) {
            return;
        }

        ErrorStrategyModel esm = (ErrorStrategyModel) ies;
        if (listen) {
            esm.addListener(listenerErrorStrategy);
        }
        else {
            esm.removeListener(listenerErrorStrategy);
        }
        enableListening(esm.getActuatorsErrorStrategy(), listen);
        enableListening(esm.getSensorsErrorStrategy(), listen);
        enableListening(esm.getTimebasesErrorStrategy(), listen);
        enableListening(esm.getHooksErrorStrategy(), listen);
    }
View Full Code Here

            config.setScanAddOn(new ScanAddOnModel());
        }
        scanAddOns = config.getScanAddOn();

        if (scanAddOns.getErrorStrategy() == null) {
            ErrorStrategyModel strategyModel = new ErrorStrategyModel();
            scanAddOns.setErrorStrategy(strategyModel);
            strategyModel.setContextValidationStrategy(ErrorStrategyType.IGNORE);
            strategyModel.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
        }
        errorStrategy = scanAddOns.getErrorStrategy();
        if (errorStrategy.getActuatorsErrorStrategy() == null) {
            errorStrategy.setActuatorsErrorStrategy(new ErrorStrategyItemModel());
            setDefaultValues(errorStrategy.getActuatorsErrorStrategy());
View Full Code Here

                config.setScanAddOn(scanAddOns);
            }

            errorStrategy = scanAddOns.getErrorStrategy();
            if (errorStrategy == null) {
                errorStrategy = new ErrorStrategyModel();
                scanAddOns.setErrorStrategy(errorStrategy);
                errorStrategy.setContextValidationStrategy(ErrorStrategyType.IGNORE);
                errorStrategy.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
            }
View Full Code Here

                config.setScanAddOn(scanAddOns);
            }

            errorStrategy = scanAddOns.getErrorStrategy();
            if (errorStrategy == null) {
                errorStrategy = new ErrorStrategyModel();
                scanAddOns.setErrorStrategy(errorStrategy);
                errorStrategy.setContextValidationStrategy(ErrorStrategyType.IGNORE);
                errorStrategy.setContextValidationDevice(CONTEXT_VALIDATION_ATTRIBUTE_DEFAULT);
            }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.event.ErrorStrategyModel

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.