Cisco Cisco Unified Customer Voice Portal 10.0(1) Guía Del Desarrollador

Descargar
Página de 79
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
• 
The element data namespace is shared across the super-element and all sub-elements. Again, 
the Server uses a separate namespace for each element it is aware of, which means the super-
element. The super-element must ensure that element data created by one sub-element does 
not overwrite the element data created by another sub-element. 
• 
The super-element must handle all the “internal call flow” between sub-elements. 
Essentially, the super-element must perform the tasks the Server normally performs to handle 
the call flow between sub-elements. This means keeping track of state, managing the exit 
states of sub-elements, and knowing when to leave the super-element with its own exit states. 
Even though creating super-elements can be a tedious and potentially error-prone process, it may 
still be preferable over creating a new voice element from scratch. Examples of super-elements 
are available on Audium Support Center for those who prefer to learn by example. 
Configuration Methods 
In addition to the existing configuration methods defined in 
ElementBase
, two additional 
methods are required for a voice element class to implement. These methods deal with audio, a 
feature unique to voice element configurations. The values returned by these methods are used 
by CVP VoiceXML Studio to render the contents of the Audio tab of a voice element’s 
configuration. 
HashMap getAudioGroups() 
Unlike element settings, which are defined in a simple one-dimensional array, audio groups are 
combined into sets. This is done to facilitate organization and ease of use when configuring the 
voice element in Studio. When right-clicking on the Audio Groups folder in the Element 
Configuration Pane, the dropdown menu lists all the audio group sets. The designer can then 
choose an audio group within a set by selecting the appropriate name from the submenu. This 
method is used to return the audio groups for the element and the sets they belong to. 
A single audio group is contained within a single 
AudioGroup
 instance (
AudioGroup
 is found in 
the 
com.audium.server.voiceElement
 package). The object encapsulates the audio group’s 
real name, display name, and description. The display name is shown within the dropdown menu 
in Studio, the real name is used for all other situations. The audio group description is displayed 
as a tooltip when the cursor points to the audio group in the Element Configuration Pane.  
The 
AudioGroup
 class also defines setting dependencies. As with element settings, the 
appearance of audio groups can also depend on the values of certain settings. Again, this exists to 
simplify configuring a complex voice element in Studio. For example, an audio group that 
introduces a confirmation menu would not be necessary if a setting determining if a confirmation 
should exist is turned off. See the previous section describing the 
getSettings()
 method for a 
full description of how dependencies work. Configuring audio groups to depend on settings 
works the same way as configuring settings to depend on other settings. 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
61