Package de.innovationgate.wga.modules

Examples of de.innovationgate.wga.modules.ModuleDefinition


            typeClass = ContentStorePublisherOptionsModuleType.class;
            collectorClass = ContentStorePublisherOptionsCollector.class;
        }
       
        if (getModuleRegistry() != null) {
            ModuleDefinition pOptionDefs = getModuleRegistry().getModuleDefinition(typeClass, collectorClass);
            optionDef = pOptionDefs.getOptionDefinitions().get(name);
        }
       

        // Read the option value, default it if neccessary
        Object value = db.getAttribute(name);
View Full Code Here


            className = this.customElements.get(name.toLowerCase());
        }
       
       
        if (className == null) {
            ModuleDefinition modDef = getModuleRegistry().getModuleDefinitionByKey(WebTMLElementModuleType.class, name.toLowerCase());
            if (modDef != null) {
                try {
                    modDef.testDependencies();
                }
                catch (ModuleDependencyException e) {
                    throw new TMLException("WebTML element '" + name + "' not available bc. of missing dependency: " + e.getMessage(), true);
                }
                className = modDef.getImplementationClass().getName();
            }
        }
        
        return className;
    }
View Full Code Here

            Share shareConfig = shareConfigs.next();
            if (!shareConfig.isEnabled()) {
                continue;
            }
           
            ModuleDefinition shareModDefinition = getModuleRegistry().getModuleDefinition(ShareModuleType.class, shareConfig.getImplClassName());
            if (shareModDefinition == null) {
                getLog().error("Unknown content share type '" + shareConfig.getImplClassName() + "'");
                continue;
            }
           
            ShareProperties props = (ShareProperties) shareModDefinition.getProperties();
            try {
                ShareDefinition shareDefinition = props.createShareDefinition(shareConfig);
                shareDefinition.setOrigin(ShareDefinition.ORIGIN_WGACONFIG);
                getLog().info("Initializing content share '" + shareConfig.getName() + "'");
                shareDefinition.init(this);
View Full Code Here

        List<WGAFilterConfig> newFilterMappings = new LinkedList<WGAFilterConfig>();
       
        // read filter mappings from registry
        Iterator filters = getModuleRegistry().getModulesForType(FilterConfigModuleType.class).values().iterator();
        while (filters.hasNext()) {
            ModuleDefinition modDef = (ModuleDefinition) filters.next();
            try {
                modDef.testDependencies();
                FilterMapping mapping = (FilterMapping) modDef.getProperties();
                WGAFilterConfig config = WGAFilterConfig.createFromMapping(mapping);
                if (config != null) {
                    log.info("Adding filter '" + config.getFilterName() + "'");
                    newFilterMappings.add(config);
                }
            }
            catch (ModuleDependencyException e) {
                log.warn("Filter " + modDef.getTitle(Locale.getDefault()) + " deactivated in current WGA runtime: " + e.getMessage());
            }
        }
       
        // read filter mappings from config
        Iterator<FilterMapping> mappings = _wgaConfiguration.getFilterMappings().iterator();
View Full Code Here

    }

    protected void collectOptions(OptionDefinitionsMap options, Class<? extends OptionsCollector> typeClass) {
        Iterator<ModuleDefinition> optionDefs = _registry.getModulesForType(typeClass).values().iterator();
        while (optionDefs.hasNext()) {
             ModuleDefinition optDef = optionDefs.next();
             options.putAll(optDef.getOptionDefinitions());
        }
    }
View Full Code Here

        }
    }

    public String getModuleImplementationClassName(WGAConfiguration config, ModuleRegistry registry) {
       
        ModuleDefinition sourceDef = null;
       
        // We must find the design source for this design, so it can tell us which provider implementation class we have
        if (config != null) {
            DesignSource sourceObj = config.getDesignConfiguration().getDesignSource(source);
            if (sourceObj != null) {
                sourceDef = registry.getModuleDefinition(DesignSourceModuleType.class, sourceObj.getImplClassName());
            }
        }

        // 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;
                }
            }
View Full Code Here

    public List<String> getProvidedValues() {
        List<String> engines = new ArrayList<String>();
        Iterator<ModuleDefinition> types = _reg.getModulesForType(_moduleType).values().iterator();
        while (types.hasNext()) {
            ModuleDefinition moduleDefinition = (ModuleDefinition) types.next();
            engines.add(moduleDefinition.getImplementationClass().getName());
        }
        return engines;
    }
View Full Code Here

        return engines;
    }

    public String getValueTitle(String value, Locale locale) {
        try {
            ModuleDefinition def = _reg.getModuleDefinition(_moduleType.getName(), value);
            if (def != null) {
                return def.getTitle(locale);
            }
            else {
                return value;
            }
        }
View Full Code Here

       
    }

    public String getValueTitle(String value, Locale locale) {
       
        ModuleDefinition def = _reg.getModuleDefinitionByKey(PasswordEncodingType.class, value);
        if (def != null) {
            return def.getTitle(locale);
        }
        return value;
       
    }
View Full Code Here

        }
       
        // If encoding header present try to fetch a matching encoder. Must fail if the encoder cannot be allocated.
        if (encoding != null) {
            try {
                ModuleDefinition modDef = _registry.getModuleDefinitionByKey(PasswordEncodingType.class, encoding);
                if (modDef != null) {
                    encoder = (PasswordOptionEncoder) _registry.instantiate(modDef);
                }
                else {
                    throw new MissingResourceException("Unknown password encoding '" + encoding + "'", null, encoding);
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.modules.ModuleDefinition

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.