Examples of CatalogBase


Examples of org.apache.beehive.netui.core.chain.impl.CatalogBase

        if(catalogConfig == null)
            return null;

        CatalogFactory catalogFactory = getInstance();
        assert catalogFactory != null;
        Catalog catalog = new CatalogBase();
        List chainConfigs = catalogConfig.getCommands();
        for(int i = 0; i < chainConfigs.size(); i++) {
            CommandConfig commandConfig = (CommandConfig)chainConfigs.get(i);
            assert commandConfig != null;

            if(commandConfig instanceof ChainConfig) {
                ChainConfig chainConfig = (ChainConfig)commandConfig;
                Chain chain = new ChainBase();

                List commandConfigs = chainConfig.getCommands();
                for(int j = 0; j < commandConfigs.size(); j++) {
                    CommandConfig chainCommandConfig = (CommandConfig)commandConfigs.get(j);
                    Command command = createCommand(chainCommandConfig);
                    chain.addCommand(command);
                }
                catalog.addCommand(chainConfig.getName(), chain);
            }
            else {
                Command command = createCommand(commandConfig);
                catalog.addCommand(commandConfig.getId(), command);
            }
        }
        catalogFactory.setCatalog(catalog);
        return catalogFactory;
    }
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

   * (non-Javadoc)
   *
   * @see org.springframework.beans.factory.config.AbstractFactoryBean#createInstance()
   */
  protected Object createInstance() throws Exception {
    return new CatalogBase();
  }
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

    /**
     * <p>Test the default {@link Catalog} instance.</p>
     */
    public void testDefaultCatalog() {

        Catalog catalog = new CatalogBase();
        factory.setCatalog(catalog);
        assertTrue(catalog == factory.getCatalog());
        assertEquals(0, getCatalogCount());

    }
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

    /**
     * <p>Test adding a specifically named {@link Catalog} instance.</p>
     */
    public void testSpecificCatalog() {

        Catalog catalog = new CatalogBase();
        factory.setCatalog(catalog);
        catalog = new CatalogBase();
        factory.addCatalog("foo", catalog);
        assertTrue(catalog == factory.getCatalog("foo"));
        assertEquals(1, getCatalogCount());
        factory.addCatalog("foo", new CatalogBase());
        assertEquals(1, getCatalogCount());
        assertTrue(!(catalog == factory.getCatalog("foo")));
        CatalogFactory.clear();
        factory = CatalogFactory.getInstance();
        assertEquals(0, getCatalogCount());
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

        // Retrieve or create the Catalog instance we may be updating
        Catalog catalog = null;
        if (attr != null) {
            catalog = (Catalog) context.getAttribute(attr);
            if (catalog == null) {
                catalog = new CatalogBase();
            }
        }

        // Construct the configuration resource parser we will use
        ConfigParser parser = new ConfigParser();
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

        // Retrieve or create the Catalog instance we may be updating
        Catalog catalog = null;
        if (attr != null) {
            catalog = (Catalog) context.getAttribute(attr);
            if (catalog == null) {
                catalog = new CatalogBase();
            }
        }

        // Construct the configuration resource parser we will use
        ConfigParser parser = new ConfigParser();
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

        // Retrieve or create the Catalog instance we may be updating
        Catalog catalog = null;
        if (attr != null) {
            catalog = (Catalog) context.getAttribute(attr);
            if (catalog == null) {
                catalog = new CatalogBase();
            }
        }

        // Construct the configuration resource parser we will use
        ConfigParser parser = new ConfigParser();
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

        // Retrieve or create the Catalog instance we may be updating
        Catalog catalog = null;
        if (attr != null) {
            catalog = (Catalog) context.getAttribute(attr);
            if (catalog == null) {
                catalog = new CatalogBase();
            }
        }

        // Construct the configuration resource parser we will use
        ConfigParser parser = new ConfigParser();
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

    /**
     * Set up instance variables required by this test case.
     */
    public void setUp() {
        catalog = new CatalogBase();
        CatalogFactoryBase.getInstance().setCatalog(catalog);
        command = new LookupCommand();       
        context = new ContextBase();
    }
View Full Code Here

Examples of org.apache.commons.chain.impl.CatalogBase

    /**
     * Set up instance variables required by this test case.
     */
    public void setUp() {
        catalog = new CatalogBase();
        CatalogFactoryBase.getInstance().setCatalog(catalog);
        command = new DispatchLookupCommand();       
        context = new ContextBase();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.