Package org.apache.cocoon.components

Examples of org.apache.cocoon.components.CocoonComponentManager


                getLogger().debug("Sitemap has no components definition at " + tree.getLocation());
            }
            config = new DefaultConfiguration("", "");
        }

        ComponentManager manager = new CocoonComponentManager(this.parentManager);

        LifecycleHelper.setupComponent(manager,
            getLogger(),
            this.context,
            this.parentManager,
View Full Code Here


    /**
     * Set the current <code>ComponentManager</code> instance used by this
     * <code>Composable</code>.
     */
    public void compose(ComponentManager manager) throws ComponentException {
        this.manager = new CocoonComponentManager(manager);
        this.manager.setLogger(getLogger());
        this.manager.contextualize(this.context);
        this.manager.setRoleManager(AbstractSitemap.roleManager);
        this.manager.setLogKitManager(AbstractSitemap.logKitManager);

View Full Code Here

                getLogger().debug("Sitemap has no components definition at " + tree.getLocation());
            }
            config = new DefaultConfiguration("", "");
        }

        ComponentManager manager = new CocoonComponentManager(this.parentManager);

        LifecycleHelper.setupComponent(manager,
            getLogger(),
            this.context,
            this.parentManager,
            this.roleManager,
            this.logKit,
            config
        );

        // Set parent of all selectors.
        if (this.parentManager != null) {

            for (int i = 0; i < ComponentsSelector.SELECTOR_ROLES.length; i++) {

                String role = ComponentsSelector.SELECTOR_ROLES[i];

                ComponentSelector parentSelector = null;
                try {
                    parentSelector = (ComponentSelector)this.parentManager.lookup(role);
                } catch(Exception e) {
                    // ignore and keep it null
                }

                if (parentSelector != null) {

                    ExtendedComponentSelector localSelector = null;
                    try {
                        localSelector = (ExtendedComponentSelector)manager.lookup(role);

                        if (localSelector != parentSelector) {
                            // local selector wasn't given by chaining to the parent manager
                            localSelector.setParentSelector(parentSelector);
                        }
                        manager.release(localSelector);

                    } catch(Exception e) {
                        // ignore
                    }
View Full Code Here

     *
     * @exception Exception if an error occurs
     */
    public void initialize() throws Exception {
        if (parentComponentManager != null) {
            this.componentManager = new CocoonComponentManager(parentComponentManager,(ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        } else {
            this.componentManager = new CocoonComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        }
        this.componentManager.setLogger(getLogger().getChildLogger("manager"));
        this.componentManager.contextualize(this.context);

        if (getLogger().isDebugEnabled()) {
View Full Code Here

     *
     * @exception Exception if an error occurs
     */
    public void initialize() throws Exception {
        if (parentComponentManager != null) {
            this.componentManager = new CocoonComponentManager(parentComponentManager,
                                                               (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        } else {
            this.componentManager = new CocoonComponentManager((ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        }
        ContainerUtil.enableLogging(this.componentManager, this.rootLogger.getChildLogger("manager"));
        ContainerUtil.contextualize(this.componentManager, this.context);
        this.componentManager.setInstrumentManager(this.instrumentManager);
        getLogger().debug("New Cocoon object.");
View Full Code Here

                getLogger().debug("Sitemap has no components definition at " + tree.getLocation());
            }
            config = new DefaultConfiguration("", "");
        }
       
        final CocoonComponentManager manager = new CocoonComponentManager(this.parentManager);
       
        manager.enableLogging(getLogger());
       
        final LoggerManager loggerManager = (LoggerManager) this.parentManager.lookup(LoggerManager.ROLE);
        manager.setLoggerManager(loggerManager);

        if (null != this.context ) {
            manager.contextualize(this.context);
        }

        if (null != this.roleManager) {
            manager.setRoleManager(this.roleManager);
        }

        manager.configure(config);
        manager.initialize();

        return manager;
    }
View Full Code Here

     *
     * @exception Exception if an error occurs
     */
    public void initialize() throws Exception {
        if (parentComponentManager != null) {
            this.componentManager = new CocoonComponentManager(parentComponentManager,
                                                               (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        } else {
            this.componentManager = new CocoonComponentManager((ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        }
        ContainerUtil.enableLogging(this.componentManager, this.rootLogger.getChildLogger("manager"));
        ContainerUtil.contextualize(this.componentManager, this.context);
        this.componentManager.setInstrumentManager(this.instrumentManager);
        getLogger().debug("New Cocoon object.");
View Full Code Here

                getLogger().debug("Sitemap has no components definition at " + tree.getLocation());
            }
            config = new DefaultConfiguration("", "");
        }
       
        final CocoonComponentManager manager = new CocoonComponentManager(this.parentManager);
       
        manager.enableLogging(getLogger());
       
        final LoggerManager loggerManager = (LoggerManager) this.parentManager.lookup(LoggerManager.ROLE);
        manager.setLoggerManager(loggerManager);

        if (null != this.context ) {
            manager.contextualize(this.context);
        }

        if (null != this.roleManager) {
            manager.setRoleManager(this.roleManager);
        }

        manager.configure(config);
        manager.initialize();

        return manager;
    }
View Full Code Here

     *
     * @exception Exception if an error occurs
     */
    public void initialize() throws Exception {
        if (parentComponentManager != null) {
            this.componentManager = new CocoonComponentManager(parentComponentManager,
                                                               (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        } else {
            this.componentManager = new CocoonComponentManager((ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        }
        ContainerUtil.enableLogging(this.componentManager, getLogger().getChildLogger("manager"));
        ContainerUtil.contextualize(this.componentManager, this.context);
        this.componentManager.setInstrumentManager(this.instrumentManager);

View Full Code Here

     *
     * @exception Exception if an error occurs
     */
    public void initialize() throws Exception {
        if (parentComponentManager != null) {
            this.componentManager = new CocoonComponentManager(parentComponentManager,(ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        } else {
            this.componentManager = new CocoonComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        }
        ContainerUtil.enableLogging(this.componentManager, getLogger().getChildLogger("manager"));
        ContainerUtil.contextualize(this.componentManager, this.context);
        this.componentManager.setInstrumentManager(this.instrumentManager);

View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.CocoonComponentManager

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.