atg.droplet
Class RequiredTagConverter

java.lang.Object
  extended by atg.droplet.RequiredTagConverter
All Implemented Interfaces:
TagConverter

public class RequiredTagConverter
extends java.lang.Object
implements TagConverter

Verifies that all converted values have values that are not all "whitespace". If they are just whitespace, an exception is thrown.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
RequiredTagConverter()
           
 
Method Summary
 java.lang.String convertObjectToString(DynamoHttpServletRequest pRequest, java.lang.Object pValue, java.util.Properties pAttributes)
          Converts the supplied Object value to a String value.
 java.lang.Object convertStringToObject(DynamoHttpServletRequest pRequest, java.lang.String pValue, java.util.Properties pAttributes)
          Converts the supplied String value to an Object value.
 java.lang.String getName()
          Returns the unique name for the TagConverter.
 TagAttributeDescriptor[] getTagAttributeDescriptors()
          Returns the list of TagAttributeDescriptors which are used by this converter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

RequiredTagConverter

public RequiredTagConverter()
Method Detail

getTagAttributeDescriptors

public TagAttributeDescriptor[] getTagAttributeDescriptors()
Description copied from interface: TagConverter
Returns the list of TagAttributeDescriptors which are used by this converter. Each TagAttributeDescriptor describes an attribute which can be used by this TagConverter. Attributes can be optional and they can also be automatic. An automatic attribute implies the use of this converter if that attribute appears in the tag (e.g. date=".." implies the use of the DateTagConverter).

Specified by:
getTagAttributeDescriptors in interface TagConverter

getName

public java.lang.String getName()
Description copied from interface: TagConverter
Returns the unique name for the TagConverter. This name can be used by the TagConverterManager to get a handle to this converter. When you specify the use of a TagConverter using the converter attribute in a tag, you use this name to refer to the TagConverter. TagConverter names are case insensitive (as is the convention in HTML).

Specified by:
getName in interface TagConverter

convertStringToObject

public java.lang.Object convertStringToObject(DynamoHttpServletRequest pRequest,
                                              java.lang.String pValue,
                                              java.util.Properties pAttributes)
                                       throws TagConversionException
Description copied from interface: TagConverter
Converts the supplied String value to an Object value. This operation is performed if a converter is used with an input tag during the form submission process or if a converter attributes are specified in the param tag when defining a new parameter.

Specified by:
convertStringToObject in interface TagConverter
Parameters:
pRequest - the request object for this conversion. This object can be null if the conversion is not performed in the context of a request.
pValue - The original String value to be converted.
pAttributes - The list of attributes in the tag that is invoking this converter.
Returns:
the converted object value.
Throws:
TagConversionException - if the conversion failed.

convertObjectToString

public java.lang.String convertObjectToString(DynamoHttpServletRequest pRequest,
                                              java.lang.Object pValue,
                                              java.util.Properties pAttributes)
                                       throws TagConversionException
Description copied from interface: TagConverter
Converts the supplied Object value to a String value. This operation is performed when you are displaying a value using this converter. This occurs when the converter is used in the valueof tag or when rendering the value attribute of an input tag.

Specified by:
convertObjectToString in interface TagConverter
Parameters:
pRequest - the request this conversion applies to. You can use this request to obtain the RequestLocale to localize the conversion process. This can be null if the conversion is not performed in the context of a request.
pValue - the Object value to be converted to a String
pAttributes - the set of attributes supplied in this tag declaration.
Returns:
the converted object value.
Throws:
TagConversionException