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 void
addSearchPath(java.lang.String resourceLoaderId, java.lang.String searchPath)
void
createResourceAsFile(PlexusResource resource, java.io.File outputFile)
Downloads the resource to the given output file.PlexusResource
getResource(java.lang.String name)
Searches for a resource with the given name.java.io.File
getResourceAsFile(java.lang.String name)
java.io.File
getResourceAsFile(java.lang.String name, java.lang.String outputFile)
java.io.File
getResourceAsFile(PlexusResource resource)
Returns a file with the given resources contents.java.io.InputStream
getResourceAsInputStream(java.lang.String name)
java.io.File
resolveLocation(java.lang.String location)
Deprecated.java.io.File
resolveLocation(java.lang.String location, java.lang.String localfile)
Deprecated.void
setOutputDirectory(java.io.File outputDirectory)
-
-
-
Method Detail
-
getResourceAsInputStream
java.io.InputStream getResourceAsInputStream(java.lang.String name) throws ResourceNotFoundException
- Throws:
ResourceNotFoundException
-
getResourceAsFile
java.io.File getResourceAsFile(java.lang.String name) throws ResourceNotFoundException, FileResourceCreationException
-
getResourceAsFile
java.io.File getResourceAsFile(java.lang.String name, java.lang.String outputFile) throws ResourceNotFoundException, FileResourceCreationException
-
setOutputDirectory
void setOutputDirectory(java.io.File outputDirectory)
-
addSearchPath
void addSearchPath(java.lang.String resourceLoaderId, java.lang.String searchPath)
-
resolveLocation
java.io.File resolveLocation(java.lang.String location, java.lang.String localfile) throws java.io.IOException
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
java.io.IOException
-
resolveLocation
java.io.File resolveLocation(java.lang.String location) throws java.io.IOException
Deprecated.Provides compatibility with the Locator utility used by several Maven Plugins.- Throws:
java.io.IOException
-
getResource
PlexusResource getResource(java.lang.String name) throws ResourceNotFoundException
Searches for a resource with the given name.- Throws:
ResourceNotFoundException
- Since:
- 1.0-alpha-5
-
getResourceAsFile
java.io.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, java.io.File outputFile) throws FileResourceCreationException
Downloads the resource to the given output file.- Throws:
FileResourceCreationException
- Since:
- 1.0-alpha-5
-
-