Examples of ModuleConfig


Examples of org.apache.struts.config.ModuleConfig

        }

        // Calculate and cache the form name
        FormComponent form = (FormComponent) component;
        String action = form.getAction();
        ModuleConfig moduleConfig = form.lookupModuleConfig(context);
        ActionConfig actionConfig = moduleConfig.findActionConfig(action);
        if (actionConfig == null) {
            throw new IllegalArgumentException("Cannot find action '" +
                                               action + "' configuration");
        }
        String beanName = actionConfig.getAttribute();
View Full Code Here

Examples of org.apache.struts.config.ModuleConfig

     */
    protected MessageResources getResources(HttpServletRequest request,
        String key) {
        // Identify the current module
        ServletContext context = getServlet().getServletContext();
        ModuleConfig moduleConfig =
            ModuleUtils.getInstance().getModuleConfig(request, context);

        // Return the requested message resources instance
        return (MessageResources) context.getAttribute(key
            + moduleConfig.getPrefix());
    }
View Full Code Here

Examples of org.apache.struts.config.ModuleConfig

            getServletContext().setAttribute(Globals.ACTION_SERVLET_KEY, this);
            initModuleConfigFactory();

            // Initialize modules as needed
            ModuleConfig moduleConfig = initModuleConfig("", config);

            initModuleMessageResources(moduleConfig);
            initModulePlugIns(moduleConfig);
            initModuleFormBeans(moduleConfig);
            initModuleForwards(moduleConfig);
            initModuleExceptionConfigs(moduleConfig);
            initModuleActions(moduleConfig);
            moduleConfig.freeze();

            Enumeration names = getServletConfig().getInitParameterNames();

            while (names.hasMoreElements()) {
                String name = (String) names.nextElement();

                if (!name.startsWith(configPrefix)) {
                    continue;
                }

                String prefix = name.substring(configPrefixLength);

                moduleConfig =
                    initModuleConfig(prefix,
                        getServletConfig().getInitParameter(name));
                initModuleMessageResources(moduleConfig);
                initModulePlugIns(moduleConfig);
                initModuleFormBeans(moduleConfig);
                initModuleForwards(moduleConfig);
                initModuleExceptionConfigs(moduleConfig);
                initModuleActions(moduleConfig);
                moduleConfig.freeze();
            }

            this.initModulePrefixes(this.getServletContext());

            this.destroyConfigDigester();
View Full Code Here

Examples of org.g4studio.core.mvc.xstruts.config.ModuleConfig

    super.setModuleConfig(moduleConfig);
    this.getRequestScope().put(Globals.MODULE_KEY, moduleConfig);
  }

  public ModuleConfig getModuleConfig() {
    ModuleConfig mc = super.getModuleConfig();

    if (mc == null) {
      mc = (ModuleConfig) this.getRequestScope().get(Globals.MODULE_KEY);
    }
View Full Code Here

Examples of org.jboss.as.deployment.module.ModuleConfig

        final VirtualFile deploymentRoot = getVirtualFileAttachment(context);
        final ModuleIdentifier moduleIdentifier = ModuleIdentifier.create("deployment." + deploymentRoot.getName());
        final ModuleConfig.ResourceRoot[] resourceRoots = createResourceRoots(context.getAttachment(DeploymentStructure.ATTACHMENT_KEY));
        final ModuleDependencies dependenciesAttachment = getAttachedDependencies(context);
        final ModuleConfig.Dependency[] dependencies = dependenciesAttachment != null ? dependenciesAttachment.getDependencies() : NO_DEPS;
        final ModuleConfig moduleConfig = new ModuleConfig(moduleIdentifier, dependencies, resourceRoots);
        context.putAttachment(ModuleConfig.ATTACHMENT_KEY, moduleConfig);
    }
View Full Code Here

