@Component(role=ResourceManager.class, instantiationStrategy="per-lookup") public class DefaultResourceManager extends org.codehaus.plexus.logging.AbstractLogEnabled implements ResourceManager
ROLE| Constructor and Description |
|---|
DefaultResourceManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSearchPath(String id,
String path) |
void |
createResourceAsFile(PlexusResource resource,
File outputFile)
Downloads the resource to the given output file.
|
PlexusResource |
getResource(String name)
Searches for a resource with the given name.
|
File |
getResourceAsFile(PlexusResource resource)
Returns a file with the given resources contents.
|
File |
getResourceAsFile(String name) |
File |
getResourceAsFile(String name,
String outputPath) |
InputStream |
getResourceAsInputStream(String name) |
File |
resolveLocation(String name)
Provides compatibility with the Locator utility used by several Maven Plugins.
|
File |
resolveLocation(String name,
String outputPath)
Provides compatibility with the Locator utility used by several Maven Plugins.
|
void |
setOutputDirectory(File outputDirectory) |
public InputStream getResourceAsInputStream(String name) throws ResourceNotFoundException
getResourceAsInputStream in interface ResourceManagerResourceNotFoundExceptionpublic File getResourceAsFile(String name) throws ResourceNotFoundException, FileResourceCreationException
getResourceAsFile in interface ResourceManagerResourceNotFoundExceptionFileResourceCreationExceptionpublic File getResourceAsFile(String name, String outputPath) throws ResourceNotFoundException, FileResourceCreationException
getResourceAsFile in interface ResourceManagerResourceNotFoundExceptionFileResourceCreationExceptionpublic File resolveLocation(String name, String outputPath) throws IOException
ResourceManagerresolveLocation in interface ResourceManagerIOExceptionpublic File resolveLocation(String name) throws IOException
ResourceManagerresolveLocation in interface ResourceManagerIOExceptionpublic void setOutputDirectory(File outputDirectory)
setOutputDirectory in interface ResourceManagerpublic void addSearchPath(String id, String path)
addSearchPath in interface ResourceManagerpublic PlexusResource getResource(String name) throws ResourceNotFoundException
ResourceManagergetResource in interface ResourceManagerResourceNotFoundExceptionpublic File getResourceAsFile(PlexusResource resource) throws FileResourceCreationException
ResourceManagergetResourceAsFile in interface ResourceManagerFileResourceCreationExceptionpublic void createResourceAsFile(PlexusResource resource, File outputFile) throws FileResourceCreationException
ResourceManagercreateResourceAsFile in interface ResourceManagerFileResourceCreationExceptionCopyright © 2001–2017 Codehaus Plexus. All rights reserved.