DBA Data[Home] [Help]

PACKAGE: APPS.IBE_UTIL

Source


1 PACKAGE IBE_UTIL AUTHID CURRENT_USER AS
2 /* $Header: IBEUTILS.pls 120.0 2005/05/30 03:11:09 appldev noship $ */
3 /*----------------------------------------------------------------------------*
4  | PUBLIC PROCEDURES                                                          |
5  |    debug                - Display text message if in debug mode            |
6  |    enable_debug_new     - Enable run time debugging                        |
7  |    disable_debug_new    - Disable run time debugging                       |
8  |    file_debug           - Write text messages into a file if in            |
9  |                           file_debug mode                                  |
10  |                                                                            |
11  |    enable_file_debug    - Enable writing debug messages to a file.        |
12  |                  Requires file patch (directory), THIS SHOULD BE |
13  |            DEFINED IN INIT.ORA PARAMETER 'UTIL_FILE_DIR',  |
14  |            file name (Any valid OS file name).             |
15  |   disable_file_debug    - Stops writing into the file.                     |
16  |   get_install_info      - Calls FND_INSTALLATION.get() to determine if an  |
17  |                                                                            |
18  | DESCRIPTION                                                                |
19  |    Generate standard debug information for PL/SQL apis by sending it to    |
20  |    to a operating system file.                 |
21  |                                                                            |
22  | HOW TO USE ISTORE DEBUGGING:                                               |
23  |                                                                            |
24  | 1. Turn on the Debugging                                                   |
25  |  a) If calling pl/sql from java before calling PL/SQL api from java itself |
26  |    enable runtime debugging. and after pl/sql is finished, disable run time|
27  |    debugging.                                                              |
28  |    Example:                                                                |
29  |    ocsStmt.append("BEGIN " +                                               |
30  |                   IBEUtil.getEnableDebugString() +  <= To turn on debugging|
31  |                   "IBE_Quote_W1_Pvt.SaveWrapper(" +  <= Your PL/SQL api    |
32  |                       .....                                                |
33  |                       .....                                                |
34  |                       .....                                                |
35  |                   );                                                       |
36  |    .....                                                                   |
37  |    ocsStmt.append(IBEUtil.getDisableDebugString() + "END;"); <= Turn off   |
38  |                                                                 debugging  |
39  |                                                                            |
40  |  b) If calling pl/sql api from  within PL/SQL itself                       |
41  |       call ibe_util.enable_debug_new before and call                       |
42  |       ibe_util.disable_debug_new afterwards                                |
43  |                                                                            |
44  | 2. Within your PL/SQL api's call IBE_UTIL.debug to print the messages      |
45  |    NO NEED TO CALL enable_Debug or disable_debug from within pl/sql api    |
46  |                                                                            |
47  |                                                                            |
48  | REQUIRES                                                                   |
49  |                            |
50  |                                                                            |
51  | EXCEPTIONS RAISED                                                          |
52  |                                                                            |
53  | KNOWN BUGS                                                                 |
54  |                                                                            |
55  | NOTES                                                                      |
56  |                                                                            |
57  | HISTORY                                                                    |
58  |   Harish Ekkirala Created 04/03/2000.              |
59  |   05/05/2000 - Audrey Yu added get_install_info            |
60  |   07/29/2002 - achalana - Changed the Debugging mechanism for performance  |                                                                            |
61  |      fix (bug 2406789)                                     |
62  |   08/26/2003 - abhandar : new procedure check_jtf_permission               |
63  |   09/04/2003 - abhandar - Modified for NOCOPY .                            |
64  |   01/14/2004 - batoleti - Added nls_number_format  function                |
65  |   02/18/2004 - ssekar   - Added insert_into_temp_table and                 |
66  |                           delete_from_temp_table created by Anita          |
67  |---------------------------------------------------------------------------*/
68 
69 G_DEBUG      Varchar2(1)    := FND_API.G_FALSE;
70 
71 /* New variable 07/29 - achalana */
72 G_DEBUGON      Varchar2(1)    := NULL;
73 
74 procedure file_debug(p_line in varchar2);
75 
76 procedure enable_file_debug(p_path_name in varchar2,
77                   p_file_name in varchar2);
78 
79 procedure disable_file_debug;
80 
81 procedure debug(p_line in varchar2);
82 
83 procedure enable_debug;
84 
85 /* New procedure 07/29 - achalana */
86 procedure enable_debug_new(p_check_profile varchar2 default NULL);
87 
88 procedure enable_debug_pvt;
89 
90 procedure disable_debug;
91 
92 /* New procedure 07/29 - achalana */
93 procedure disable_debug_new;
94 procedure reset_debug;
95 
96 
97 procedure disable_debug_pvt;
98 
99 procedure get_install_info(p_appl_id     in  number,
100          p_dep_appl_id in  number,
101          x_status   out NOCOPY  varchar2,
102          x_industry   out NOCOPY  varchar2,
103          x_installed   out NOCOPY  number);
104 
105 
106 --added by abhandar 08/26/03 : new procedure --
107 --replicates jtf SecurityManager.check() functionality
108 FUNCTION check_jtf_permission(
109                p_permission     in  VARCHAR2,
110                p_user_name      in  VARCHAR2 :=fnd_global.user_name
111                ) RETURN BOOLEAN;
112 
113 -- replicates RequestCtx.userHasPermission() functionality
114 -- always returns true for IBE_INDIVIDUAL user
115 FUNCTION check_user_permission(
116                p_permission     in  VARCHAR2,
117                p_user_name      in  VARCHAR2 :=fnd_global.user_name
118                ) RETURN BOOLEAN;
119 
120 --added by batoleti 01/14/04 : new function
121 --converts the number format to canonical format
122 FUNCTION nls_number_format(
123                             p_number_in     in  VARCHAR2
124                           ) RETURN VARCHAR2;
125 
126 -- delete data from temporary table
127 FUNCTION delete_from_temp_table (p_keyString IN VARCHAR2)  RETURN VARCHAR2;
128 -- inserts data from temporary table
129 PROCEDURE insert_into_temp_table (p_inString IN VARCHAR2,
130                                   p_Type     IN VARCHAR2,
131                                   p_keyString IN VARCHAR2,
132                                   x_QueryString OUT NOCOPY VARCHAR2);
133 
134 --Concatenates phone elements to phone format of iStore
135 FUNCTION format_phone(
136                             p_country_code     in  VARCHAR2,
137                             p_area_code     in  VARCHAR2,
138                             p_phone_number     in  VARCHAR2,
139                             p_phone_ext     in  VARCHAR2
140 
141                           ) RETURN VARCHAR2;
142 End IBE_UTIL;