DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_ICX_SECURITY_PVT

Source


1 PACKAGE BODY BIS_ICX_SECURITY_PVT as
2 /* $Header: BISVSECB.pls 115.5 2003/03/11 10:32:01 nkishore noship $ */
3 -- dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=plb \
4 -- dbdrv: checkfile:~PROD:~PATH:~FILE
5 ----------------------------------------------------------------------------
6 --  PACKAGE:      BIS_ICX_SECURITY_PVT
7 --                                                                        --
8 --  DESCRIPTION:  Private package to simulate ICX login
9 --                and get the session_id, cookie_value and transaction id
10 --
11 --                                                                        --
12 --  MODIFICATIONS                                                         --
13 --  Date       User       Modification
14 --  XX-XXX-XX  XXXXXXXX   Modifications made, which procedures changed &  --
15 --                        list bug number, if fixing a bug.               --
16 --                                --
17 --  02-25-00   amkulkar   Initial creation                                --
18 --  02-17-03   nkishore   Adding Resp id, appl id, sec grp id and update  --
19 --                        session context                                 --
20 ----------------------------------------------------------------------------
21 PROCEDURE  CREATE_ICX_SESSION
22 (p_user_id      		IN      VARCHAR2
23 ,p_resp_appl_id			IN	NUMBER DEFAULT NULL
24 ,p_responsibility_id		IN	NUMBER DEFAULT NULL
25 ,p_security_group_id		IN	NUMBER DEFAULT NULL
26 ,p_menu_id			IN	NUMBER DEFAULT NULL
27 ,p_function_id			IN	NUMBER DEFAULT NULL
28 ,p_page_id			IN	NUMBER DEFAULT NULL
29 ,x_session_id 			OUT 	NOCOPY NUMBER
30 ,x_cookie_value			OUT	NOCOPY VARCHAR2
31 ,x_cookie_name			OUT	NOCOPY VARCHAR2
32 ,x_transaction_id		OUT	NOCOPY VARCHAR2
33 ,x_dbc_name			OUT	NOCOPY VARCHAR2
34 ,x_apps_web_agent		OUT	NOCOPY VARCHAR2
35 ,x_apps_fwk_agent		OUT	NOCOPY VARCHAR2
36 ,x_language_code		OUT	NOCOPY VARCHAR2
37 ,x_return_Status 		OUT     NOCOPY VARCHAR2
38 ,x_msg_Data    			OUT     NOCOPY VARCHAR2
39 ,x_msg_count    		OUT     NOCOPY NUMBER
40 )
41 IS
42   l_session_id 			NUMBER;
43   l_cookie_name			VARCHAR2(32000);
44   l_cookie_value		VARCHAR2(32000);
45   l_transaction_id		VARCHAR2(32000);
46   l_profile_defined             boolean;
47   l_language    		varchar2(32000);
48 BEGIN
49   if p_security_group_id is null then
50     l_session_id := icx_sec.createsession(p_user_id => p_user_id);
51   else
52     l_session_id := icx_sec.createsession(p_user_id => p_user_id
53                                          , c_sec_grp_id => p_security_group_id);
54   end if;
55 
56   l_cookie_name := icx_sec.getsessioncookiename();
57   l_cookie_value := icx_call.encrypt3(l_session_id);
58   if p_responsibility_id is null then
59     l_transaction_id := icx_sec.createtransaction(l_session_id);
60   else
61     l_transaction_id := icx_sec.createtransaction(p_session_id  => l_session_id
62                                                 , p_resp_appl_id => p_resp_appl_id
63                                                 , p_responsibility_id => p_responsibility_id
64                                                 , p_security_group_id => p_security_group_id);
65   end if;
66   if p_responsibility_id is not null then
67      icx_sec.updateSessionContext(
68                                 p_application_id         => p_resp_appl_id,
69                                 p_responsibility_id      => p_responsibility_id,
70                                 p_security_group_id      => p_security_group_id,
71                                 p_session_id             => l_session_id,
72                                 p_transaction_id         => l_transaction_id);
73   end if;
74 
75   x_session_id := l_session_id;
76   x_cookie_value := l_cookie_value;
77   x_cookie_name := l_cookie_name;
78   x_transaction_id := icx_call.encrypt3(l_transaction_id);
79   x_dbc_name := FND_WEB_CONFIG.DATABASE_ID;
80   x_apps_web_agent := FND_WEB_CONFIG.TRAIL_SLASH(fnd_profile.value('APPS_WEB_AGENT'));
81   FND_PROFILE.GET_SPECIFIC(name_z  =>  'ICX_LANGUAGE'
82 			  ,user_id_z => p_user_id
83 			  ,val_z     => x_apps_fwk_Agent
84 			  ,defined_z => l_profile_defined
85 			  );
86   x_apps_fwk_agent := FND_WEB_CONFIG.TRAIL_SLASH(x_apps_fwk_agent);
87   FND_PROFILE.GET_SPECIFIC(name_z  => 'ICX_LANGUAGE'
88 			  ,user_id_z => p_user_id
89 			  ,val_z     => l_language
90 			  ,defined_z => l_profile_Defined
91 			  );
92   if l_language is null then
93      select upper(value) into l_language
94      from v$nls_parameters
95      where parameter='NLS_LANGUAGE';
96   end if;
97   SELECT language_code INTO x_language_Code
98   FROM fnd_languages
99   WHERE nls_language = l_language;
100   x_return_status := FND_API.G_RET_STS_SUCCESS;
101   FND_MSG_PUB.Count_And_get
102   (p_count	=>	x_msg_count,
103    p_data	=>	x_msg_data
104   );
105 EXCEPTION
106 WHEN OTHERS THEN
107   x_return_status := FND_API.G_RET_STS_ERROR;
108   FND_MSG_PUB.Count_And_get
109   (p_count	=>	x_msg_count,
110    p_data	=>	x_msg_data
111   );
112 END;
113 END BIS_ICX_SECURITY_PVT;