Cisco Cisco Customer Voice Portal 8.0(1) Developer's Guide

Page of 98
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
V
OICE
XML
 
P
ROGRAMMING 
G
UIDE 
 
 
 
FOR 
C
ISCO 
U
NIFIED 
C
USTOMER 
V
OICE 
P
ORTAL 
R
ELEASE 
4.0(1) 
 
 
 
 
42
 
Common Methods 
The methods listed below are defined in 
ElementBase
 and are common to all configurable 
elements no matter what type. All custom Unified CVP classes used by these methods are 
defined in the 
com.audium.server.voiceElement
 package. Refer to the Javadocs for more in 
depth explanations of these methods and the classes they utilize. 
String getElementName() 
This returns the display name for the element. This is the name displayed in the Element Pane of 
Unified CVP VoiceXML Studio. There are no restricted characters for the display name, though 
best practices recommend a short name that avoids spaces and punctuation. 
String getDescription() 
This returns the description of the element. VoiceXML Studio displays this information in a tool 
tip when the cursor is placed above the element’s icon in the Element Pane. There is no 
restriction on the size or contents of the description. 
String getDisplayFolderName() 
This returns the name of the folder in VoiceXML Studio Element Pane in which the element 
resides. If 
null 
is returned, the element appears directly under the Elements folder (currently, 
only the Audio voice element appears directly under the Elements folder). To support a hierarchy 
of folders, the folder name can include a full path and the folder tree will automatically be 
generated by VoiceXML Studio (i.e. “
MyElements/Financial/Banking/
” would put the 
element icon inside three levels of folders). Best practices recommend short folder names that 
avoid spaces and punctuation. 
ExitState[] getExitStates() 
This method defines the exit states this element can return. It is necessary in order for 
VoiceXML Studio to properly render the exit state dropdown menu when the element is right-
clicked. The method returns an array of 
ExitState
 classes. The 
ExitState
 class encapsulates 
the real and display name for an exit state. The display name is used only by VoiceXML Studio 
and the real name is used everywhere else (within code or XML decisions). Note that for 
configurable action elements, this method need not be implemented as all action elements 
automatically have a single exit state named “done”. 
ElementData[] getElementData() 
This method describes the element data generated by this element. This method returns an array 
of 
ElementData
 objects or can be 
null
 if the element does not create any element data. The 
ElementData
 object encapsulates the variable’s name and its description. The description exits 
for future compatibility when VoiceXML Studio obtains the ability to display a tool tip for 
element data. Note that element data does not have a display name.