Package org.apache.marmotta.platform.core.model.module

Examples of org.apache.marmotta.platform.core.model.module.ModuleConfiguration


        // resource resolving by the filter
        this.resourceMap = new HashMap<String, String>();


        for(String module : moduleService.listModules()) {
            ModuleConfiguration config = moduleService.getModuleConfiguration(module);

            if(config.getConfiguration().containsKey("baseurl")) {
                String path = config.getConfiguration().getString("baseurl");
                resourceMap.put(path.startsWith("/")?path:"/"+path,moduleService.getModuleJar(module).toString());
            }
        }

View Full Code Here


            if(configurationStarted) {
                log.warn("Apache Marmotta Startup: configuration already started; ignoring second request");
                return;
            }

            ModuleConfiguration coreConfiguration = moduleService.getModuleConfiguration(this.getClass());

            if(coreConfiguration.hasBuildInfo()) {
                log.info("Apache Marmotta Core Version {} starting up ... ", coreConfiguration.getModuleVersion());
                log.info("Build Information:");
                log.info(" - Build User: {}", coreConfiguration.getBuildUser());
                log.info(" - Build Host: {}", coreConfiguration.getBuildHost());
                log.info(" - Build Time: {}", coreConfiguration.getBuildTimestamp());
                log.info(" - Build OS:   {}", coreConfiguration.getBuildOS());
                log.info(" - Revision:   {}", coreConfiguration.getBuildRevisionHash());
                versionNumber = coreConfiguration.getModuleVersion();
            } else {
                log.info("Apache Marmotta Core (Development Version) starting up ... ");
            }

            if(StringUtils.isBlank(home)) {
View Full Code Here

        HashMap<String, Map<String, String>> mods = new HashMap<String, Map<String, String>>();

        for (String moduleName : moduleService.listModules()) {
            Configuration cfg = moduleService.getModuleConfiguration(moduleName).getConfiguration();
            if (cfg != null) {
                ModuleConfiguration mCfg = new ModuleConfiguration(cfg);
                if (mCfg.hasBuildInfo()) {
                    Map<String, String> result = new LinkedHashMap<String, String>();

                    result.put("id", mCfg.getModuleId());
                    result.put("version", mCfg.getModuleVersion());
                    result.put("timestamp", mCfg.getBuildTimestamp());
                    result.put("revNumber", mCfg.getBuildRevisionNumber());
                    result.put("revHash", mCfg.getBuildRevisionHash());
                    result.put("user", mCfg.getBuildUser());
                    result.put("host", mCfg.getBuildHost());
                    result.put("os", mCfg.getBuildOS());

                    final List<String> adminPages = moduleService.getAdminPages(moduleName);
                    if (adminPages != null && adminPages.size() > 0 && adminPages.get(0).trim().length() > 0) {
                        result.put("admin",
                                moduleService.getModuleWeb(moduleName) +
View Full Code Here

        // resource resolving by the filter
        this.resourceMap = new HashMap<String, String>();


        for(String module : moduleService.listModules()) {
            ModuleConfiguration config = moduleService.getModuleConfiguration(module);

            if(config.getConfiguration().containsKey("baseurl")) {
                String path = config.getConfiguration().getString("baseurl");
                resourceMap.put(path.startsWith("/")?path:"/"+path,moduleService.getModuleJar(module).toString());
            }
        }

View Full Code Here

    @Produces
    public ModuleConfiguration getModuleConfiguration(InjectionPoint injectionPoint) {
        URL jarUrl = injectionPoint.getMember().getDeclaringClass().getProtectionDomain().getCodeSource().getLocation();
        Configuration cfg = jarURLs.get(jarUrl.toString());
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here

    @Override
    public ModuleConfiguration getModuleConfiguration(Class<?> cls) {
        URL jarUrl = cls.getProtectionDomain().getCodeSource().getLocation();
        Configuration cfg = jarURLs.get(jarUrl.toString());
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here

    @Override
    public ModuleConfiguration getModuleConfiguration(String moduleName) {

        Configuration cfg = configurationMap.get(moduleName);
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here

            if(configurationStarted) {
                log.warn("Apache Marmotta Startup: configuration already started; ignoring second request");
                return;
            }

            ModuleConfiguration coreConfiguration = moduleService.getModuleConfiguration(this.getClass());

            if(coreConfiguration.hasBuildInfo()) {
                log.info("Apache Marmotta Core Version {} starting up ... ", coreConfiguration.getModuleVersion());
                log.info("Build Information:");
                log.info(" - Build User: {}", coreConfiguration.getBuildUser());
                log.info(" - Build Host: {}", coreConfiguration.getBuildHost());
                log.info(" - Build Time: {}", coreConfiguration.getBuildTimestamp());
                log.info(" - Build OS:   {}", coreConfiguration.getBuildOS());
                log.info(" - Revision:   {}", coreConfiguration.getBuildRevisionHash());
                versionNumber = coreConfiguration.getModuleVersion();
            } else {
                log.info("Apache Marmotta Core (Development Version) starting up ... ");
            }

            if(StringUtils.isBlank(home)) {
View Full Code Here

            if(configurationStarted) {
                log.warn("Apache Marmotta Startup: configuration already started; ignoring second request");
                return;
            }

            ModuleConfiguration coreConfiguration = moduleService.getModuleConfiguration(this.getClass());

            if(coreConfiguration.hasBuildInfo()) {
                log.info("Apache Marmotta Core Version {} starting up ... ", coreConfiguration.getModuleVersion());
                log.info("Build Information:");
                log.info(" - Build User: {}", coreConfiguration.getBuildUser());
                log.info(" - Build Host: {}", coreConfiguration.getBuildHost());
                log.info(" - Build Time: {}", coreConfiguration.getBuildTimestamp());
                log.info(" - Build OS:   {}", coreConfiguration.getBuildOS());
                log.info(" - Revision:   {}", coreConfiguration.getBuildRevisionHash());
                versionNumber = coreConfiguration.getModuleVersion();
            } else {
                log.info("Apache Marmotta Core (Development Version) starting up ... ");
            }

            if(StringUtils.isBlank(home)) {
View Full Code Here

    @Produces
    public ModuleConfiguration getModuleConfiguration(InjectionPoint injectionPoint) {
        URL jarUrl = injectionPoint.getMember().getDeclaringClass().getProtectionDomain().getCodeSource().getLocation();
        Configuration cfg = jarURLs.get(jarUrl.toString());
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.platform.core.model.module.ModuleConfiguration

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.