Package fr.soleil.salsa.entity.event

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


            return;
        }

        this.config = config;
        if (config.getScanAddOn() == null) {
            config.setScanAddOn(new ScanAddOnModel());
        }
        IScanAddOns scanAddOns = config.getScanAddOn();

        if (scanAddOns.getHooks() == null) {
            scanAddOns.setHooks(new ListModel<IHook, ScanAddOnModel>(new ArrayList<IHook>(),
View Full Code Here


        }
        this.config = config;
        if (config != null) {

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

            if (scanAddOns.getPostScanBehaviour() == null) {
                scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
View Full Code Here

            catch (ScanNotFoundException e) {
            }

            IScanAddOns scanAddOns = config.getScanAddOn();
            if (scanAddOns == null) {
                scanAddOns = new ScanAddOnModel();
                config.setScanAddOn(scanAddOns);
            }

            errorStrategy = scanAddOns.getErrorStrategy();
            if (errorStrategy == null) {
View Full Code Here

     * @param listen
     */
    private void enableListening(IScanAddOns isao, boolean listen) {
        if (isao == null)
            return;
        ScanAddOnModel saom = (ScanAddOnModel) isao;

        if (listen) {
            saom.addListener(listenerScanAddOn);
        }
        else {
            saom.removeListener(listenerScanAddOn);
        }

        enableListening(saom.getErrorStrategy(), listen);
        enableListening(saom.getPostScanBehaviour(), listen);
        enableListening(saom.getDisplay(), listen);
        if (isao.getHooks() != null) {
            for (IHook oh : isao.getHooks()) {
                enableListening(oh, listen);
            }
        }
View Full Code Here

            config = new ConfigImpl();
            // return;
        }

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

        if (scanAddOns.getErrorStrategy() == null) {
            ErrorStrategyModel strategyModel = new ErrorStrategyModel();
View Full Code Here

        dbconfig = null;
        if (config != null) {
            try {
                dbconfig = SalsaAPI.getConfigById(config.getId(), true);
                if (dbconfig.getScanAddOn() == null) {
                    dbconfig.setScanAddOn(new ScanAddOnModel());
                }

                if (getPostScanBehaviour(dbconfig) == null) {
                    getScanAddOn(dbconfig).setPostScanBehaviour(new PostScanBehaviourModel());
                }
            }
            catch (ScanNotFoundException e) {
            }

            if (config.getScanAddOn() == null) {
                config.setScanAddOn(new ScanAddOnModel());
            }

            if (getPostScanBehaviour(config) == null) {
                getScanAddOn(config).setPostScanBehaviour(new PostScanBehaviourModel());
            }
View Full Code Here

    public void hookListChanged(Stage stage, List<IHookCommand> commandList) {
        // System.out.println("hookListChanged=" + stage + commandList.size());
        if (config != null) {
            IScanAddOns scanAddOns = config.getScanAddOn();
            if (scanAddOns == null) {
                scanAddOns = new ScanAddOnModel();
                config.setScanAddOn(scanAddOns);
            }
            if (scanAddOns != null) {
                List<IHook> hookList = scanAddOns.getHooks();
                if (hookList == null) {
View Full Code Here

        }
        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());
        }

        IPostScanBehaviour scanBehaviourImpl = getPostScanBehaviour();
        if (scanBehaviourImpl != null) {
            scanAddOnModel.setPostScanBehaviour(scanBehaviourImpl.toModel());
        }

        List<IHook> hookListImpl = getHooks();
        if (hookListImpl != null) {
            List<IHook> hookListModel = new ArrayList<IHook>();
            for (IHook hookImpl : hookListImpl) {
                hookListModel.add(hookImpl.toModel());
            }
            scanAddOnModel.setHooks(hookListModel);
        }

        return scanAddOnModel;
    }
View Full Code Here

            }
            catch (ScanNotFoundException e) {
            }

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

            if (scanAddOns.getPostScanBehaviour() == null) {
                scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
View Full Code Here

        }
        this.config = config;
        if (config != null) {

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

            if (scanAddOns.getPostScanBehaviour() == null) {
                scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
View Full Code Here

TOP

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

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.