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 ResourceManager
ResourceNotFoundException
public File getResourceAsFile(String name) throws ResourceNotFoundException, FileResourceCreationException
getResourceAsFile
in interface ResourceManager
ResourceNotFoundException
FileResourceCreationException
public File getResourceAsFile(String name, String outputPath) throws ResourceNotFoundException, FileResourceCreationException
getResourceAsFile
in interface ResourceManager
ResourceNotFoundException
FileResourceCreationException
public File resolveLocation(String name, String outputPath) throws IOException
ResourceManager
resolveLocation
in interface ResourceManager
IOException
public File resolveLocation(String name) throws IOException
ResourceManager
resolveLocation
in interface ResourceManager
IOException
public void setOutputDirectory(File outputDirectory)
setOutputDirectory
in interface ResourceManager
public void addSearchPath(String id, String path)
addSearchPath
in interface ResourceManager
public PlexusResource getResource(String name) throws ResourceNotFoundException
ResourceManager
getResource
in interface ResourceManager
ResourceNotFoundException
public File getResourceAsFile(PlexusResource resource) throws FileResourceCreationException
ResourceManager
getResourceAsFile
in interface ResourceManager
FileResourceCreationException
public void createResourceAsFile(PlexusResource resource, File outputFile) throws FileResourceCreationException
ResourceManager
createResourceAsFile
in interface ResourceManager
FileResourceCreationException
Copyright © 2001–2019 Codehaus Plexus. All rights reserved.