Examples of IErrorStrategy


Examples of fr.soleil.salsa.entity.IErrorStrategy

                    // Error strategies.
                    if (config.getScanAddOn() != null
                            && config.getScanAddOn().getErrorStrategy() != null) {

                        IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                        IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                                errorStrat.getActuatorsErrorStrategy(),
                                errorStrat.getSensorsErrorStrategy(),
                                errorStrat.getTimebasesErrorStrategy(),
                                errorStrat.getHooksErrorStrategy() };
                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount",
                                    errorStrategyRetryCount));
                            // Retry time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "RetryTimeOut", errorStrategyRetryTimeOut));
                            // Error strategy.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "ErrorStrategy", errorStrategyType));
                        }
                        // Context validation error strategy.
                        scanServerProxy.write_attribute(new DeviceAttribute(
                                "contextValidationErrorStrategy", errorStrat
                                        .getContextValidationStrategy().ordinal()));

                        scanServerProxy.write_attribute(new DeviceAttribute("contextValidation",
                                errorStrat.getContextValidationDevice()));
                    }

                    /* Hooks */
                    SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

     *
     * @param errorStrategy
     */
    @Override
    public void setErrorStrategy(IErrorStrategy errorStrategy) {
        IErrorStrategy oldValue = this.baseBean.getErrorStrategy();
        baseBean.setErrorStrategy(errorStrategy);
        this.firePropertyChange("id", oldValue, errorStrategy);
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

               
                // Error strategies.
                if(config.getScanAddOn() != null
                        && config.getScanAddOn().getErrorStrategy() != null) {
                   
                    IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                    IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                            errorStrat.getActuatorsErrorStrategy()
                            , errorStrat.getSensorsErrorStrategy()
                            , errorStrat.getTimebasesErrorStrategy()
                            , errorStrat.getHooksErrorStrategy()
                    };
                String [] categoriesStr = new String[] {
                        "actuators"
                        , "sensors"
                        , "timebases"
                        , "hooks" };
               
                for(int i=0; i<categoriesStr.length; i++) {
                    String cat = categoriesStr[i];
                    IErrorStrategyItem esi = categoriesESI[i];
                   
                    double errorStrategyTimeOut = esi.getTimeOut();
                    int errorStrategyRetryCount = esi.getRetryCount();
                    double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                    int errorStrategyType = esi.getStrategy().ordinal();
                   
                    // Time out.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut", errorStrategyTimeOut));
                    // Retry count.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount", errorStrategyRetryCount));
                    // Retry time out.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryTimeOut", errorStrategyRetryTimeOut));
                    // Error strategy.
                    scanServerProxy.write_attribute(new DeviceAttribute(cat + "ErrorStrategy", errorStrategyType));
                }
                // Context validation error strategy.
                scanServerProxy.write_attribute(
                        new DeviceAttribute("contextValidationErrorStrategy", errorStrat.getContextValidationStrategy().ordinal()));
               
                scanServerProxy.write_attribute(
                        new DeviceAttribute("contextValidation", errorStrat.getContextValidationDevice()));
                }
               
                /* Hooks */
                SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

        refresh(true);
    }

    private void refresh(boolean saved) {

        IErrorStrategy currentErrorStrategy = errorStrategy;
        if (saved) {
            currentErrorStrategy = dberrorStrategy;
        }

        if (currentErrorStrategy != null && view != null) {
            view.enableListener(false);
            refreshErrorStrategyItem(ErrorStrategyItemType.sensors,
                    currentErrorStrategy.getSensorsErrorStrategy(), saved);
            refreshErrorStrategyItem(ErrorStrategyItemType.actuators,
                    currentErrorStrategy.getActuatorsErrorStrategy(), saved);
            refreshErrorStrategyItem(ErrorStrategyItemType.hooks,
                    currentErrorStrategy.getHooksErrorStrategy(), saved);
            refreshErrorStrategyItem(ErrorStrategyItemType.timebases,
                    currentErrorStrategy.getTimebasesErrorStrategy(), saved);

            /* Context validation */
            String contextValidation = currentErrorStrategy.getContextValidationDevice();
            if (contextValidation != null && !contextValidation.isEmpty()) {
                view.setContextValidationAttribute(contextValidation, saved);
            }
            view.enableListener(true);
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

     *
     * @param errorStrategy
     */
    @Override
    public void setErrorStrategy(IErrorStrategy errorStrategy) {
        IErrorStrategy oldValue = this.baseBean.getErrorStrategy();
        baseBean.setErrorStrategy(errorStrategy);
        this.firePropertyChange("id", oldValue, errorStrategy);
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

                    // Error strategies.
                    if (config.getScanAddOn() != null
                            && config.getScanAddOn().getErrorStrategy() != null) {

                        IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                        IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                                errorStrat.getActuatorsErrorStrategy(),
                                errorStrat.getSensorsErrorStrategy(),
                                errorStrat.getTimebasesErrorStrategy(),
                                errorStrat.getHooksErrorStrategy() };
                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount",
                                    errorStrategyRetryCount));
                            // Retry time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "RetryTimeOut", errorStrategyRetryTimeOut));
                            // Error strategy.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "ErrorStrategy", errorStrategyType));
                        }
                        // Context validation error strategy.
                        scanServerProxy.write_attribute(new DeviceAttribute(
                                "contextValidationErrorStrategy", errorStrat
                                        .getContextValidationStrategy().ordinal()));

                        scanServerProxy.write_attribute(new DeviceAttribute("contextValidation",
                                errorStrat.getContextValidationDevice()));
                    }

                    /* Hooks */
                    SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

                    // Error strategies.
                    if (config.getScanAddOn() != null
                            && config.getScanAddOn().getErrorStrategy() != null) {

                        IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                        IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                                errorStrat.getActuatorsErrorStrategy(),
                                errorStrat.getSensorsErrorStrategy(),
                                errorStrat.getTimebasesErrorStrategy(),
                                errorStrat.getHooksErrorStrategy() };
                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount",
                                    errorStrategyRetryCount));
                            // Retry time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "RetryTimeOut", errorStrategyRetryTimeOut));
                            // Error strategy.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "ErrorStrategy", errorStrategyType));
                        }
                        // Context validation error strategy.
                        scanServerProxy.write_attribute(new DeviceAttribute(
                                "contextValidationErrorStrategy", errorStrat
                                        .getContextValidationStrategy().ordinal()));

                        scanServerProxy.write_attribute(new DeviceAttribute("contextValidation",
                                errorStrat.getContextValidationDevice()));
                    }

                    /* Hooks */
                    SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

        return model;
    }

    protected IScanAddOns initModel() {
        ScanAddOnModel scanAddOnModel = new ScanAddOnModel(this);
        IErrorStrategy errorStategyImpl = getErrorStrategy();
        if (errorStategyImpl != null) {
            scanAddOnModel.setErrorStrategy(errorStategyImpl.toModel());
        }
        IDisplay displayImpl = getDisplay();
        if (errorStategyImpl != null) {
            scanAddOnModel.setDisplay(displayImpl.toModel());
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

                    // Error strategies.
                    if (config.getScanAddOn() != null
                            && config.getScanAddOn().getErrorStrategy() != null) {

                        IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                        IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                                errorStrat.getActuatorsErrorStrategy(),
                                errorStrat.getSensorsErrorStrategy(),
                                errorStrat.getTimebasesErrorStrategy(),
                                errorStrat.getHooksErrorStrategy() };
                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount",
                                    errorStrategyRetryCount));
                            // Retry time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "RetryTimeOut", errorStrategyRetryTimeOut));
                            // Error strategy.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "ErrorStrategy", errorStrategyType));
                        }
                        // Context validation error strategy.
                        scanServerProxy.write_attribute(new DeviceAttribute(
                                "contextValidationErrorStrategy", errorStrat
                                        .getContextValidationStrategy().ordinal()));

                        scanServerProxy.write_attribute(new DeviceAttribute("contextValidation",
                                errorStrat.getContextValidationDevice()));
                    }

                    /* Hooks */
                    SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategy

                    // Error strategies.
                    if (config.getScanAddOn() != null
                            && config.getScanAddOn().getErrorStrategy() != null) {

                        IErrorStrategy errorStrat = config.getScanAddOn().getErrorStrategy();
                        IErrorStrategyItem[] categoriesESI = new IErrorStrategyItem[] {
                                errorStrat.getActuatorsErrorStrategy(),
                                errorStrat.getSensorsErrorStrategy(),
                                errorStrat.getTimebasesErrorStrategy(),
                                errorStrat.getHooksErrorStrategy() };
                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "RetryCount",
                                    errorStrategyRetryCount));
                            // Retry time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "RetryTimeOut", errorStrategyRetryTimeOut));
                            // Error strategy.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat
                                    + "ErrorStrategy", errorStrategyType));
                        }
                        // Context validation error strategy.
                        scanServerProxy.write_attribute(new DeviceAttribute(
                                "contextValidationErrorStrategy", errorStrat
                                        .getContextValidationStrategy().ordinal()));

                        scanServerProxy.write_attribute(new DeviceAttribute("contextValidation",
                                errorStrat.getContextValidationDevice()));
                    }

                    /* Hooks */
                    SetHooks(config.getScanAddOn(), scanServerProxy);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.