Search in sources :

Example 1 with ComponentLoader

use of org.entando.entando.aps.system.init.util.ComponentLoader in project entando-core by entando.

the class ComponentManager method loadComponents.

protected void loadComponents() throws ApsSystemException {
    try {
        ComponentLoader loader = new ComponentLoader(this.getLocationPatterns(), this.getPostProcessClasses());
        Map<String, Component> componentMap = loader.getComponents();
        List<Component> components = new ArrayList<Component>();
        components.addAll(componentMap.values());
        List<Component> orderedComponents = this.getOrderedComponents(components);
        this.setComponents(orderedComponents);
    } catch (Throwable t) {
        _logger.error("Error loading components definitions", t);
        throw new ApsSystemException("Error loading components definitions", t);
    }
}
Also used : ArrayList(java.util.ArrayList) ApsSystemException(com.agiletec.aps.system.exception.ApsSystemException) Component(org.entando.entando.aps.system.init.model.Component) ComponentLoader(org.entando.entando.aps.system.init.util.ComponentLoader)

Aggregations

ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)1 ArrayList (java.util.ArrayList)1 Component (org.entando.entando.aps.system.init.model.Component)1 ComponentLoader (org.entando.entando.aps.system.init.util.ComponentLoader)1