Examples of org.jmanage.core.config.ModuleConfig

        ApplicationType appType =
                ApplicationTypes.getApplicationType(connForm.getType());

        assert appType.getId().equals("connector"): "Invalid app type: " + connForm.getType();

        ModuleConfig moduleConfig = appType.getModule();
        MetaApplicationConfig metaAppConfig = moduleConfig.getMetaApplicationConfig();
        request.setAttribute(RequestAttributes.META_APP_CONFIG, metaAppConfig);

        if (connForm.getConnectorId() == null
                || connForm.getConnectorId().length() == 0
                || connForm.getConnectorId().equals("none")) {
View Full Code Here

Examples of org.lilyproject.runtime.module.ModuleConfig

        }
        for (ModuleDefinition entry : model.getModules()) {
            if (infolog.isInfoEnabled()) {
                infolog.debug("Reading module config " + entry.getId() + " - " + entry.getFile().getAbsolutePath());
            }
            ModuleConfig moduleConf = ModuleConfigBuilder.build(entry, this);
            moduleConfigs.add(moduleConf);
        }

        // Check / build class path configurations
        Conf classLoadingConf = confRegistry.getConfiguration("classloading");
        List<ClasspathEntry> sharedClasspath = ClassLoaderConfigurer.configureClassPaths(moduleConfigs,
                settings.getEnableArtifactSharing(), classLoadingConf);

        // Construct the shared classloader
        infolog.debug("Creating shared classloader");

        rootClassLoader = ClassLoaderBuilder.build(sharedClasspath, this.getClass().getClassLoader(), settings.getRepository());

        // Construct the classloaders of the various modules
        List<ClassLoader> moduleClassLoaders = new ArrayList<ClassLoader>();
        for (ModuleConfig cfg : moduleConfigs) {
            ClassLoader classLoader = cfg.getClassLoadingConfig().getClassLoader(getClassLoader());
            moduleClassLoaders.add(classLoader);
        }

        // Initialize the ConfManager for the modules configuration
        confManager.initModulesConfig(moduleConfigs);

        // Create the modules
        infolog.info("Starting the modules.");

        modules = new ArrayList<Module>(model.getModules().size());
        for (int i = 0; i < moduleConfigs.size(); i++) {
            ModuleConfig moduleConfig = moduleConfigs.get(i);
            Module module = ModuleBuilder.build(moduleConfig, moduleClassLoaders.get(i), this);
            modules.add(module);
            modulesById.put(module.getDefinition().getId(), module);
        }
View Full Code Here

Examples of org.olat.core.configuration.ModuleConfig

      // ----- startup brasato -----
      ServiceFactory.init(servletContext);

      log.info("*** OLAT framework: starting all modules");
      // this is the first call to get the Spring beans, all beans are initialized after this point
      ModuleConfig mc = (ModuleConfig)CoreSpringFactory.getBean("org.olat.core.configuration.ModuleConfig");
      Map modules = mc.getModules();
      // init all registered OLATModules - olat::: we assume silently that the order is not important
      for (Iterator iter = modules.keySet().iterator(); iter.hasNext();) {
        moduleID = (String) iter.next();
        ModuleLifeCycle mlc = (ModuleLifeCycle)modules.get(moduleID);
        mlc.init(servletContext);
View Full Code Here

Examples of org.olat.core.configuration.ModuleConfig

   */
  public void destroy() {
    log.info("*** Destroying OLAT servlet.");
   
    //send all modules the destroy signal
    ModuleConfig mc = (ModuleConfig)CoreSpringFactory.getBean("org.olat.core.configuration.ModuleConfig");
    Map modules = mc.getModules();
    for (Iterator iter = modules.keySet().iterator(); iter.hasNext();) {
      String moduleID = (String) iter.next();
      try {
        ModuleLifeCycle mlc = (ModuleLifeCycle)modules.get(moduleID);
        mlc.destroy();
View Full Code Here

Examples of org.terasology.config.ModuleConfig

        }
    }

    @Override
    public void onClosed() {
        ModuleConfig moduleConfig = config.getDefaultModSelection();
        moduleConfig.clear();
        for (ModuleSelectionInfo info : sortedModules) {
            if (info.isSelected() && info.isExplicitSelection()) {
                moduleConfig.addModule(info.getMetadata().getId());
            }
        }
        if (!moduleConfig.hasModule(config.getWorldGeneration().getDefaultGenerator().getModuleName())) {
            config.getWorldGeneration().setDefaultGenerator(new SimpleUri());
        }
        config.save();
    }
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.