org.apache.turbine.modules
Class Screen

java.lang.Object
  extended by org.apache.turbine.modules.Assembler
      extended by org.apache.turbine.modules.Screen
Direct Known Subclasses:
Error, InvalidState, RawScreen, TemplateScreen

public abstract class Screen
extends Assembler

This is the base class which defines the Screen modules.

Version:
$Id: Screen.java 222043 2004-12-06 17:47:33Z painter $
Author:
Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux

Constructor Summary
Screen()
           
 
Method Summary
protected  org.apache.ecs.ConcreteElement build(PipelineData pipelineData)
          Subclasses can override this method to add additional functionality.
protected  org.apache.ecs.ConcreteElement build(RunData data)
          Deprecated. Use PipelineData version instead.
protected  org.apache.ecs.ConcreteElement doBuild(PipelineData pipelineData)
          A subclass must override this method to build itself.
protected abstract  org.apache.ecs.ConcreteElement doBuild(RunData data)
          Deprecated. Use PipelineData version instead.
 java.lang.String getLayout(PipelineData pipelineData)
          If the Layout has not been defined by the Screen then set the layout to be "DefaultLayout".
 java.lang.String getLayout(RunData data)
          Deprecated. Use PipelineData version instead.
static java.lang.String prepareText(java.lang.String s)
          Deprecated. Use InputFilterUtils.prepareText(String s)
static java.lang.String prepareTextMinimum(java.lang.String s)
          Deprecated. Use InputFilterUtils.prepareTextMinimum(String s)
 void setLayout(PipelineData pipelineData, java.lang.String layout)
          Set the layout for a Screen.
 void setLayout(RunData data, java.lang.String layout)
          Deprecated. Use PipelineData version instead.
 
Methods inherited from class org.apache.turbine.modules.Assembler
getRunData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Screen

public Screen()
Method Detail

doBuild

protected org.apache.ecs.ConcreteElement doBuild(PipelineData pipelineData)
                                          throws java.lang.Exception
A subclass must override 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. Should revert to abstract when RunData has gone.

Parameters:
data - Turbine information.
Throws:
java.lang.Exception - a generic exception.

build

protected org.apache.ecs.ConcreteElement build(PipelineData pipelineData)
                                        throws java.lang.Exception
Subclasses can override this method to add additional functionality. This method is protected to force clients to use ScreenLoader to build a Screen.

Parameters:
pipelineData - Turbine information.
Throws:
java.lang.Exception - a generic exception.

getLayout

public java.lang.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

public void setLayout(PipelineData pipelineData,
                      java.lang.String layout)
Set the layout for a Screen.

Parameters:
data - Turbine information.
layout - The layout name.

doBuild

protected abstract org.apache.ecs.ConcreteElement doBuild(RunData data)
                                                   throws java.lang.Exception
Deprecated. Use PipelineData version instead.

A subclass must override 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:
data - Turbine information.
Throws:
java.lang.Exception - a generic exception.

build

protected org.apache.ecs.ConcreteElement build(RunData data)
                                        throws java.lang.Exception
Deprecated. Use PipelineData version instead.

Subclasses can override this method to add additional functionality. This method is protected to force clients to use ScreenLoader to build a Screen.

Parameters:
data - Turbine information.
Throws:
java.lang.Exception - a generic exception.

getLayout

public java.lang.String getLayout(RunData data)
Deprecated. Use PipelineData version instead.

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 RunData object.

Parameters:
data - Turbine information.
Returns:
A String with the Layout.

setLayout

public void setLayout(RunData data,
                      java.lang.String layout)
Deprecated. Use PipelineData version instead.

Set the layout for a Screen.

Parameters:
data - Turbine information.
layout - The layout name.

prepareText

public static java.lang.String prepareText(java.lang.String s)
Deprecated. Use InputFilterUtils.prepareText(String s)

This function can/should be used in any screen that will output User entered text. This will help prevent users from entering html ( SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.