atg.droplet
Class TagConverterManager

java.lang.Object
  extended by atg.droplet.TagConverterManager

public class TagConverterManager
extends java.lang.Object

This class contains a set of static methods which you can use to register and use TagConverters. TagConverters are used to perform String to Object and Object to String conversion in the valueof, input and param tags.

To add your own converter, follow these steps:

See Also:
TagConverter

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.Object SET_AS_NULL
           
 
Constructor Summary
TagConverterManager()
           
 
Method Summary
static java.lang.Object convertStringToObject(TagConverter pCvt, DynamoHttpServletRequest pReq, java.lang.String pValue, java.util.Properties pAttributes)
          This method converts Strings to Objects swallowing the conversion exception so that it can be used in a class constructor.
static TagConverter getTagConverterByAttribute(java.lang.String pAttributeName)
          Returns the TagConverter registered for a specific attribute name.
static TagConverter getTagConverterByName(java.lang.String pConverterName)
          Returns the TagConverter for a specified set of attributes.
static boolean isTagAttribute(TagConverter pCvt, java.lang.String pAttributeName)
          Returns true if this is an attribute (either required or optional) for this converter.
static void registerTagConverter(TagConverter pConverter)
          Adds a new TagConverter to the global list of converters.
 
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

SET_AS_NULL

public static final java.lang.Object SET_AS_NULL
Constructor Detail

TagConverterManager

public TagConverterManager()
Method Detail

registerTagConverter

public static void registerTagConverter(TagConverter pConverter)
Adds a new TagConverter to the global list of converters. Converters are registered by name as specified in their getName method. If a converter of an existing name is already registered, this mechanism replaces that converter with this new converter.


getTagConverterByName

public static TagConverter getTagConverterByName(java.lang.String pConverterName)
Returns the TagConverter for a specified set of attributes. If no applicable converter is found, null is returned.


getTagConverterByAttribute

public static TagConverter getTagConverterByAttribute(java.lang.String pAttributeName)
Returns the TagConverter registered for a specific attribute name. If no converter is registered for that attribute, null is returned.


isTagAttribute

public static boolean isTagAttribute(TagConverter pCvt,
                                     java.lang.String pAttributeName)
Returns true if this is an attribute (either required or optional) for this converter.


convertStringToObject

public static java.lang.Object convertStringToObject(TagConverter pCvt,
                                                     DynamoHttpServletRequest pReq,
                                                     java.lang.String pValue,
                                                     java.util.Properties pAttributes)
This method converts Strings to Objects swallowing the conversion exception so that it can be used in a class constructor. It is only intended to be used in code generated by the PageCompiler.

The pReq argument can be null if there is no request with which to implement the conversion. If you are using the request to access the locale with which to perform the conversion, use the default locale in this case.