public interface ResourceFacet extends ProjectFacet
| Modifier and Type | Method and Description |
|---|---|
FileResource<?> |
createResource(char[] bytes,
String relativeFilename)
At the given path/filename relative to the project resources directory:
getResourceFolder() - create a
file containing the given bytes. |
FileResource<?> |
createTestResource(char[] bytes,
String relativeFilename)
At the given path/filename relative to the project test resources directory:
getTestResourceFolder() -
create a file containing the given bytes. |
FileResource<?> |
getResource(String relativePath)
Return the
FileResource at the given path relative to getResourceFolder(). |
DirectoryResource |
getResourceFolder()
Get the
DirectoryResource representing the folder this Project uses to store package-able,
non-source documents (such as configuration files.) |
List<DirectoryResource> |
getResourceFolders()
Get a list of
DirectoryResources representing the directories this project uses to contain Project
non-source documents (such as configuration files.) |
FileResource<?> |
getTestResource(String relativePath)
Attempt to locate a
FileResource at the given path relative to getTestResourceFolder(). |
DirectoryResource |
getTestResourceFolder()
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. |
List<DirectoryResource> getResourceFolders()
DirectoryResources representing the directories this project uses to contain Project
non-source documents (such as configuration files.)DirectoryResource getResourceFolder()
DirectoryResource representing the folder this Project uses to store package-able,
non-source documents (such as configuration files.)DirectoryResource getTestResourceFolder()
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.FileResource<?> createResource(char[] bytes, String relativeFilename)
getResourceFolder() - create a
file containing the given bytes.FileResource that was created.FileResource<?> createTestResource(char[] bytes, String relativeFilename)
getTestResourceFolder() -
create a file containing the given bytes.FileResource that was created.FileResource<?> getResource(String relativePath)
FileResource at the given path relative to getResourceFolder(). 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 getTestResourceFolder(). 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.Copyright © 2013 JBoss by Red Hat. All Rights Reserved.