com.plumtree.portaluiinfrastructure.tags.metadata
Class AttributeType

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.tags.metadata.AttributeType

public class AttributeType
extends java.lang.Object

This enumeration specifies the type of an attribute. If the input value of a required attribute cannot be converted to the correct type, an error will be raised and the tag will not be displayed (for required attributes only).

Information about valid inputs for each type is provided with each enumeration value. In general, the Tag Framework uses the XPConvert class to convert the string attribute value into the appropriate type.

See Also:
com.plumtree.openfoundation.util.XPConvert

Field Summary
static AttributeType BOOLEAN
          boolean
static AttributeType CHAR
          char
static AttributeType DOUBLE
          double
static AttributeType INT
          int
static AttributeType LONG
          long
static AttributeType STRING
          String
 
Method Summary
 java.lang.String toString()
          Human readable name of the AttributeType.
static void ValidateTypeSafety(java.lang.String _strValue, AttributeType _Type)
          This helper method is used to ensure that the input supplied is valid for this attribute type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING

public static final AttributeType STRING
String

Valid input for this type is any string.


INT

public static final AttributeType INT
int

Valid input for this type is a string representation of a 32-bit signed integer.

E.G. "7", "42".


BOOLEAN

public static final AttributeType BOOLEAN
boolean

Valid input for this type is a string that contains the value of "true", "True", "false", "False", "1", or "0".


DOUBLE

public static final AttributeType DOUBLE
double

Valid input for this type is a string representation of double-precision floating point number. This conversion always uses the default locale representation of the server ("." for decimal point, et cetera).

E.G. "4.2", "37", "987.45".


LONG

public static final AttributeType LONG
long

Valid input for this type is a string representation of a 64-bit signed integer (I.E. a long).

E.G. "-5465", "12".


CHAR

public static final AttributeType CHAR
char

Valid input for this type is a string that contains a single character.

E.G. "c", "q".

Method Detail

toString

public java.lang.String toString()
Human readable name of the AttributeType.

Overrides:
toString in class java.lang.Object
Returns:
String Human readable name of the AttributeType

ValidateTypeSafety

public static void ValidateTypeSafety(java.lang.String _strValue,
                                      AttributeType _Type)
This helper method is used to ensure that the input supplied is valid for this attribute type.

Parameters:
String - _strValue The input value.
AttributeType - The current attribute type.
Throws:
XPFormatException - The input cannot be converted to the appropriate type.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.