public interface Context
| Modifier and Type | Method and Description |
|---|---|
void |
copyResource(String source,
Path dest)
Copy a classpath resource to a file.
|
void |
copyResource(String source,
Path dest,
Set<PosixFilePermission> permissions)
Copy a classpath resource to a file.
|
void |
exit(int code)
Exit application.
|
String |
getVersion()
Jooby version to use.
|
Path |
getWorkspace()
Working directory (where the projects are created).
|
void |
println(String message)
Write a message to console.
|
String |
readLine(String prompt)
Ask user for input.
|
void |
setWorkspace(Path workspace)
Set workspace/working directory.
|
void |
writeTemplate(String template,
Object model,
Path file)
Look for the given template and dump/write to the file.
|
void exit(int code)
code - Exit code.void writeTemplate(@Nonnull String template, @Nonnull Object model, @Nonnull Path file) throws IOException
template - Template name.model - Template data.file - Output file.IOException - If something goes wrong.void copyResource(@Nonnull String source, @Nonnull Path dest) throws IOException
source - Resource.dest - Destination file.IOException - If something goes wrong.void copyResource(@Nonnull String source, @Nonnull Path dest, @Nonnull Set<PosixFilePermission> permissions) throws IOException
source - Resource.dest - Destination file.permissions - File permissions.IOException - If something goes wrong.@Nonnull String readLine(@Nonnull String prompt)
prompt - User prompt.void println(@Nonnull String message)
message - Message.@Nonnull Path getWorkspace()
void setWorkspace(@Nonnull Path workspace) throws IOException
workspace - Workspace/working directory.IOException - When directory doesn't exist.Copyright © 2019. All rights reserved.