Class DefaultResourceManager
java.lang.Object
org.codehaus.plexus.resource.DefaultResourceManager
- All Implemented Interfaces:
ResourceManager
- Version:
- $Id$
- Author:
- Trygve Laugstøl, Jason van Zyl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSearchPath(String id, String path) 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 outputPath) getResourceAsFile(PlexusResource resource) Returns a file with the given resources contents.resolveLocation(String name) Provides compatibility with the Locator utility used by several Maven Plugins.resolveLocation(String name, String outputPath) Provides compatibility with the Locator utility used by several Maven Plugins.voidsetOutputDirectory(File outputDirectory)
-
Constructor Details
-
DefaultResourceManager
-
-
Method Details
-
getResourceAsInputStream
- Specified by:
getResourceAsInputStreamin interfaceResourceManager- Throws:
ResourceNotFoundException
-
getResourceAsFile
public File getResourceAsFile(String name) throws ResourceNotFoundException, FileResourceCreationException - Specified by:
getResourceAsFilein interfaceResourceManager- Throws:
ResourceNotFoundExceptionFileResourceCreationException
-
getResourceAsFile
public File getResourceAsFile(String name, String outputPath) throws ResourceNotFoundException, FileResourceCreationException - Specified by:
getResourceAsFilein interfaceResourceManager- Throws:
ResourceNotFoundExceptionFileResourceCreationException
-
resolveLocation
Description copied from interface:ResourceManagerProvides compatibility with the Locator utility used by several Maven Plugins.- Specified by:
resolveLocationin interfaceResourceManager
-
resolveLocation
Description copied from interface:ResourceManagerProvides compatibility with the Locator utility used by several Maven Plugins.- Specified by:
resolveLocationin interfaceResourceManager
-
setOutputDirectory
- Specified by:
setOutputDirectoryin interfaceResourceManager
-
addSearchPath
- Specified by:
addSearchPathin interfaceResourceManager
-
getResource
Description copied from interface:ResourceManagerSearches for a resource with the given name.- Specified by:
getResourcein interfaceResourceManager- Throws:
ResourceNotFoundException
-
getResourceAsFile
Description copied from interface:ResourceManagerReturns 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.- Specified by:
getResourceAsFilein interfaceResourceManager- Throws:
FileResourceCreationException
-
createResourceAsFile
public void createResourceAsFile(PlexusResource resource, File outputFile) throws FileResourceCreationException Description copied from interface:ResourceManagerDownloads the resource to the given output file.- Specified by:
createResourceAsFilein interfaceResourceManager- Throws:
FileResourceCreationException
-