Interface ResourceManager
- All Known Implementing Classes:
DefaultResourceManager
public interface ResourceManager
- Version:
- $Id$
- Author:
- Trygve Laugstøl, Jason van Zyl
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSearchPath(String resourceLoaderId, String searchPath) voidcreateResourceAsFile(PlexusResource resource, File outputFile) Downloads the resource to the given output file.getResource(String name) Searches for a resource with the given name.getResourceAsFile(String name) getResourceAsFile(String name, String outputFile) getResourceAsFile(PlexusResource resource) Returns a file with the given resources contents.resolveLocation(String location) Deprecated.resolveLocation(String location, String localfile) Deprecated.voidsetOutputDirectory(File outputDirectory)
-
Method Details
-
getResourceAsInputStream
- Throws:
ResourceNotFoundException
-
getResourceAsFile
-
getResourceAsFile
File getResourceAsFile(String name, String outputFile) throws ResourceNotFoundException, FileResourceCreationException -
setOutputDirectory
-
addSearchPath
-
resolveLocation
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
IOException
-
resolveLocation
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
IOException
-
getResource
Searches for a resource with the given name.- Throws:
ResourceNotFoundException- Since:
- 1.0-alpha-5
-
getResourceAsFile
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
-