DBA Data[Home] [Help]

PACKAGE: APPS.HZ_FORMAT_PHONE_V2PUB

Source


1 package HZ_FORMAT_PHONE_V2PUB AS
2 /*$Header: ARHPHFMS.pls 120.8 2006/08/17 10:18:21 idali noship $ */
3 /*#
4  * This package contains the public APIs used to parse the phone number into country_code,
5  * area_code, and phone_number and to format a phone number for display, based on the
6  * appropriate phone formats.
7  * @rep:scope public
8  * @rep:product HZ
9  * @rep:displayname Format Phone
10  * @rep:category BUSINESS_ENTITY HZ_CONTACT_POINT
11  * @rep:lifecycle active
12  * @rep:doccd 120hztig.pdf Phone Parsing and Formatting APIs,  Oracle Trading Community Architecture Technical Implementation Guide
13  */
14 
15 
16 TYPE user_phone_preferences_rec IS RECORD (
17     USER_TERRITORY_CODE             VARCHAR2(2),
18     DEFAULT_AREA_CODE               VARCHAR2(10),
19     DISPLAY_AREA_CODE               VARCHAR2(1),
20     DISPLAY_ALL_PREFIXES            VARCHAR2(1),
21     PABX_PREFIX                     VARCHAR2(1)
22   );
23 
24 /*#
25  * Use this routine to parse a raw phone number into the country code, area code
26  * and subscriber number, based on the setup of country and user phone
27  * preferences. Raw phone numbers are an entered string of digits that must
28  * include the subscriber number, and may include the international prefix,
29  * trunk prefix, country code, and area code. Depending on the country, users can enter
30  * phone numbers using different formats. This API is called from the
31  * Contact Point API. The Contact Point API calls this API when creating or updating a
32  * contact point of PHONE type and when the raw phone number is passed to the Contact Point
33  * API. The Parse Phone Number API returns the parsed country code, area code, and
34  * subscriber number to the Contact Point API, which then populates these columns in the
35  * HZ_CONTACT_POINTS table.
36  * @rep:scope public
37  * @rep:lifecycle active
38  * @rep:displayname Parse Phone Number
39  * @rep:doccd 120hztig.pdf Phone Parsing and Formatting APIs,  Oracle Trading Community Architecture Technical Implementation Guide
40  */
41 PROCEDURE phone_parse (
42     p_init_msg_list           IN  VARCHAR2 := fnd_api.g_false,
43     p_raw_phone_number        IN  VARCHAR2 := fnd_api.g_miss_char,
44     p_territory_code          IN  VARCHAR2 := fnd_api.g_miss_char,
45     x_phone_country_code      OUT NOCOPY VARCHAR2,
46     x_phone_area_code         OUT NOCOPY VARCHAR2,
47     x_phone_number            OUT NOCOPY VARCHAR2,
48     x_mobile_flag             OUT NOCOPY VARCHAR2,
49     x_return_status           OUT NOCOPY VARCHAR2,
50     x_msg_count               OUT NOCOPY NUMBER,
51     x_msg_data                OUT NOCOPY VARCHAR2 );
52 
53 PROCEDURE phone_display(
54     p_init_msg_list          IN VARCHAR2 := fnd_api.g_false,
55     p_contact_point_id       IN NUMBER,
56     x_formatted_phone_number OUT NOCOPY VARCHAR2,
57     x_return_status          OUT NOCOPY VARCHAR2,
58     x_msg_count              OUT NOCOPY NUMBER,
59     x_msg_data               OUT NOCOPY VARCHAR2 );
60 
61 /*#
62  * Use this routine to format a phone number for display, based on the
63  * appropriate country phone format and the user's preferences. The format considers
64  * which number segments to display as well as the inclusion of prefixes.
65  * @rep:scope public
66  * @rep:lifecycle active
67  * @rep:displayname Format Phone Number
68  * @rep:doccd 120hztig.pdf Phone Parsing and Formatting APIs,  Oracle Trading Community Architecture Technical Implementation Guide
69  */
70 PROCEDURE phone_display(
71     p_init_msg_list          IN VARCHAR2 := fnd_api.g_false,
72     p_territory_code         IN VARCHAR2 := fnd_api.g_miss_char,
73     p_phone_country_code     IN VARCHAR2 := fnd_api.g_miss_char,
74     p_phone_area_code        IN VARCHAR2 := fnd_api.g_miss_char,
75     p_phone_number           IN VARCHAR2 := fnd_api.g_miss_char,
76     x_formatted_phone_number OUT NOCOPY VARCHAR2,
77     x_return_status          OUT NOCOPY VARCHAR2,
78     x_msg_count              OUT NOCOPY NUMBER,
79     x_msg_data               OUT NOCOPY VARCHAR2 );
80 
81 
82 PROCEDURE check_mobile_phone (
83      p_init_msg_list           IN  VARCHAR2 := fnd_api.g_false,
84      p_phone_country_code      IN  VARCHAR2 := fnd_api.g_miss_char,
85      p_phone_area_code         IN  VARCHAR2 := fnd_api.g_miss_char,
86      p_phone_number            IN  VARCHAR2 := fnd_api.g_miss_char,
87      x_mobile_flag             OUT NOCOPY VARCHAR2,
88      x_return_status           OUT NOCOPY VARCHAR2,
89      x_msg_count               OUT NOCOPY NUMBER,
90      x_msg_data                OUT NOCOPY VARCHAR2);
91 
92 FUNCTION get_formatted_phone(
93     p_contact_point_id       IN NUMBER,
94     p_display_purpose        IN VARCHAR2 := fnd_api.g_true
95 ) RETURN VARCHAR2;
96 
97 
98 /**
99  * FUNCTION get_formatted_phone
100  *
101  * DESCRIPTION
102  *    Overloaded function to return a formatted phone number.
103  *
104  * ARGUMENTS
105  *   IN:
106  *     p_phone_country_code     phone country code
107  *     p_phone_area_code        phone area code
108  *     p_phone_number           phone number
109  *     p_phone_extension        phone extension
110  *     p_phone_line_type        phone line type
111  *     p_display_purpose        If the return is for display purpose.
112  *                              When the value is FND_API.G_TRUE, return
113  *                              formatted phone number (phone line type)
114  *
115  *   RETURNS    : VARCHAR2
116  *
117  */
118 FUNCTION get_formatted_phone (
119     p_phone_country_code          IN     VARCHAR2,
120     p_phone_area_code             IN     VARCHAR2,
121     p_phone_number                IN     VARCHAR2,
122     p_phone_extension             IN     VARCHAR2,
123     p_phone_line_type             IN     VARCHAR2,
124     p_display_purpose             IN     VARCHAR2 DEFAULT NULL
125 ) RETURN VARCHAR2;
126 
127 
128 end HZ_FORMAT_PHONE_V2PUB;