Package org.enhydra.jawe.base.transitionhandler

Examples of org.enhydra.jawe.base.transitionhandler.TransitionHandlerSettings


                loggingManager.info("JaWEManager -> Working with '" + StandardLabelGenerator.class.getName() + "' implementation of Label Generator");
            }
        }

        try {
            TransitionHandlerSettings ts = (TransitionHandlerSettings) cl.loadClass(thSettings).newInstance();
            ts.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(thClass).getConstructor(new Class[]{
                        TransitionHandlerSettings.class
                    });
            transitionHandler = (TransitionHandler) c.newInstance(new Object[]{
                        ts
                    });
            loggingManager.info("JaWEManager -> Working with '" + thClass + "' implementation of Transition Handler");
        } catch (Throwable ex) {
            transitionHandler = new TransitionHandler();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating Transition Handler class '" + thClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + TransitionHandler.class.getName() + "' implementation of Transition Handler");
            }
        }

        try {
            IdFactorySettings is = (IdFactorySettings) cl.loadClass(idfSettings).newInstance();
            is.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(idfClass).getConstructor(new Class[]{
                        IdFactorySettings.class
                    });
            idFactory = (IdFactory) c.newInstance(new Object[]{
                        is
                    });
            loggingManager.info("JaWEManager -> Working with '" + idfClass + "' implementation of Id Factory");
        } catch (Throwable ex) {
            idFactory = new IdFactory();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating Id Factory class '" + idfClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + IdFactory.class.getName() + "' implementation of Id Factory");
            }
        }

        try {
            XPDLObjectFactorySettings os = (XPDLObjectFactorySettings) cl.loadClass(xpdlofSettings).newInstance();
            os.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(xpdlofClass).getConstructor(new Class[]{
                        XPDLObjectFactorySettings.class
                    });
            xpdlObjectFactory = (XPDLObjectFactory) c.newInstance(new Object[]{
                        os
                    });
            loggingManager.info("JaWEManager -> Working with '" + xpdlofClass + "' implementation of XPDL Object Factory");
        } catch (Throwable ex) {
            xpdlObjectFactory = new XPDLObjectFactory();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating XPDL Object Factory class '" + xpdlofClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + XPDLObjectFactory.class.getName() + "' implementation of XPDL Object Factory");
            }
        }

        try {
            panelValidator = (StandardPanelValidator) cl.loadClass(pnlvClass).newInstance();
            loggingManager.info("JaWEManager -> Working with '" + pnlvClass + "' implementation of Panel Validator");
        } catch (Throwable ex) {
            panelValidator = new StandardPanelValidator();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating Panel Validator class '" + pnlvClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + StandardPanelValidator.class.getName() + "' implementation of Panel Validator");
            }
        }

        try {
            XPDLValidatorSettings xvs = (XPDLValidatorSettings) cl.loadClass(xpdlvSettings).newInstance();
            xvs.setPropertyMgr(propertyMgr);
            xvs.init(null);

            Constructor c = Class.forName(xpdlvClass).getConstructor(new Class[]{
                        Properties.class
                    });
            xpdlValidator = (StandardPackageValidator) c.newInstance(new Object[]{
                        xvs.getProperties()
                    });
            loggingManager.info("JaWEManager -> Working with '" + xpdlvClass + "' implementation of XPDL Validator");
        } catch (Throwable ex) {
            XPDLValidatorSettings vs = new XPDLValidatorSettings();
            vs.init(null);
            xpdlValidator = new StandardPackageValidator(vs.getProperties());
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating XPDL Validator class '" + xpdlvClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + StandardPackageValidator.class.getName() + "' implementation of XPDL Validator");
            }
        }
        //CUSTOM
        try {
            validationOrSearchResultEditor = new ValidationOrSearchResultEditor();
        } catch (HeadlessException e) {
            // ignore
        }
        //END CUSTOM

        try {
            DisplayNameGeneratorSettings ds = (DisplayNameGeneratorSettings) cl.loadClass(dnSettings).newInstance();
            ds.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(dngClass).getConstructor(new Class[]{
                        DisplayNameGeneratorSettings.class
                    });
            displayNameGenerator = (StandardDisplayNameGenerator) c.newInstance(new Object[]{
                        ds
                    });
            loggingManager.info("JaWEManager -> Working with '" + dngClass + "' implementation of Display Name Generator");
        } catch (Exception ex) {
            displayNameGenerator = new StandardDisplayNameGenerator();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating Display Name Generator class '" + dngClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + StandardDisplayNameGenerator.class.getName() + "' implementation of Display Name Generator");
            }
        }

        try {
            cl.loadClass(panelGeneratorClassName).newInstance();
            loggingManager.info("JaWEManager -> Using '" + panelGeneratorClassName + "' implementation of Panel Generator");
        } catch (Exception ex) {
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaWEManager -> Problems while instantiating Panel Generator class '" + JaWEManager.getInstance().getPanelGeneratorClassName() + "' - using default implementation!";

                JaWEManager.getInstance().getLoggingManager().error(msg, ex);
            }
            panelGeneratorClassName = StandardPanelGenerator.class.getName();
        }
        try {
            cl.loadClass(inlinePanelClassName).newInstance();
            loggingManager.info("JaWEManager -> Using '" + inlinePanelClassName + "' implementation of Inline Panel");
        } catch (Exception ex) {
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaWEManager --> Problems while instantiating InlinePanel class '" + JaWEManager.getInstance().getInlinePanelClassName() + "' - using default implementation!";
                JaWEManager.getInstance().getLoggingManager().error(msg, ex);
            }
            inlinePanelClassName = InlinePanel.class.getName();
        }

        try {
            PanelSettings ps = (PanelSettings) cl.loadClass(xpdlEditorSettings).newInstance();
            ps.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(xpdleeClass).getConstructor(new Class[]{
                        PanelSettings.class
                    });
            xpdlElementEditor = (XPDLElementEditor) c.newInstance(new Object[]{
                        ps
                    });
            loggingManager.info("JaWEManager -> Working with '" + xpdleeClass + "' implementation of XPDL Element Editor ");
        } catch (Throwable ex) {
            //CUSTOM
            try {
                xpdlElementEditor = new NewStandardXPDLElementEditor(new NewStandardXPDLEditorSettings());
            } catch (HeadlessException e) {
                // ignore
            }
            //END CUSTOM
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating XPDL Element Editor class '" + xpdleeClass + "' - using default implementation!";
                loggingManager.info(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + NewStandardXPDLElementEditor.class.getName() + "' implementation of XPDL Element Editor ");
            }
        }

        try {
            TableEditorSettings ts = (TableEditorSettings) cl.loadClass(teSettings).newInstance();
            ts.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(teClass).getConstructor(new Class[]{
                        TableEditorSettings.class
                    });
            tableEditor = (TableEditor) c.newInstance(new Object[]{
                        ts
                    });
            loggingManager.info("JaWEManager -> Working with '" + teClass + "' implementation of Table Editor ");
        } catch (Throwable ex) {
            //CUSTOM
            try {
                tableEditor = new TableEditor(new TableEditorSettings());
            } catch (HeadlessException e) {
                // ignore
            }
            //END CUSTOM
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaweManager -> Problems while instantiating table editor class '" + teClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
                loggingManager.info("JaWEManager -> Working with '" + TableEditor.class.getName() + "' implementation of Table Editor ");
            }
        }

        try {
            TooltipGeneratorSettings ts = (TooltipGeneratorSettings) cl.loadClass(ttgSettings).newInstance();
            ts.setPropertyMgr(propertyMgr);

            Constructor c = Class.forName(ttgClass).getConstructor(new Class[]{
                        TooltipGeneratorSettings.class
                    });
            tooltipGenerator = (StandardTooltipGenerator) c.newInstance(new Object[]{
View Full Code Here

TOP

Related Classes of org.enhydra.jawe.base.transitionhandler.TransitionHandlerSettings

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.