Package org.apache.turbine.modules
Interface Screen
-
- All Superinterfaces:
Assembler
- All Known Implementing Classes:
BaseJspScreen
,InvalidState
,JSONScreen
,JSONSecureScreen
,JspErrorScreen
,LegacyVelocityScreen
,LegacyVelocitySecureScreen
,PlainJSONScreen
,PlainJSONSecureAnnotatedScreen
,RawScreen
,TemplateScreen
,VelocityCachedScreen
,VelocityDirectScreen
,VelocityErrorScreen
,VelocityScreen
,VelocitySecureScreen
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Screen extends Assembler
This is the interface which defines the Screen modules.- Version:
- $Id$
- Author:
- Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux
-
-
Field Summary
Fields Modifier and Type Field Description static int
CACHE_SIZE_DEFAULT
The default size for the screen cachestatic String
CACHE_SIZE_KEY
Property for the size of the screen cache if caching is onstatic String
NAME
Represents Screen Objectsstatic String
PREFIX
Prefix for screen related classes and templates
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
build(PipelineData pipelineData)
Subclasses can override this method to add additional functionality.String
doBuild(PipelineData pipelineData)
A subclass must implement this method to build itself.default String
getLayout(PipelineData pipelineData)
If the Layout has not been defined by the Screen then set the layout to be "DefaultLayout".default void
setLayout(PipelineData pipelineData, String layout)
Set the layout for a Screen.
-
-
-
Field Detail
-
PREFIX
static final String PREFIX
Prefix for screen related classes and templates- See Also:
- Constant Field Values
-
CACHE_SIZE_KEY
static final String CACHE_SIZE_KEY
Property for the size of the screen cache if caching is on- See Also:
- Constant Field Values
-
CACHE_SIZE_DEFAULT
static final int CACHE_SIZE_DEFAULT
The default size for the screen cache- See Also:
- Constant Field Values
-
NAME
static final String NAME
Represents Screen Objects- See Also:
- Constant Field Values
-
-
Method Detail
-
doBuild
String doBuild(PipelineData pipelineData) throws Exception
A subclass must implement this method to build itself. Subclasses override this method to store the screen in RunData or to write the screen to the output stream referenced in RunData.- Parameters:
pipelineData
- Turbine information.- Returns:
- the content of the screen
- Throws:
Exception
- a generic exception.
-
build
default String build(PipelineData pipelineData) throws Exception
Subclasses can override this method to add additional functionality.- Parameters:
pipelineData
- Turbine information.- Returns:
- the content of the screen
- Throws:
Exception
- a generic exception.
-
getLayout
default String getLayout(PipelineData pipelineData)
If the Layout has not been defined by the Screen then set the layout to be "DefaultLayout". The Screen object can also override this method to provide intelligent determination of the Layout to execute. You can also define that logic here as well if you want it to apply on a global scale. For example, if you wanted to allow someone to define Layout "preferences" where they could dynamically change the Layout for the entire site. The information for the request is passed in with the PipelineData object.- Parameters:
pipelineData
- Turbine information.- Returns:
- A String with the Layout.
-
setLayout
default void setLayout(PipelineData pipelineData, String layout)
Set the layout for a Screen.- Parameters:
pipelineData
- Turbine information.layout
- The layout name.
-
-