Package de.innovationgate.wga.common

Examples of de.innovationgate.wga.common.LocalizedInformation


            try {
                sourceDefinition.testDependencies();
                final DesignSourceProperties properties = (DesignSourceProperties) sourceDefinition.getProperties();
                if (properties != null && properties.isSingleton()) {
                    try {
                        LocalizedInformation locInfo = new LocalizedInformation() {
                           
                            public String getTitle(Locale locale) {
                                return properties.getSingletonTitle(locale);
                            }
                           
                            public String getDescription(Locale locale) {
                                return properties.getSingletonDescription(locale);
                            }
                        };
                       
                        WGADesignSource designSource = (WGADesignSource) core.getModuleRegistry().instantiate(sourceDefinition);
                        designSource.init(_core, properties.getSingletonUID(), locInfo, new HashMap<String,String>());
                        core.getLog().info("Registering design source '" + designSource.getTitle(Locale.getDefault()) + "' (Automatically created)");
                        _designSources.put(properties.getSingletonUID(), designSource);
                    }
                    catch (Exception e) {
                        core.getLog().error("Exception registering design source " + sourceDefinition.getTitle(Locale.getDefault()), e);
                    }
                }
            }
            catch (ModuleDependencyException e) {
                core.getLog().warn("Design source " + sourceDefinition.getTitle(Locale.getDefault()) + " deactivated in current WGA runtime: " + e.getMessage());
            }
        }
       
       
        // 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) {
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.LocalizedInformation

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.