Package de.innovationgate.wga.modules

Examples of de.innovationgate.wga.modules.OptionDefinitionsMap


    public Class<? extends ModuleType> getModuleType() {
        return WorkflowEngineModuleType.class;
    }

    public OptionDefinitionsMap getOptionDefinitions() {
        return new OptionDefinitionsMap();
    }
View Full Code Here


        return AuthenticationSourceModuleType.class;
    }

    public OptionDefinitionsMap getOptionDefinitions() {

        OptionDefinitionsMap options = new OptionDefinitionsMap();
       
        LocalizedOptionDefinition file = new LocalizedOptionDefinition(FileAuthenticationModule.AUTH_FILE, ServerFilePathOptionType.INSTANCE, _bundleLoader);
        options.addOption(file);
       
       
        return options;
   
    }
View Full Code Here

        return AuthenticationSourceModuleType.class;
    }

    public OptionDefinitionsMap getOptionDefinitions() {

        OptionDefinitionsMap options = new OptionDefinitionsMap();
       
        LocalizedOptionDefinition dbKey = new LocalizedOptionDefinition(CSAuthModule.COPTION_DBKEY, new PluginsOptionType(_registry, PluginsOptionType.USAGE_AUTHSOURCE), _bundleLoader);
        options.addOption(dbKey);
       
        return options;
       
    }
View Full Code Here

        return AuthenticationSourceModuleType.class;
    }

    public OptionDefinitionsMap getOptionDefinitions() {

        OptionDefinitionsMap options = new OptionDefinitionsMap();
       
        LocalizedOptionDefinition collectCondition = new LocalizedOptionDefinition(CSAuthModule.COPTION_COLLECT_CONDITION, TMLScriptCodeOptionType.INSTANCE, _bundleLoader);
        collectCondition.setOptional(true);
        options.addOption(collectCondition);

        LocalizedOptionDefinition dbKey = new LocalizedOptionDefinition(CSAuthModule.COPTION_DBKEY, new DatabasesOptionType(_registry, true), _bundleLoader);
        options.addOption(dbKey);

        LocalizedOptionDefinition itemAliases = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_ALIASES, StringOptionType.INSTANCE, _bundleLoader);
        itemAliases.setOptional(true);
        itemAliases.setDefaultValue(CSAuthModule.DEFAULTITEM_USERALIASES);
        options.addOption(itemAliases);
       
        LocalizedOptionDefinition itemEmail = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_EMAIL, StringOptionType.INSTANCE, _bundleLoader);
        itemEmail.setOptional(true);
        itemEmail.setDefaultValue(CSAuthModule.DEFAULTITEM_EMAIL);
        options.addOption(itemEmail);
       
        LocalizedOptionDefinition itemEnabled = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_ENABLED, StringOptionType.INSTANCE, _bundleLoader);
        itemEnabled.setOptional(true);
        itemEnabled.setDefaultValue(CSAuthModule.DEFAULTITEM_ENABLED);
        options.addOption(itemEnabled);
       
        LocalizedOptionDefinition itemGroupmembers = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_GROUPMEMBERS, StringOptionType.INSTANCE, _bundleLoader);
        itemGroupmembers.setOptional(true);
        itemGroupmembers.setDefaultValue(CSAuthModule.DEFAULTITEM_MEMBERS);
        options.addOption(itemGroupmembers);
       
        LocalizedOptionDefinition itemGroupname = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_GROUPNAME, StringOptionType.INSTANCE, _bundleLoader);
        itemGroupname.setOptional(true);
        itemGroupname.setDefaultValue(CSAuthModule.DEFAULTITEM_GROUPNAME);
        options.addOption(itemGroupname);
       
        LocalizedOptionDefinition itemPassword = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_PASSWORD, StringOptionType.INSTANCE, _bundleLoader);
        itemPassword.setOptional(true);
        itemPassword.setDefaultValue(CSAuthModule.DEFAULTITEM_PASSWORD);
        options.addOption(itemPassword);
       
        LocalizedOptionDefinition itemUsername = new LocalizedOptionDefinition(CSAuthModule.COPTION_ITEM_USERNAME, StringOptionType.INSTANCE, _bundleLoader);
        itemUsername.setOptional(true);
        itemUsername.setDefaultValue(CSAuthModule.DEFAULTITEM_USERNAME);
        options.addOption(itemUsername);
       
        LocalizedOptionDefinition usersRoot = new LocalizedOptionDefinition(CSAuthModule.COPTION_ROOTDOC_USERS, StringOptionType.INSTANCE, _bundleLoader);
        usersRoot.setOptional(true);
        usersRoot.setDefaultValue(CSAuthModule.DEFAULT_USERSROOT);
        options.addOption(usersRoot);

        LocalizedOptionDefinition groupsRoot = new LocalizedOptionDefinition(CSAuthModule.COPTION_ROOTDOC_GROUPS, StringOptionType.INSTANCE, _bundleLoader);
        groupsRoot.setOptional(true);
        groupsRoot.setDefaultValue(CSAuthModule.DEFAULT_GROUPSROOT);
        options.addOption(groupsRoot);
       
        LocalizedOptionDefinition collectScript = new LocalizedOptionDefinition(CSAuthModule.COPTION_SCRIPT_COLLECT, TMLScriptCodeOptionType.INSTANCE, _bundleLoader);
        collectScript.setOptional(true);
        collectScript.setExpert(true);
        options.addOption(collectScript);
       
        LocalizedOptionDefinition labeledNames = new LocalizedOptionDefinition(CSAuthModule.COPTION_LABELED_NAMES, CommaSeparatedListOptionType.INSTANCE, _bundleLoader);
        labeledNames.setOptional(true);
        options.addOption(labeledNames);
       
        LocalizedOptionDefinition  certAuth = new LocalizedOptionDefinition(CSAuthModule.COPTION_CERTAUTH, BooleanOptionType.INSTANCE, _bundleLoader);
        certAuth.setOptional(true);
        certAuth.setExpert(true);
        options.addOption(certAuth);

        LocalizedOptionDefinition  ca = new LocalizedOptionDefinition(CSAuthModule.COPTION_CA, ServerFilePathOptionType.INSTANCE, _bundleLoader);
        ca.setExpert(true);
        ca.addDependentOption(CSAuthModule.COPTION_CERTAUTH);
        options.addOption(ca);
       
        LocalizedOptionDefinition  crl = new LocalizedOptionDefinition(CSAuthModule.COPTION_CRL, ServerFilePathOptionType.INSTANCE, _bundleLoader);
        crl.addDependentOption(CSAuthModule.COPTION_CA);
        crl.setExpert(true);
        crl.addDependentOption(CSAuthModule.COPTION_CERTAUTH);
        options.addOption(crl);

       
        return options;
       
       
