public class ProjectContext extends Object implements Serializable
| Constructor and Description |
|---|
ProjectContext(File rootDir,
File inputDir,
File outputDir,
Map<String,Object> configurationValues,
String sourceSet) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
configurationExists(String key) |
List<ProjectFile> |
getAllFiles() |
Object |
getConfigurationValue(String key) |
<T> T |
getConfigurationValueAs(String key,
Class<T> clazz) |
File |
getInputDir() |
String |
getNamespaceFromFile(File file) |
File |
getOutputDir() |
File |
getRootDir() |
String |
getSourceSet() |
String |
readFile(String namespace,
String filename) |
String |
readFile(String namespace,
String filename,
String encoding) |
byte[] |
readFileToByteArray(String namespace,
String filename) |
void |
writeOutputFile(String namespace,
String filename,
byte[] content) |
void |
writeOutputFile(String namespace,
String filename,
String content) |
public List<ProjectFile> getAllFiles()
public byte[] readFileToByteArray(String namespace, String filename) throws IOException
IOExceptionpublic String readFile(String namespace, String filename) throws IOException
IOExceptionpublic String readFile(String namespace, String filename, String encoding) throws IOException
IOExceptionpublic void writeOutputFile(String namespace, String filename, String content) throws IOException
IOExceptionpublic void writeOutputFile(String namespace, String filename, byte[] content) throws IOException
IOExceptionpublic boolean configurationExists(String key)
public File getRootDir()
public File getInputDir()
public File getOutputDir()
public String getSourceSet()