public interface ResourcesFacet extends ProjectFacet
Modifier and Type | Method and Description |
---|---|
FileResource<?> |
createResource(char[] bytes,
String relativeFilename)
Deprecated.
use
getResource(String) and call WriteableResource.setContents(char[]) |
FileResource<?> |
createTestResource(char[] bytes,
String relativeFilename)
Deprecated.
|
FileResource<?> |
getResource(String relativePath)
Return the
FileResource at the given path relative to getResourceDirectory() . |
List<DirectoryResource> |
getResourceDirectories()
Get a list of
DirectoryResource s representing the directories this project uses to contain Project
non-source documents (such as configuration files.) |
DirectoryResource |
getResourceDirectory()
Get the
DirectoryResource representing the folder this Project uses to store package-able,
non-source documents (such as configuration files.) |
FileResource<?> |
getTestResource(String relativePath)
Attempt to locate a
FileResource at the given path relative to getTestResourceDirectory() . |
DirectoryResource |
getTestResourceDirectory()
Get the
DirectoryResource representing the folder this Project uses to store test-scoped
non-source documents (such as configuration files.) Files in this directory will never be packaged or deployed
except when running Unit Tests. |
void |
visitResources(ResourceVisitor visitor)
Recursively loops over all the resource directories and for each file it finds, calls the visitor.
|
void |
visitTestResources(ResourceVisitor visitor)
Recursively loops over all the test resource directories and for each file it finds, calls the visitor.
|
getFaceted, install, isInstalled, uninstall
List<DirectoryResource> getResourceDirectories()
DirectoryResource
s representing the directories this project uses to contain Project
non-source documents (such as configuration files.)DirectoryResource getResourceDirectory()
DirectoryResource
representing the folder this Project
uses to store package-able,
non-source documents (such as configuration files.)DirectoryResource getTestResourceDirectory()
DirectoryResource
representing the folder this Project
uses to store test-scoped
non-source documents (such as configuration files.) Files in this directory will never be packaged or deployed
except when running Unit Tests.@Deprecated FileResource<?> createResource(char[] bytes, String relativeFilename)
getResourceDirectory()
- create a
file containing the given bytes.FileResource
that was created.@Deprecated FileResource<?> createTestResource(char[] bytes, String relativeFilename)
getTestResourceDirectory()
-
create a file containing the given bytes.FileResource
that was created.FileResource<?> getResource(String relativePath)
FileResource
at the given path relative to getResourceDirectory()
. The
FileResource
object is returned regardless of whether the target actually exists. To determine if the file
exists, you should call Resource.exists()
on the return value of this method.FileResource<?> getTestResource(String relativePath)
FileResource
at the given path relative to getTestResourceDirectory()
. The
FileResource
object is returned regardless of whether the target actually exists. To determine if the file
exists, you should call Resource.exists()
on the return value of this method.void visitResources(ResourceVisitor visitor)
visitor
- The ResourceVisitor
that processes all the found files. Cannot be null.void visitTestResources(ResourceVisitor visitor)
visitor
- The ResourceVisitor
that processes all the found files. Cannot be null.Copyright © 2014 JBoss by Red Hat. All rights reserved.