Cisco Cisco Customer Voice Portal Downloads 開発者ガイド
C
HAPTER
6:
D
YNAMIC
E
LEMENT
C
ONFIGURATIONS
V
OICE
XML
P
ROGRAMMING
G
UIDE
FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
26
The method must return an instance of the configuration object (
VoiceElementConfig
,
ActionElementConfig
or
DecisionElementConfig
). This can be a modified version of the
object passed as input to the method or one built from scratch. It is expected that should an
unrecoverable error occur, the dynamic configuration class should throw an
unrecoverable error occur, the dynamic configuration class should throw an
AudiumException
.
Due to the fact that most dynamic configurations involve only a few changes to the static
configuration, obtaining a base configuration as input to the execution method saves significant
coding effort since the dynamic configuration class simply needs to modify this object in order to
create the final configuration object then return it.
configuration, obtaining a base configuration as input to the execution method saves significant
coding effort since the dynamic configuration class simply needs to modify this object in order to
create the final configuration object then return it.
All three configuration classes extend a common base class,
ElementConfig
. This class defines
those features common to all three element configurations: settings, element and session data
created, custom log content, and associating the call with a UID.
created, custom log content, and associating the call with a UID.
ActionElementConfig
and
DecisionElementConfig
are essentially identical, separate classes are used for design
considerations and for possible future differentiation.
VoiceElementConfig
, however, expands
upon the
ElementConfig
class by introducing voice element only features: VoiceXML
properties and audio groups. The three configuration classes allow the developer to obtain
everything about a configuration as well as change or add to the configuration in any way.
everything about a configuration as well as change or add to the configuration in any way.
In order to handle audio groups,
VoiceElementConfig
introduces inner classes that define an
audio group (
AudioGroup
) and a generic audio item (
AudioItem
). Two additional inner classes
define audio item types that extend the
AudioItem
class to define a Say It Smart audio item
(
SayItSmart
) and a static audio item (
StaticAudio
). The
AudioGroup
class encapsulates any
number of
AudioItem
objects of either type. A developer can create new audio groups separately
and call a method in
VoiceElementConfig
to add the audio group to the configuration, or an
existing
AudioGroup
object can be obtained, modified, and then reinserted into the
configuration.
The Javadocs provide much more detail regarding these classes and their methods.
Using the XML API
Dynamic element configurations using the XML API send four HTTP POST arguments to the
URI specified:
URI specified:
“name”. The name of the element whose configuration is dynamic as a string.
“inputs”. One of the standard arguments passed to all components utilizing the XML API as
“inputs”. One of the standard arguments passed to all components utilizing the XML API as
“settings”. One of the standard arguments passed to all components utilizing the XML API as
“base”. The base configuration for the element represented as an XML document. If there is
no base configuration, this argument is not included. There are two possible DTDs for this
argument. One is used if the dynamic configuration is for a voice element and the other is if
the dynamic configuration is for decision and action elements.
argument. One is used if the dynamic configuration is for a voice element and the other is if
the dynamic configuration is for decision and action elements.