Examples of InfoDescriptor


Examples of org.apache.avalon.meta.info.InfoDescriptor

        super( name );
    }

    protected Descriptor getDescriptor()
    {
        return new InfoDescriptor(
          m_name, m_classname, m_version, m_lifestyle, m_collection, m_schema, getProperties());
    }
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

    }

    protected void checkDescriptor( Descriptor desc )
    {
        super.checkDescriptor( desc );
        InfoDescriptor info = (InfoDescriptor) desc;
        assertEquals( m_name, info.getName() );
        assertEquals( m_classname, info.getClassname() );
        assertEquals( m_version, info.getVersion() );
        assertEquals( m_lifestyle, info.getLifestyle() );
        assertEquals( InfoDescriptor.getCollectionPolicy( m_collection ), info.getCollectionPolicy() );
        assertEquals( m_schema, info.getConfigurationSchema() );
    }
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

    public void testConstructor()
    {
        try
        {
            new InfoDescriptor(
              m_name, null, m_version, m_lifestyle, m_collection, m_schema, getProperties() );
            fail("Did not throw the proper NullPointerException");
        }
        catch (NullPointerException npe)
        {
            // Success!
        }

        try
        {
            new InfoDescriptor(
              m_name, "foo/fake/ClassName", m_version, m_lifestyle, m_collection,
              m_schema, getProperties());
            fail("Did not throw the proper IllegalArgumentException");
        }
        catch (IllegalArgumentException iae)
        {
            // Success!
        }

        try
        {
            new InfoDescriptor(
              m_name, m_classname, m_version, InfoDescriptor.POOLED, m_collection,
              m_schema, getProperties() );
            new InfoDescriptor(
              m_name, m_classname, m_version, InfoDescriptor.SINGLETON, m_collection,
              m_schema, getProperties() );
            new InfoDescriptor(
              m_name, m_classname, m_version, InfoDescriptor.THREAD, m_collection,
              m_schema, getProperties() );
            new InfoDescriptor(
              m_name, m_classname, m_version, InfoDescriptor.TRANSIENT, m_collection,
              m_schema, getProperties() );

            // All these should pass.

            new InfoDescriptor(
              m_name, m_classname, m_version, "Fake Lifestyle", m_collection,
              m_schema, getProperties() );

            fail( "Did not throw the proper IllegalArgumentException" );
        }
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        final String lifestyle = getLifestyle( tag );
        final String collection = getLifestyleCollectionPolicy( tag );
        final String type = getJavaClass().getFullyQualifiedName();
        final Properties properties = new AttributeTag( getJavaClass() ).getProperties();
        final String schema = new SchemaTag( getJavaClass() ).getConfigurationSchema();
        final InfoDescriptor info =
          new InfoDescriptor(
            name, type, version, lifestyle, collection, schema, properties );
        final ServiceDescriptor[] services = new ServicesTag( getJavaClass() ).getServices();
        final CategoryDescriptor[] loggers = new LoggerTag( getJavaClass() ).getCategories();
        final DependencyDescriptor[] dependencies =
          new DependencyTag( getJavaClass() ).getDependencies();
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        // meta-data level - change is backward compatible
        //

        configuration = info.getChild( "info", false );

        final InfoDescriptor descriptor =
            buildInfoDescriptor( classname, configuration );

        configuration = info.getChild( "loggers" );
        final CategoryDescriptor[] loggers = buildLoggers( configuration );
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

          buildLifestyle( info, attributes );
        final String collectionLegacy =
          info.getChild( "lifestyle" ).getAttribute( "collection", null );
        final String collection =
          info.getChild( "collection" ).getValue( collectionLegacy );
        return new InfoDescriptor(
          name, classname, version, lifestyle, collection, schema, attributes );
    }
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        Configuration configuration = null;

        configuration = info.getChild( "block" );

        final InfoDescriptor descriptor =
          buildInfoDescriptor( classname, configuration );

        configuration = info.getChild( "loggers" );
        final CategoryDescriptor[] loggers = new CategoryDescriptor[0];
        final ContextDescriptor context =
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        final Version version =
          buildVersion( info.getChild( "version" ).getValue( "1.0" ) );
        final Properties attributes =
            buildAttributes( info.getChild( "attributes" ) );
        final String lifestyle = InfoDescriptor.SINGLETON;
        return new InfoDescriptor(
          name, classname, version, lifestyle, null, schema, attributes );
    }
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        Configuration configuration = null;

        configuration = info.getChild( "block" );

        final InfoDescriptor descriptor =
          buildInfoDescriptor( classname, configuration );

        configuration = info.getChild( "loggers" );
        final CategoryDescriptor[] loggers = new CategoryDescriptor[0];
        final ContextDescriptor context =
View Full Code Here

Examples of org.apache.avalon.meta.info.InfoDescriptor

        final Version version =
          buildVersion( info.getChild( "version" ).getValue( "1.0" ) );
        final Properties attributes =
            buildAttributes( info.getChild( "attributes" ) );
        final String lifestyle = InfoDescriptor.SINGLETON;
        return new InfoDescriptor(
          name, classname, version, lifestyle, schema, attributes );
    }
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.