Examples of DesignSource


Examples of de.innovationgate.wga.config.DesignSource

       
       
        // Initialize configured design sources
        Iterator<DesignSource> collections = designSources.iterator();
        while (collections.hasNext()) {
            final DesignSource designSource = (DesignSource) collections.next();
            try {
                String colClassName = designSource.getImplClassName();
                Class colClass = WGACore.getLibraryLoader().loadClass(colClassName);
               
                if (!(WGADesignSource.class.isAssignableFrom(colClass))) {
                    _core.getLog().error("Error registering design source " + designSource.toString() + ". Class " + colClassName + " is no design source implementation.");
                    continue;
                }
               
                LocalizedInformation locInfo = new LocalizedInformation() {
                    public String getTitle(Locale locale) {
                        return designSource.getTitle();
                    }
                   
                    public String getDescription(Locale locale) {
                        return designSource.getDescription();
                    }
                };
               
                WGADesignSource col = (WGADesignSource) core.getModuleRegistry().instantiate(colClass);
                col.init(_core, designSource.getUid(), locInfo, designSource.getOptions());
                _core.getLog().info("Registering design source '" + designSource.toString() + "' of type '" + designSource.getImplClassName() + "'");
                _designSources.put(designSource.getUid(), col);
               
            }
            catch (Exception e) {
                _core.getLog().error("Error initializing design source " + designSource.toString(), e);
            }
           
        }
    }
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.