public abstract class TemplateScreen extends Object implements Screen
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log
Logging
|
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
Constructor and Description |
---|
TemplateScreen() |
Modifier and Type | Method and Description |
---|---|
abstract String |
buildTemplate(PipelineData pipelineData)
This method should be implemented by Base template classes.
|
String |
doBuild(PipelineData pipelineData)
This method is called by the Screenloader to construct the
Screen.
|
protected abstract void |
doBuildTemplate(PipelineData pipelineData)
This method should be overridden by subclasses that wish to add
specific business logic.
|
protected void |
doPostBuildTemplate(PipelineData pipelineData)
This method can be overridden to write code that executes when
the template has been built (called from a finally clause, so
executes regardless of whether an exception is thrown or not)
|
void |
doRedirect(PipelineData pipelineData,
String template)
You can call this within a Screen to cause an internal redirect
to happen.
|
void |
doRedirect(PipelineData pipelineData,
String screen,
String template)
You can call this within a Screen to cause an internal redirect
to happen.
|
static void |
setTemplate(PipelineData pipelineData,
String template)
This method is used when you want to short circuit a Screen and
change the template that will be executed next.
|
protected org.apache.logging.log4j.Logger log
public TemplateScreen()
protected abstract void doBuildTemplate(PipelineData pipelineData) throws Exception
pipelineData
- Turbine information.Exception
- A generic exception.public abstract String buildTemplate(PipelineData pipelineData) throws Exception
pipelineData
- Turbine information.Exception
- A generic exception.protected void doPostBuildTemplate(PipelineData pipelineData)
pipelineData
- Turbine informationpublic String doBuild(PipelineData pipelineData) throws Exception
public static void setTemplate(PipelineData pipelineData, String template)
pipelineData
- Turbine information.template
- The name of the next template.public void doRedirect(PipelineData pipelineData, String screen, String template) throws Exception
This class is useful if you have a Screen that submits to another Screen and you want it to do error validation before executing the other Screen. If there is an error, you can doRedirect() back to the original Screen.
pipelineData
- Turbine information.screen
- Name of screen to redirect to.template
- Name of template.Exception
- A generic exception.public void doRedirect(PipelineData pipelineData, String template) throws Exception
This class is useful if you have a Screen that submits to another Screen and you want it to do error validation before executing the other Screen. If there is an error, you can doRedirect() back to the original Screen.
pipelineData
- Turbine information.template
- Name of template.Exception
- A generic exception.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.