Cisco Cisco Unified Customer Voice Portal 10.5(1) Guida Dello Sviluppatore
C
HAPTER
2:
U
NIFIED
CVP
API
I
NTRODUCTION
P
ROGRAMMING
G
UIDE FOR
C
ISCO
U
NIFIED
CVP
VXML
S
ERVER
AND
C
ISCO
U
NIFIED
C
ALL
S
TUDIO
R
ELEASE
4.1(1)
7
developer’s responsibility that the contents of the
common
folder in Call Studio also appear in the
VXML Server
common
folder.
Note that when VXML Server initializes, it first loads the classes in
common
and then loads each
application’s classes. Due to the way Java classloaders work, if a Java class appears in both the
common
folder and an application’s
java
folder, the one in
common
will take precedence and the
one in the application’s
java
folder will not be loaded. Also note that due to the order in which
these classes are loaded, the developer cannot place a class in
common
that refers to a class that
only appears in an application’s
java
folder since the classes in
common
are loaded first. Keep in
mind that some application servers have advanced options to change this precedence to “parent-
last”, meaning that the application-level classloaders take precedence. By default, all application
servers should be configured to be “parent-first”.
last”, meaning that the application-level classloaders take precedence. By default, all application
servers should be configured to be “parent-first”.
Subdirectories of the Java Folder
The
java
folder of a Call Studio project and a VXML Server application folder contain two
subdirectories named
application
and
util
. Each folder encapsulates Java classes used for
different purposes, their distinctions applying primarily to how the application works within
VXML Server.
VXML Server.
The
application
folder should contain all Java code for components that are used by the
application. Note that in Call Studio, any custom configurable elements that are utilized only by
the application would be placed in this folder and will appear in Call Studio’s element pane
under the folder named “Local Elements”. The call flow editor for that application must be
closed and reopened in order for newly copied local elements to appear in the element pane.
the application would be placed in this folder and will appear in Call Studio’s element pane
under the folder named “Local Elements”. The call flow editor for that application must be
closed and reopened in order for newly copied local elements to appear in the element pane.
The second subdirectory of the
java
folder is the
util
folder. This is used for Java libraries that
provide the application with utilities unaffiliated with Unified CVP (such as math libraries, XML
parsing libraries, etc.).
parsing libraries, etc.).
There are several notes that must be made concerning which folder to use:
•
Any class that refers to Unified CVP-specific API classes cannot be deployed in the
util
folder. If the class is application-specific, it must be placed in the
application
folder of that
application. If the class is to be shared across all applications, it must be placed in the
common
folder of VXML Server.
•
The classes in the
util
folder will not be reloaded when the application is updated using the
updateApp
administration script. If this behavior is not desired or the utility libraries are
frequently updated, place these files in the
application
folder. See the VXML Server User
Guide for Cisco Unified Customer Voice Portal, Chapter 3 in the section describing the
update capabilities for more information.
update capabilities for more information.
•
Utility classes that do not refer to Unified CVP classes at all (such as third-party libraries)
can be placed anywhere within the
can be placed anywhere within the
CLASSPATH
of the application server. For example, on the