com.sas.servlet.tbeans
Interface TransformationInterface

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
RenderableInterface, TableCellContentsEditor, TableCellContentsRenderer
All Known Implementing Classes:
AbstractBaseTableView, AbstractSelectorContainer, ActionProviderMenuBar, AppliedFilters, BarChart, BarChartComposite, BarLineChart, BarLineChartComposite, BaseActionCompositeTransformation, com.sas.servlet.tbeans.BaseActionCompositeTransformation2, BaseActionTransformation, com.sas.servlet.tbeans.BaseActionTransformation2, com.sas.servlet.tbeans.graphics.BaseBarChart, BaseBarLineChart, BaseButton, BaseCalculatedItemSelectorPanel, BaseCheckBox, BaseChoiceBox, BaseComboBoxView, BaseCompositeTransformation, com.sas.servlet.tbeans.BaseCompositeTransformation2, BaseDataSelector, BaseDualSelector, BaseESRIMapChart, BaseExpandCollapse, BaseExpressionEditor, BaseFormElement, com.sas.servlet.tbeans.graphics.BaseGraph, com.sas.servlet.tbeans.graphics.BaseGraphics, BaseHidden, BaseHTMLMenuBar, BaseIFormElement, BaseImage, BaseImage, BaseInput, BaseIPage, BaseLabel, BaseLineChart, BaseLinePlot, BaseListBox, BaseListBoxView, BaseListEditor, BaseLogin, BaseMenu, BaseMenuBar, BaseMenuItem, BaseNavigationBar, BaseNavigationBarElement, BaseOLAPDrillState, BaseOLAPTableView, BasePassword, BasePieChart, BasePushButton, BaseRadarChart, BaseRadio, BaseRemoteFileSearch, BaseRemoteFileSelector, BaseRemoteFileToolBar, BaseScatterPlot, BaseSelectorMenuItem, BaseSelectorPanel, BaseTableView, BaseTextArea, BaseTextEntry, BaseTileChart, BaseTransformation, BaseTreeView, BaseWaterfallChart, Button, CellContentsCheckBoxEditor, CellContentsChoiceBoxEditor, CellContentsImageRenderer, CellContentsLabelRenderer, CellContentsListBoxEditor, CellContentsNoRowsRenderer, CellContentsNoRowsRenderer, CellContentsNoRowsRenderer, CellContentsRadioEditor, CellContentsRowSelectionRenderer, CellContentsSimpleTemplateRenderer, CellContentsTextAreaEditor, CellContentsTextEntryEditor, CheckBox, CheckBoxList, CheckBoxListPropertyEditor, ChoiceBox, ComboBoxView, DataSelector, DataSelectorListBoxView, DefaultCellContentsRenderer, DefaultCellContentsRenderer, DefaultOLAPTableDataCellContentsRenderer, DefaultOLAPTableLabelCellContentsRenderer, DualListSelector, DualSelector, DualTreeSelector, EntityAttributeValueSelector, EntityAttributeValueSelectorPanel, ESRIMapChart, ESRIMapComposite, ESRIMapMenu, ExceptionHighlightingChartSelector, ExceptionHighlightingChartSelectorPanel, ExceptionHighlightingSelector, ExceptionHighlightingSelectorPanel, ExpandCollapse, ExportSelector, ExportSelectorPanel, FilterAndRankSelector, FilterAndRankSelectorPanel, FindSelector, FindSelectorPanel, Form, GraphComposite, Hidden, IForm, IFormHidden, IFormListBox, IFormPassword, IFormRadio, IFormTextEntry, Image, ImageAction, IMenu, InformationServicesSearch, InformationServicesSelector, IText, Label, LineChart, LineChartComposite, LinePlot, LinePlotComposite, ListBox, ListBoxView, ListBoxViewPropertyEditor, ListEditor, Login, MapCrossingSelector, MapCrossingSelectorPanel, MapPropertySelector, MapPropertySelectorPanel, MemberPropertiesSelector, MemberPropertiesSelectorPanel, Menu, MenuBar, MenuItem, NavigationBar, NavigationBarColumnScrollingElement, NavigationBarEditingElement, NavigationBarRowScrollingElement, NavigationBarScrollingElement, OLAPDrillState, OLAPESRIMapChart, OLAPESRIMapComposite, OLAPESRIMapMenu, com.sas.servlet.tbeans.olapgraphics.html.OLAPGraphComposite, OLAPMenuBar, OLAPTableView, OLAPTableViewComposite, OLAPTimeBasedFilterSelector, OLAPTimeBasedFilterSelectorPanel, Password, PercentCalculationsSelector, PercentCalculationsSelectorListBoxView, PercentCalculationsSelectorPanel, PieChart, PieChartComposite, PropertyEditorContainer, PushButton, RadarChart, RadarChartComposite, Radio, RelationalMenuBar, RemoteFileSearch, RemoteFileSelector, RemoteFileToolBar, ScatterPlot, ScatterPlotComposite, SelectorMenuBar, SelectorMenuItem, SelectorPanel, ShowDetailDataComposite, SimpleCalculatedItemSelector, SimpleCalculatedItemSelectorPanel, SortSelector, SortSelectorPanel, TableColumnNavigationBar, TableRowNavigationBar, TableView, TableView, TableView, TableViewComposite, TextAction, TextArea, TextEntry, TextEntryPropertyEditor, TileChart, TreeListSelector, TreeView, WaterfallChart, WaterfallChartComposite, WebMDDBView

