Search in sources :

Example 1 with MCRURIResolver

use of org.mycore.common.xml.MCRURIResolver in project mycore by MyCoRe-Org.

the class MCRStartupHandler method startUp.

public static void startUp(ServletContext servletContext) {
    // setup configuration
    MCRConfigurationDirSetup dirSetup = new MCRConfigurationDirSetup();
    dirSetup.startUp(servletContext);
    LOGGER.info("I have these components for you: {}", MCRRuntimeComponentDetector.getAllComponents());
    LOGGER.info("I have these mycore components for you: {}", MCRRuntimeComponentDetector.getMyCoReComponents());
    LOGGER.info("I have these app modules for you: {}", MCRRuntimeComponentDetector.getApplicationModules());
    if (servletContext != null) {
        LOGGER.info("Library order: {}", servletContext.getAttribute(ServletContext.ORDERED_LIBS));
    }
    MCRConfiguration.instance().getStrings("MCR.Startup.Class", Collections.emptyList()).stream().map(MCRStartupHandler::getAutoExecutable).sorted((o1, o2) -> Integer.compare(o2.getPriority(), o1.getPriority())).forEachOrdered(autoExecutable -> startExecutable(servletContext, autoExecutable));
    // initialize MCRURIResolver
    MCRURIResolver.init(servletContext);
}
Also used : MCRURIResolver(org.mycore.common.xml.MCRURIResolver) Logger(org.apache.logging.log4j.Logger) MCRRuntimeComponentDetector(org.mycore.common.config.MCRRuntimeComponentDetector) MCRConfigurationDirSetup(org.mycore.common.config.MCRConfigurationDirSetup) ServletContext(javax.servlet.ServletContext) MCRConfiguration(org.mycore.common.config.MCRConfiguration) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) MCRConfigurationException(org.mycore.common.config.MCRConfigurationException) MCRConfigurationDirSetup(org.mycore.common.config.MCRConfigurationDirSetup)

Aggregations

Collections (java.util.Collections)1 ServletContext (javax.servlet.ServletContext)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1 MCRConfiguration (org.mycore.common.config.MCRConfiguration)1 MCRConfigurationDirSetup (org.mycore.common.config.MCRConfigurationDirSetup)1 MCRConfigurationException (org.mycore.common.config.MCRConfigurationException)1 MCRRuntimeComponentDetector (org.mycore.common.config.MCRRuntimeComponentDetector)1 MCRURIResolver (org.mycore.common.xml.MCRURIResolver)1