Package org.codehaus.plexus.resource
Interface ResourceManager
-
- All Known Implementing Classes:
DefaultResourceManager
public interface ResourceManager- Version:
- $Id$
- Author:
- Trygve Laugstøl, Jason van Zyl
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddSearchPath(String resourceLoaderId, String searchPath)voidcreateResourceAsFile(PlexusResource resource, File outputFile)Downloads the resource to the given output file.PlexusResourcegetResource(String name)Searches for a resource with the given name.FilegetResourceAsFile(String name)FilegetResourceAsFile(String name, String outputFile)FilegetResourceAsFile(PlexusResource resource)Returns a file with the given resources contents.InputStreamgetResourceAsInputStream(String name)FileresolveLocation(String location)Deprecated.FileresolveLocation(String location, String localfile)Deprecated.voidsetOutputDirectory(File outputDirectory)
-
-
-
Field Detail
-
ROLE
static final String ROLE
-
-
Method Detail
-
getResourceAsInputStream
InputStream getResourceAsInputStream(String name) throws ResourceNotFoundException
- Throws:
ResourceNotFoundException
-
getResourceAsFile
File getResourceAsFile(String name) throws ResourceNotFoundException, FileResourceCreationException
-
getResourceAsFile
File getResourceAsFile(String name, String outputFile) throws ResourceNotFoundException, FileResourceCreationException
-
setOutputDirectory
void setOutputDirectory(File outputDirectory)
-
resolveLocation
File resolveLocation(String location, String localfile) throws IOException
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
IOException
-
resolveLocation
File resolveLocation(String location) throws IOException
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
IOException
-
getResource
PlexusResource getResource(String name) throws ResourceNotFoundException
Searches for a resource with the given name.- Throws:
ResourceNotFoundException- Since:
- 1.0-alpha-5
-
getResourceAsFile
File getResourceAsFile(PlexusResource resource) throws FileResourceCreationException
Returns a file with the given resources contents. If the resource is already available as a file, returns that file. Otherwise, a file in the resource managers output directory is created and the resource is downloaded to that file.- Throws:
FileResourceCreationException- Since:
- 1.0-alpha-5
-
createResourceAsFile
void createResourceAsFile(PlexusResource resource, File outputFile) throws FileResourceCreationException
Downloads the resource to the given output file.- Throws:
FileResourceCreationException- Since:
- 1.0-alpha-5
-
-