Package org.apache.avalon.framework.component

Examples of org.apache.avalon.framework.component.Component


            return super.select(hint);
        } catch (Exception e) {
            // if it isn't loaded, it may already be compiled...
            try {
                ComponentHandler handler = (ComponentHandler) this.componentHandlers.get(hint);
                Component component = (Component) handler.get();
                componentMapping.put(component, handler);
                return component;
            } catch (Exception ce) {
                getLogger().debug("Could not access component for hint: " + hint);
                throw new ComponentException("Could not access component for hint: " + hint, null);
View Full Code Here


            try {
                return super.select(hint);
               
            } catch(ComponentException ce) {
                // Doesn't exist here : try in parent selector
                Component component = this.parentSelector.select(hint);
                this.parentComponents.add(component);
                return component;
            }
        }
    }
View Full Code Here

            this.manager2.initialize();
           
            ListIterator li = hints.listIterator();
            while ( li.hasNext() ) {
                String modeName = (String) li.next();
                Component helper = modeMapping.select( modeName );
                if ( !defaultModeNames.containsKey( MODE_OTHERS ) && helper instanceof AttributeHelper ) {
                    defaultModeNames.put( MODE_OTHERS, modeName );
                    if (getLogger().isDebugEnabled())
                        getLogger().debug(modeName + " default mode for normal columns");
                }
View Full Code Here

            final Object[] objects = (Object[])stack.pop();
            final Map components = (Map)objects[2];
            final Iterator iter = components.values().iterator();
            while (iter.hasNext()) {
                final Object[] o = (Object[])iter.next();
                final Component component = (Component)o[0];
                ((ComponentManager)o[1]).release( component );
            }
        }
    }
View Full Code Here

        if ( null != stack && !stack.empty()) {
            final Object[] objects = (Object[])stack.peek();
            final Map components = (Map)objects[2];
            final Object[] o = (Object[])components.get(role);
            if ( null != o  ) {
                final Component component = (Component) o[0];
                if ( null != component ) {
                    return component;
                }
            }
        }

        final Component component = super.lookup( role );
        if ( null != component && component instanceof RequestLifecycleComponent) {
            if ( stack == null || stack.empty() ) {
                throw new ComponentException("ComponentManager has no Environment Stack.");
            }
            final Object[] objects = (Object[]) stack.peek();
View Full Code Here

     * @param environment an <code>Environment</code> value
     * @exception Exception if an error occurs
     */
    public void generateSitemap(Environment environment)
    throws Exception {
        Component processor = this.componentManager.lookup(Processor.ROLE);
        try {
            if (processor instanceof SitemapManager) {
                ((SitemapManager)processor).generateSitemap(environment);
            }
        } finally {
View Full Code Here

     * @param hint the Configuration object used to look up the repository
     *
     * @return whether the mail store has a repository corresponding to this hint
     */
    public boolean hasComponent( Object hint ) {
        Component comp = null;
        try {
            comp = select(hint);
        } catch(ComponentException ex) {
            if (getLogger().isErrorEnabled()) {
                getLogger().error("Exception AvalonMailStore.hasComponent-" + ex.toString());
View Full Code Here

            if (objects[3] == ONE) {
                final Map components = (Map)objects[2];
                final Iterator iter = components.values().iterator();
                while (iter.hasNext()) {
                    final Object[] o = (Object[])iter.next();
                    final Component component = (Component)o[0];
                    ((CocoonComponentManager)o[1]).releaseRLComponent( component );
                }
            }
        }
    }
View Full Code Here

        if ( null != stack && !stack.empty()) {
            final Object[] objects = (Object[])stack.peek();
            final Map components = (Map)objects[2];
            final Object[] o = (Object[])components.get(role);
            if ( null != o  ) {
                final Component component = (Component) o[0];
                if (null != component) {
                    return component;
                }
            }
        }

        final Component component = super.lookup( role );
        if (null != component && component instanceof RequestLifecycleComponent) {
            if (stack == null || stack.empty()) {
                throw new ComponentException("ComponentManager has no Environment Stack.");
            }
            final Object[] objects = (Object[]) stack.peek();
View Full Code Here

     * @param environment an <code>Environment</code> value
     * @exception Exception if an error occurs
     */
    public void generateSitemap(Environment environment)
    throws Exception {
        Component processor = this.componentManager.lookup(Processor.ROLE);
        try {
            if (processor instanceof SitemapManager) {
                ((SitemapManager)processor).generateSitemap(environment);
            }
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.component.Component

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.