Package de.innovationgate.wga.modules.properties

Examples of de.innovationgate.wga.modules.properties.DesignSourceProperties


        OptionDefinitionsMap options = new OptionDefinitionsMap();
        return options;
    }
   
    public Object getProperties() {
        DesignSourceProperties props = new DesignSourceProperties();
        props.setDesignProviderClass(FileSystemDesignProvider.class);
        props.setSingleton(true);
        props.setSingletonUID(WGAConfiguration.UID_DESIGNSOURCE_FILESYSTEM);
        props.setSingletonTitle("defaultds.title");
        props.setSingletonTitleBundleLoader(_bundleLoader);
        return props;
    }
View Full Code Here


        OptionDefinitionsMap options = new OptionDefinitionsMap();
        return options;
    }

    public Object getProperties() {
        DesignSourceProperties props = new DesignSourceProperties();
        props.setDesignProviderClass(PluginDesignProvider.class);
        props.setSingleton(true);
        props.setSingletonUID(WGAConfiguration.UID_DESIGNSOURCE_PLUGIN);
        props.setSingletonTitle("ds.title");
        props.setSingletonDescription("ds.description");
        props.setSingletonTitleBundleLoader(_bundleLoader);
        return props;
    }
View Full Code Here

       
        return options;
    }

    public Object getProperties() {
        DesignSourceProperties props = new DesignSourceProperties();
        props.setDesignProviderClass(FileSystemDesignProvider.class);
        return props;
    }
View Full Code Here

        OptionDefinitionsMap options = new OptionDefinitionsMap();
        return options;
    }

    public Object getProperties() {
        DesignSourceProperties props = new DesignSourceProperties();
        props.setDesignProviderClass(DBDesignProvider.class);
        props.setSingleton(true);
        props.setSingletonUID(WGAConfiguration.UID_DESIGNSOURCE_DB);
        props.setSingletonTitle("ds.title");
        props.setSingletonDescription("ds.description");
        props.setSingletonTitleBundleLoader(_bundleLoader);
        return props;
    }
View Full Code Here

        Iterator<ModuleDefinition> singletons = core.getModuleRegistry().getModulesForType(DesignSourceModuleType.class).values().iterator();
        while (singletons.hasNext()) {
            ModuleDefinition sourceDefinition = singletons.next();
            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);
                    }
                }
View Full Code Here

            logCategoryInfo("Design source types available in this runtime", 2);
            while (designMods.hasNext()) {
                ModuleDefinition moduleDefinition = designMods.next();
                try {
                    moduleDefinition.testDependencies();
                    DesignSourceProperties props = (DesignSourceProperties) moduleDefinition.getProperties();
                    if (props != null && props.isSingleton()) {
                        getLog().info("- " + moduleDefinition.getTitle(Locale.ENGLISH) + " (Automatic instance)");
                    }
                    else {
                        getLog().info("- " + moduleDefinition.getTitle(Locale.ENGLISH));
                    }
View Full Code Here

        // If design source not found it may be singleton. We try to find the right one in registry
        if (sourceDef == null) {
            Iterator<ModuleDefinition> modDefs = registry.getModulesForType(DesignSourceModuleType.class).values().iterator();
            while (modDefs.hasNext()) {
                ModuleDefinition moduleDefinition = (ModuleDefinition) modDefs.next();
                DesignSourceProperties props = (DesignSourceProperties) moduleDefinition.getProperties();
                if (props != null && props.isSingleton() && props.getSingletonUID().equals(getSource())) {
                    sourceDef = moduleDefinition;
                    break;
                }
            }
        }
       
        // Ask the source definition about the type of design provider
        if (sourceDef != null) {
            DesignSourceProperties props = (DesignSourceProperties) sourceDef.getProperties();
            if (props != null && props.getDesignProviderClass() != null) {
                return props.getDesignProviderClass().getName();
            }
        }
       
        return null;
       
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.modules.properties.DesignSourceProperties

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.