Package org.codehaus.loom.components.extensions.pkgmgr

Examples of org.codehaus.loom.components.extensions.pkgmgr.OptionalPackage


        {
            final String message =
                REZ.getString( "missing-packagemanager" );
            throw new IllegalStateException( message );
        }
        final OptionalPackage optionalPackage =
            m_manager.getOptionalPackage( extension );
        return optionalPackage.getFile().toURL();
    }
View Full Code Here


        if( null != candidates )
        {
            final int size = candidates.size();
            for( int i = 0; i < size; i++ )
            {
                final OptionalPackage optionalPackage = (OptionalPackage)candidates.get(
                    i );
                final Extension[] extensions = optionalPackage.getAvailableExtensions();

                for( int j = 0; j < extensions.length; j++ )
                {
                    if( extensions[ j ].isCompatibleWith( extension ) )
                    {
View Full Code Here

        {
            final ArrayList list = (ArrayList)iterator.next();
            final int size = list.size();
            for( int i = 0; i < size; i++ )
            {
                final OptionalPackage optionalPackage = (OptionalPackage)list.get(
                    i );
                if( !packages.contains( optionalPackage ) )
                {
                    packages.add( optionalPackage );
                }
View Full Code Here

                continue;
            }

            try
            {
                final OptionalPackage optionalPackage = getOptionalPackage(
                    file );
                cacheOptionalPackage( optionalPackage );
            }
            catch( final IOException ioe )
            {
View Full Code Here

                return null;
            }
            final Extension[] available = Extension.getAvailable( manifest );
            final Extension[] required = Extension.getRequired( manifest );

            return new OptionalPackage( file, available, required );
        }
        finally
        {
            jarFile.close();
        }
View Full Code Here

    }

    public int compare( final Object o1,
                        final Object o2 )
    {
        final OptionalPackage pkg1 = (OptionalPackage)o1;
        final OptionalPackage pkg2 = (OptionalPackage)o2;
        final Extension e1 = getMatchingExtension( pkg1 );
        final Extension e2 = getMatchingExtension( pkg2 );
        int result = compareSpecVersion( e1, e2 );
        if( 0 != result )
        {
View Full Code Here

    private ExtensionManager createExtensionManager( final String specVersion1,
                                                     final String implVersion1,
                                                     final String specVersion2,
                                                     final String implVersion2 )
    {
        final OptionalPackage optionalPackage1 =
            createPackage( VENDOR1, specVersion1, implVersion1 );
        final OptionalPackage optionalPackage2 =
            createPackage( VENDOR2, specVersion2, implVersion2 );
        final OptionalPackage[] pkgs =
            new OptionalPackage[]{optionalPackage1, optionalPackage2};
        return createExtensionManager( pkgs );
    }
View Full Code Here

                                                   implVersion, vendor, null,
                                                   null );
        final File file = new File( "." );
        final Extension[] available = new Extension[]{extension};
        final Extension[] required = new Extension[ 0 ];
        return new OptionalPackage( file, available, required );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.loom.components.extensions.pkgmgr.OptionalPackage

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.