View Full Code Here

        return getClass();
    }

    public OptionDefinitionsMap getOptionDefinitions() {
       
        OptionDefinitionsMap options = new OptionDefinitionsMap();
       
        Class<? extends OptionsCollector> typeClass = getClass();
        collectOptions(options, typeClass);
       
        return options;
View Full Code Here

                    for (ModuleDefinition def : defs) {
                        if (def == null) {
                            continue;
                        }
                       
                        OptionDefinitionsMap optionDefs = def.getOptionDefinitions();
                        LinkedHashMap<String,String> options = (LinkedHashMap<String, String>) desc.getReadMethod().invoke(configBean);
                        optionDefs.sort(options);
                       
                       
                    }
                }
            }
View Full Code Here

    public Object readOptionValueOrDefault(String optionName) throws OptionConversionException {
       
        // Get option definition map if available
        OptionDefinition optDef = null;
        if (_moduleDefinition != null) {
            OptionDefinitionsMap optDefMap = _moduleDefinition.getOptionDefinitions();
            if (optDefMap != null) {
                optDef = optDefMap.get(optionName);
            }
        }
       
        // If we have no option definition we can bypass all the fuzz and do a simple get
        if (optDef == null) {
View Full Code Here

                    for (ModuleDefinition def : defs) {
                        if (def == null) {
                            continue;
                        }
                       
                        OptionDefinitionsMap optionDefs = def.getOptionDefinitions();
                       
                        Map<String,String> options = (Map<String, String>) desc.getReadMethod().invoke(configBean);
                        Iterator<Map.Entry<String,String>> optionsIt = options.entrySet().iterator();
                       
                        while (optionsIt.hasNext()) {
                            Map.Entry option = optionsIt.next();
                            OptionDefinition optionDef = optionDefs.get(option.getKey());
                            if (optionDef != null && optionDef.isOptional() && optionDef.getDefaultValue() != null && optionDef.getDefaultValue().equals(option.getValue())) {
                                LOG.info("Removing option '" + option.getKey() + "' on default value '" + optionDef.getDefaultValue() + "' from configuration object '" + configBean.getClass().getName());
                                optionsIt.remove();
                            }
                        }
View Full Code Here

TOP

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

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.