Package org.dspace.services

Examples of org.dspace.services.ConfigurationService


            System.out.printf("                %s at %s\n",
                    app.getKind(), app.getURL());
        }

        // Is Discovery available?
        ConfigurationService config = new DSpace().getConfigurationService();
        String consumers = config.getPropertyAsType("event.dispatcher.default.consumers", ""); // Avoid null pointer
        List<String> consumerList = Arrays.asList(consumers.split("\\s*,\\s*"));
        if (consumerList.contains("discovery"))
        {
            System.out.println("     Discovery:  enabled.");
        }

        // Is Lucene search enabled?
        if (consumerList.contains("search"))
        {
            System.out.println(" Lucene search:  enabled.");
        }

        // Java version
        System.out.printf("           JRE:  %s version %s\n",
                          sys.get("java.vendor"),
                          sys.get("java.version"));

        // ant version
        Properties ant = new Properties();
        propStream = Version.class.getResourceAsStream("/ant.properties");
        if (null != propStream)
        {
            ant.load(propStream);
        }
        System.out.printf("   Ant version:  %s\n",
                          ant.get("ant.version"));

        // maven version
        Properties maven = new Properties();
        propStream = Version.class.getResourceAsStream("/maven.properties");
        if (null != propStream)
        {
            maven.load(propStream);
        }
        System.out.printf(" Maven version:  %s\n",
                          maven.get("maven.version"));

        // DSpace directory path
        System.out.printf("   DSpace home:  %s\n",
                          config.getProperty("dspace.dir"));
    }
View Full Code Here



    }

    protected boolean displayStatsType(Context context, String type, DSpaceObject dso) throws SQLException {
        ConfigurationService cs = new DSpace().getConfigurationService();
        return !cs.getPropertyAsType("usage-statistics.authorization.admin." + type, Boolean.TRUE) || AuthorizeManager.isAdmin(context, dso);

    }
View Full Code Here

TOP

Related Classes of org.dspace.services.ConfigurationService

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.