Package org.apache.avalon.meta.info

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


    {
        final String value = getNamedParameter( tag, TYPE_PARAM );
        final String type = resolveType( value );
        final String versionString = getNamedParameter( tag, VERSION_PARAM, null );
        final Version version = resolveVersion( versionString, value );
        final ReferenceDescriptor ref = new ReferenceDescriptor( type, version );
        return new ServiceDescriptor( ref, null );
    }
View Full Code Here


        final String versionString = getNamedParameter( tag, VERSION_PARAM, null );
        final Version version = resolveVersion( versionString, value );
        final String key = getNamedParameter( tag, KEY_PARAM, type );
        final String optional = getNamedParameter( tag, OPTIONAL_PARAM, "false" );
        final boolean isOptional = "true".equals( optional.toLowerCase() );
        final ReferenceDescriptor ref = new ReferenceDescriptor( type, version );
        return new DependencyDescriptor( key, ref, isOptional, null );
    }
View Full Code Here

            return null;
        }
        final Version version = Version.getVersion( getNamedParameter( tag, VERSION_PARAM, "" ) );
        final String type = getJavaClass().getFullyQualifiedName();
        final Properties properties = new AttributeTag( getJavaClass() ).getProperties();
        final ReferenceDescriptor ref = new ReferenceDescriptor( type, version );
        return new Service( ref, properties );
    }
View Full Code Here

        {
            return createReference( type );
        }
        final String versionString = service.getAttribute( "version", "1.0" );
        final Version version = buildVersion( versionString );
        return new ReferenceDescriptor( type, version );
    }
View Full Code Here

        String role = dependency.getAttribute( "role", null ); // legacy
        if( role == null )
        {
            role = dependency.getAttribute( "key", null );
        }
        ReferenceDescriptor reference =
          buildReferenceDescriptor( dependency );
       
        final boolean optional =
           dependency.getAttributeAsBoolean( "optional", false );
        final Properties attributes =
            buildAttributes( dependency.getChild( "attributes" ) );

        //
        // default to name of service if role unspecified
        //

        if( null == role )
        {
            role = reference.getClassname();
        }

        return new DependencyDescriptor( role, reference, optional, attributes );
    }
View Full Code Here

     * @throws ConfigurationException if an error occurs
     */
    public ServiceDescriptor buildService( final Configuration service )
        throws BuildException
    {
        ReferenceDescriptor reference = buildReferenceDescriptor( service );
        final Properties attributes =
            buildAttributes( service.getChild( "attributes" ) );
        return new ServiceDescriptor( reference, attributes );
    }
View Full Code Here

        {
            type = path;
            version = buildVersion( "1.0.0" );
        }

        return new ReferenceDescriptor( type, version );
    }
View Full Code Here

        final EntryDescriptor[] entries =
            buildEntries( info.getChild( "entries" ).getChildren("entry") );
        final String versionString = info.getChild( "version" ).getValue( "1.0" );
        final Version version = buildVersion( versionString );

        return new Service( new ReferenceDescriptor( classname, version ), entries, attributes );
    }
View Full Code Here

     * @throws BuildException if an error occurs
     */
    protected ServiceDescriptor buildBlockService( final Configuration service )
        throws BuildException
    {
        final ReferenceDescriptor designator = buildReferenceDescriptor( service );
        final Properties attributes =
            buildAttributes( service.getChild( "attributes" ) );
        return new ServiceDescriptor( designator, attributes );
    }
View Full Code Here

        try
        {
            final String type = service.getAttribute( "name" );
            final String versionString = service.getAttribute( "version", "1.0" );
            final Version version = buildVersion( versionString );
            return new ReferenceDescriptor( type, version );
        }
        catch( Throwable e )
        {
            final String error =
              "Error occured while attempting to build reference descriptor from legacy blockinfo configuration: "
View Full Code Here

TOP

Related Classes of org.apache.avalon.meta.info.ReferenceDescriptor

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.