public interface TransformationInterface
extends java.io.Serializable

The interface that must be implemented for all Transformation Beans. "Transformation Bean" is the name given to a Java component which consumes data from either a model or via property sets and transforms the data into a different representation that will be streamed to a client (or other consumer). A very common type of Transformation Bean will be one that consumes data from a webAF model (such as DataSetInterface) and represents the data in HTML (such as a TABLE).

Transformation Beans are intended to be used by servlet developers and JSP (Java ServerPages) writers.

The com.sas.servlet.beans package contains generic interfaces that define different types of beans. The final implementation will be language-specific, with the classes residing in a sub-package such as com.sas.servlet.beans.html. It is anticipated that languages other than HTML (such as XML, JavaScript, and DHTML) may implement the generic interfaces as well.


Method Summary
 java.lang.String getCustomAttributes()
          Gets the custom attributes
 java.lang.String getDescription()
          Gets the description that will be used to describe this bean to the user.
 java.lang.String getId()
          Gets the id.
 java.util.Locale getLocale()
          Get the locale
 java.lang.String getName()
          Gets the name that will be used to identify the content when it is submitted to the server
 javax.servlet.http.HttpServletRequest getRequest()
          Gets the current request object.
 javax.servlet.http.HttpServletResponse getResponse()
          Gets the current response object.
 java.lang.String getTagEpilog()
          Returns a string to be written after to any tag information
 java.lang.String getTagProlog()
          Returns the TransformationBean's prolog String
 boolean isVisible()
          Returns whether or not the transformation bean should be written
 void setCustomAttributes(java.lang.String value)
          Sets any custom attributes.
 void setDescription(java.lang.String value)
          Sets the description that will be used to describe this bean to the user.
 void setId(java.lang.String value)
          Sets the id.
 void setLocale(java.util.Locale locale)
          Set the locale
 void setName(java.lang.String value)
          Sets the name that will be used to identify the content when it is submitted to the server
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Sets the request object.
 void setResponse(javax.servlet.http.HttpServletResponse response)
          Sets the response object.
 void setTagEpilog(java.lang.String epilog)
          Sets a string to be written after to any tag information
 void setTagProlog(java.lang.String prolog)
          Sets a string to be written prior to any tag information
 void setVisible(boolean b)
          Sets the visibility parameter for a tbean.
 void write(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Writes the transformed representation of the object.
 void write(java.io.OutputStream out)
          Writes the transformed representation of the object.
 void write(java.io.PrintWriter out)
          Writes the transformed representation of the object.
 void write(java.io.Writer out)
          Writes the transformed representation of the object.
 

Method Detail

setCustomAttributes

void setCustomAttributes(java.lang.String value)
Sets any custom attributes. Custom attributes can be passed if the interface does not define properties that create the desired attributes. For example, if a new attribute NEWSTUFF is added in later versions of an HTML specification that attribute can be specified here as NEWSTUFF="value". Any number of attributes can be specified in the string.

Parameters:
value - The custom attribute

getCustomAttributes

java.lang.String getCustomAttributes()
Gets the custom attributes

Returns:
The custom attributes

setDescription

void setDescription(java.lang.String value)
Sets the description that will be used to describe this bean to the user. This will be used when performing client-side validation of forms, for example. The default value is the name of the bean.

Parameters:
desc - The description

getDescription

java.lang.String getDescription()
Gets the description that will be used to describe this bean to the user.

Returns:
The description

setLocale

void setLocale(java.util.Locale locale)
Set the locale

Parameters:
locale -

getLocale

java.util.Locale getLocale()
Get the locale

Returns:
locale

setName

void setName(java.lang.String value)
Sets the name that will be used to identify the content when it is submitted to the server

Parameters:
value - The name

getName

java.lang.String getName()
Gets the name that will be used to identify the content when it is submitted to the server

Returns:
The name

setRequest

void setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request object. There may be cases where a Transformation Bean needs to get additional information from the request, such as a parameter value. If this is true, the request must be set before calling the 'write' method. See the documentation for the Transformation Bean if the request is required.

Parameters:
request - The request object

getRequest

javax.servlet.http.HttpServletRequest getRequest()
Gets the current request object.

Returns:
The request object

setResponse

void setResponse(javax.servlet.http.HttpServletResponse response)
Sets the response object. There may be cases where a Transformation Bean needs to set additional information on the response. If this is true the response must be set before calling the 'write' method. See the documentation for the Transaction Bean if the response is required.

Parameters:
response - The response object

getResponse

javax.servlet.http.HttpServletResponse getResponse()
Gets the current response object.

Returns:
The response object

setId

void setId(java.lang.String value)
Sets the id.

Parameters:
value - The id

getId

java.lang.String getId()
Gets the id.

Returns:
id The ID

getTagProlog

java.lang.String getTagProlog()
Returns the TransformationBean's prolog String

Returns:
The prolog String
See Also:
setTagProlog(String)

setTagProlog

void setTagProlog(java.lang.String prolog)
Sets a string to be written prior to any tag information

Parameters:
prolog - string to be written prior to any tag information

getTagEpilog

java.lang.String getTagEpilog()
Returns a string to be written after to any tag information

Returns:
string to be written after to any tag information

setTagEpilog

void setTagEpilog(java.lang.String epilog)
Sets a string to be written after to any tag information

Parameters:
epilog - string to be written after to any tag information

setVisible

void setVisible(boolean b)
Sets the visibility parameter for a tbean.

Parameters:
b - true to display the tbean, false otherwise.

isVisible

boolean isVisible()
Returns whether or not the transformation bean should be written

Returns:
true if the tbean should be visible, false otherwise.

write

void write(java.io.PrintWriter out)
           throws java.io.IOException
Writes the transformed representation of the object. This method must be implemented by the Transformation Bean.

Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

write

void write(javax.servlet.http.HttpServletRequest req,
           javax.servlet.http.HttpServletResponse resp)
           throws javax.servlet.ServletException,
                  java.io.IOException
Writes the transformed representation of the object. This overloaded version of 'write' will set the request and response objects, get the PrintWriter from the response, and call the write(PrintWriter) method.

Parameters:
req - The request object
resp - The response object
Throws:
javax.servlet.ServletException - Thrown if some type of servlet error occurs
java.io.IOException - Thrown if some type of I/O error occurs

write

void write(java.io.Writer out)
           throws java.io.IOException
Writes the transformed representation of the object. This overloaded version of 'write' will create a new PrintWriter using the given Writer and call the write(PrintWriter) method.

Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

write

void write(java.io.OutputStream out)
           throws java.io.IOException
Writes the transformed representation of the object. This overloaded version of 'write' will create a new PrintWriter using the given OutputStream and call the write(PrintWriter) method.

Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.