Friendly Data Types

All data types can be used in scripts as parameters in an expression.

The Expression Language supports any Java data types entered as a fully qualified Java class name. As with the Java language, all classes defined as part of the java.lang package can be named directly without having to include the package name. For example, the java.lang.String class can also be referred to as String. That is because the String class is both a friendly data type and also defined in the default java.lang package for which all classes do not need to be entered using their fully qualified class name. However, the java.util.ArrayList class cannot be referred to as simply ArrayList.

In addition to the fully qualified Java class names, the Cisco CRS expression language defines friendly data types that are equivalent to these Java class names. Entering these data types in a script is the same as entering their equivalent fully qualified Java class names.

Primitive Java data types such as int, boolean, long, float, byte, char, short, double are automatically converted into their corresponding Java object representation. You can enter into a Cisco Unified CCX script either the Java class name or the Cisco Unified CCX friendly data type name.

Table lists the friendly data types that the Expression Language uses and their equivalents in Java. The Java equivalent class names are the Java fully qualified class name, that is the data name and the package in which it is included.

Cisco Unified CCX Friendly Data Types with their Java Equivalent Class Names

Friendly Data Type

Java Class Name

Default Value

int

java.lang.Integer

0

String

java.lang.String

""

char

java.lang.Character

'\u0000'

float

java.lang.Float

0.0f

long

java.lang.Long

0L

double

java.lang.Double

0.0d

byte

java.lang.Byte

(byte)0

short

java.lang.Short

(short)0

boolean

java.lang.Boolean

false

User

com.cisco.user.User

null

Contact

com.cisco.contact.Contact

null

Session

com.cisco.session.Session

null

Script

com.cisco.script.Script

null

Prompt

com.cisco.prompt.Playable

P[]

Grammar

com.cisco.grammar.Recognizable

G[]

Document

com.cisco.doc.Document

DOC[]

Language

java.util.Locale

The system default language

Currency

com.cisco.util.Currency

The system default currency

Date

java.util.Date

The current date at the time of interpretation

Time

java.sql.Time

The current time at the time of interpretation

BigInteger

java.math.BigInteger

0IB

BigDecimal

java.math.BigDecimal

0.0fb

Iterator

java.util.Iterator

null