Package org.codehaus.plexus.resource.loader

Examples of org.codehaus.plexus.resource.loader.ResourceLoader


    private Map<String, ResourceLoader> resourceLoaders;

    @Override
    public void addSearchPath( String id, String path )
    {
        ResourceLoader loader = (ResourceLoader) resourceLoaders.get( id );

        if ( loader == null )
        {
            throw new IllegalArgumentException( "unknown resource loader: " + id );
        }

        loader.addSearchPath( path );
    }
View Full Code Here


        this.outputDirectory = outputDirectory;
    }

    public void addSearchPath( String id, String path )
    {
        ResourceLoader loader = (ResourceLoader) resourceLoaders.get( id );

        if ( loader == null )
        {
            throw new IllegalArgumentException( "unknown resource loader: " + id );
        }

        loader.addSearchPath( path );
    }
View Full Code Here

    public PlexusResource getResource( String name )
        throws ResourceNotFoundException
    {
        for ( Iterator i = resourceLoaders.values().iterator(); i.hasNext(); )
        {
            ResourceLoader resourceLoader = (ResourceLoader) i.next();

            try
            {
                PlexusResource resource = resourceLoader.getResource( name );

                getLogger().debug( "The resource " + "'" + name + "'" + " was found as " + resource.getName() + "." );

                return resource;
            }
            catch ( ResourceNotFoundException e )
            {
                getLogger().debug(
                                   "The resource " + "'" + name + "'" + " was not found with resourceLoader "
                                       + resourceLoader.getClass().getName() + "." );
            }
        }

        throw new ResourceNotFoundException( name );
    }
View Full Code Here

    {
        InputStream is = null;

        for ( Iterator i = resourceLoaders.values().iterator(); i.hasNext(); )
        {
            ResourceLoader resourceLoader = (ResourceLoader) i.next();

            try
            {
                is = resourceLoader.getResourceAsInputStream( name );

                getLogger().debug( "The resource " + "'" + name + "'" + " found using the " + resourceLoader + "." );

                break;
            }
View Full Code Here

    }

    public void addSearchPath( String id,
                               String path )
    {
        ResourceLoader loader = (ResourceLoader) resourceLoaders.get( id );

        loader.addSearchPath( path );
    }
View Full Code Here

    private Map<String, ResourceLoader> resourceLoaders;

    @Override
    public void addSearchPath( String id, String path )
    {
        ResourceLoader loader = (ResourceLoader) resourceLoaders.get( id );

        if ( loader == null )
        {
            throw new IllegalArgumentException( "unknown resource loader: " + id );
        }

        loader.addSearchPath( path );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.resource.loader.ResourceLoader

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.