com.sas.servlet.beans
Class BaseTransformation
java.lang.Object
|
+--com.sas.Component
|
+--com.sas.servlet.beans.BaseTransformation
- Direct Known Subclasses:
- BaseCheckbox, BaseChoicebox, BaseHidden, BaseImage, BaseInput, BaseListbox, BaseMDTable, BasePushButton, BaseRadio, BaseTable, BaseTextArea, Form, TreeControl
- public abstract class BaseTransformation
- extends Component
- implements TransformationInterface
The base object for all Transformation Beans
- See Also:
- Serialized Form
Method Summary |
String |
getCustomAttributes()
Gets the custom attributes |
String |
getDescription()
Gets the description that will be used to describe this bean to the
user. |
String |
getName()
Gets the name that will be used to identify the content
when it is submitted to the server |
Object |
getParent()
Gets the parent object |
com.sas.servlet.beans.HttpServletRequest |
getRequest()
Gets the current request object. |
com.sas.servlet.beans.HttpServletResponse |
getResponse()
Gets the current response object. |
void |
setCustomAttributes(String value)
Sets any custom attributes. |
void |
setDescription(String value)
Sets the description that will be used to describe this bean to
the user. |
void |
setName(String value)
Sets the name that will be used to identify the content
when it is submitted to the server |
void |
setParent(Object parent)
Sets the parent object, such as the servlet. |
void |
setRequest(com.sas.servlet.beans.HttpServletRequest request)
Sets the request object. |
void |
setResponse(com.sas.servlet.beans.HttpServletResponse response)
Sets the response object. |
String |
toString()
Returns a string representation of this transformation bean. |
void |
write(com.sas.servlet.beans.HttpServletRequest req,
com.sas.servlet.beans.HttpServletResponse resp)
Writes the transformed representation of the object. |
void |
write(OutputStream out)
Writes the transformed representation of the object. |
void |
write(PrintWriter out)
Writes the custom attributes of the object. |
void |
write(Writer out)
Writes the transformed representation of the object. |
Methods inherited from class com.sas.Component |
addLink,
addPropertyChangeListener,
addVetoableChangeListener,
anyPropertyChangeListeners,
attachModel,
attachView,
beansIsDesignTime,
beansSetDesignTime,
clone,
clone,
detachModel,
detachView,
dumpComponent,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getComponentDescription,
getComponentSupportInfo,
getEventMethod,
getEventValues,
getExtendedBeanInfo,
getLinkInfo,
getModelInterface,
getRequiredInterfaces,
getResources,
getStringResource,
getViewInterfaceSupportInfo,
initialize,
initializeComponent,
isDesignTime,
isLinked,
propertyChange,
queryLinks,
queryLinks,
refresh,
removeAllLinks,
removeInterfaceTraps,
removeLink,
removePropertyChangeListener,
removeVetoableChangeListener,
setComponentDescription,
setComponentSupportInfo,
setDefaultValues,
setLinkInfo,
setModelInterface,
setRequiredInterfaces,
setViewInterfaceSupportInfo,
supportsListenerInterface,
supportsRequiredInterfaces,
trapInterfaceEvents,
validateObject |
BaseTransformation
public BaseTransformation()
setParent
public void setParent(Object parent)
- Sets the parent object, such as the servlet. There may be cases where
a Transformation Bean needs to get additional information from the
parent class. If this is true, the parent must be set before calling
the 'write' method. See the documentation for the Transformation Bean
if the parent is required.
- Specified by:
- setParent in interface TransformationInterface
- Parameters:
parent
- The parent object
getParent
public Object getParent()
- Gets the parent object
- Specified by:
- getParent in interface TransformationInterface
- Returns:
- The parent object, or null if not set
setName
public void setName(String value)
- Sets the name that will be used to identify the content
when it is submitted to the server
- Specified by:
- setName in interface TransformationInterface
- Parameters:
value
- The name
getName
public String getName()
- Gets the name that will be used to identify the content
when it is submitted to the server
- Specified by:
- getName in interface TransformationInterface
- Returns:
- The name
setDescription
public void setDescription(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.
- Specified by:
- setDescription in interface TransformationInterface
- Parameters:
desc
- The description
getDescription
public String getDescription()
- Gets the description that will be used to describe this bean to the
user.
- Specified by:
- getDescription in interface TransformationInterface
- Returns:
- The description
write
public void write(com.sas.servlet.beans.HttpServletRequest req,
com.sas.servlet.beans.HttpServletResponse resp)
throws com.sas.servlet.beans.ServletException,
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.
- Specified by:
- write in interface TransformationInterface
- Parameters:
req
- The request objectresp
- The response object- Throws:
- javax.servlet.ServletException - Thrown if some type of servlet
error occurs
- IOException - Thrown if some type of I/O error occurs
write
public void write(Writer out)
throws 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.
- Specified by:
- write in interface TransformationInterface
- Parameters:
out
- The output stream- Throws:
- IOException - Thrown if some type of I/O error occurs
write
public void write(PrintWriter out)
throws IOException
- Writes the custom attributes of the object. All transformation beans
should overwrite this method and call SUPER.
- Specified by:
- write in interface TransformationInterface
- Parameters:
out
- The output stream- Throws:
- IOException - Thrown if some type of I/O error occurs
write
public void write(OutputStream out)
throws 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.
- Specified by:
- write in interface TransformationInterface
- Parameters:
out
- The output stream- Throws:
- IOException - Thrown if some type of I/O error occurs
setRequest
public void setRequest(com.sas.servlet.beans.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.
- Specified by:
- setRequest in interface TransformationInterface
- Parameters:
request
- The request object
getRequest
public com.sas.servlet.beans.HttpServletRequest getRequest()
- Gets the current request object.
- Specified by:
- getRequest in interface TransformationInterface
- Returns:
- The request object
setResponse
public void setResponse(com.sas.servlet.beans.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.
- Specified by:
- setResponse in interface TransformationInterface
- Parameters:
response
- The response object
getResponse
public com.sas.servlet.beans.HttpServletResponse getResponse()
- Gets the current response object.
- Specified by:
- getResponse in interface TransformationInterface
- Returns:
- The response object
toString
public String toString()
- Returns a string representation of this transformation bean. A new
StringWriter will be created and the write(PrintWriter) method will
be invoked. The contents of the StringWriter will be returned, which
will contain the output from the Transaction Bean.
- Returns:
- A string representation of the object
- Overrides:
- toString in class Object
setCustomAttributes
public void setCustomAttributes(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.
- Specified by:
- setCustomAttributes in interface TransformationInterface
- Parameters:
value
- The custom attribute
getCustomAttributes
public String getCustomAttributes()
- Gets the custom attributes
- Specified by:
- getCustomAttributes in interface TransformationInterface
- Returns:
- The custom attributes
Version: 1.2.20000317.001 Formatted: 2000/07/06 15:57:33PM