DBA Data[Home] [Help]

PACKAGE: APPS.WFA_SEC

Source


1 package WFA_SEC AUTHID CURRENT_USER as
2 /* $Header: wfsecs.pls 120.3.12010000.3 2009/08/26 21:17:11 vshanmug ship $ */
3 
4 -- Flag to tell get session to just do the validation or do the validation
5 -- and show the login dialog.  This is used by the monitor so it has a chance
6 -- to check the access key if the get session fails.
7 -- This is also used by detached notification viewing to see if a valid
8 -- session exists.
9 validate_only  BOOLEAN := FALSE;
10 
11 --
12 -- CreateSession - create web session for the client
13 --   Creates a new web session for the supplied username and password.
14 --   Session information is typically stored on the web client as an
15 --   http cookie.
16 -- IN
17 --   c_user_name - user name
18 --   c_user_password - user password (plain text)
19 -- ERRORS
20 --   WFSEC_USER_PASSWORD - invalid user name or password
21 --   WFSEC_SESSION_CREATE - could not create a session
22 --
23 procedure CreateSession(
24     c_user_name     in varchar2,
25     c_user_password in varchar2);
26 
27 --
28 -- PseudoSession - create ICX psuedo session for the client
29 --   Creates a temp ICX session for the current user coming into ICX
30 --   from an email notification with a link to the applications.
31 --   Session information is typically stored on the web client as an
32 --   http cookie.  This only applies to ICX so only wfsecicb will
33 --   have an actual implementation for this function.  The others
34 --   do nothing.
35 --
36 procedure PseudoSession(IncludeHeader in BOOLEAN default TRUE,
37                         user_name     in varchar2 default null);
38 
39 --
40 -- GetSession - Get web session information client
41 --   Gets the session information from the client (typically stored as
42 --   an http cookie).
43 -- OUT
44 --   user_name - user name
45 -- ERRORS
46 --   WFSEC_NO_SESSION - no valid session is in effect for the client
47 --   WFSEC_GET_SESSION - error gettiong session information
48 --
49 procedure GetSession(user_name out NOCOPY varchar2);
50 
51 --
52 -- Header
53 --   Print an html page header
54 -- IN
55 --   background_onl  - Only set background with no other header
56 --   disp_find - When defined, Find button is displayed, and the value
57 --               is the URL the Find button is pointting to.
58 --
59 procedure Header(background_only in boolean default FALSE,
60                  disp_find in varchar2 default NULL,
61                  page_title in varchar2 default NULL,
62                  inc_lov_applet  in boolean  default TRUE,
63                  pseudo_login in boolean default FALSE);
64 
65 --
66 -- Footer
67 --   Print an html page footer
68 --
69 procedure Footer;
70 
71 --
72 -- DetailURL
73 --   Produce URL for notification detail and response page.
74 -- IN
75 --   nid - notification id
76 -- RETURNS
77 --   URL of detail and response page for notification.
78 --
79 function DetailURL(nid in number) return varchar2;
80 
81 
82 --
83 -- Create_Help_Syntax
84 --   Create the javascript necessary to launch the help function
85 --   Since this is only required for the apps install case
86 --   IN ( have covered this function with a wfa_sec function.
87 --   The other wfsec cases are just a stub.
88 -- IN
89 --   p_target - target in the help file that you wish to display
90 --   p_language_code - current user language
91 --
92 procedure Create_Help_Syntax (
93 p_target in varchar2 default null,
94 p_language_code in varchar2 default null);
95 
96 --
97 -- get_role_info
98 --   Gets role info for the user sources that we know about rather
99 --   than using the ugly expensive wf_roles view
100 --
101 procedure get_role_info (
102   role in varchar2,
103   name out NOCOPY varchar2,
104   display_name out NOCOPY varchar2,
105   description out NOCOPY varchar2,
106   email_address out NOCOPY varchar2,
107   notification_preference out NOCOPY varchar2,
108   language out NOCOPY varchar2,
109   territory out NOCOPY varchar2,
110   orig_system  out NOCOPY varchar2,
111   orig_system_id out NOCOPY number
112 );
113 
114 -- get_role_info2
115 --   Gets role info for the user sources that we know about rather
116 --   than using the ugly expensive wf_roles view
117 --
118 procedure get_role_info2(
119   role in varchar2,
120   name out NOCOPY varchar2,
121   display_name out NOCOPY varchar2,
122   description out NOCOPY varchar2,
123   email_address out NOCOPY varchar2,
124   notification_preference out NOCOPY varchar2,
125   language out NOCOPY varchar2,
126   territory out NOCOPY varchar2,
127   orig_system  out NOCOPY varchar2,
128   orig_system_id out NOCOPY number,
129   FAX out NOCOPY VARCHAR2 ,
130   STATUS out NOCOPY VARCHAR2 ,
131   EXPIRATION_DATE out NOCOPY DATE,
132   p_CompositeName in BOOLEAN default NULL
133 );
134 
135   /* get_role_info3
136    *
137    * Returns profile and pre-set values for the given role.
138    * Added NLS parameter for phase 1 of full NLS support, bug 7578908
139    */
140   procedure get_role_info3(p_CompositeName in BOOLEAN,
141                             p_role in varchar2,
142                             p_name out NOCOPY varchar2,
143                             p_display_name out NOCOPY varchar2,
144                             p_description out NOCOPY varchar2,
145                             p_email_address out NOCOPY varchar2,
146                             p_notification_preference out NOCOPY varchar2,
147                             p_orig_system  out NOCOPY varchar2,
148                             p_orig_system_id out NOCOPY number,
149                             p_FAX out NOCOPY VARCHAR2,
150                             p_STATUS out NOCOPY VARCHAR2,
151                             p_EXPIRATION_DATE out NOCOPY DATE  ,
152                             p_nlsLanguage out NOCOPY varchar2,
153                             p_nlsTerritory out NOCOPY varchar2
154                           , p_nlsDateFormat out NOCOPY varchar2
155                           , p_nlsDateLanguage out NOCOPY varchar2
156                           , p_nlsCalendar out NOCOPY varchar2
157                           , p_nlsNumericCharacters out NOCOPY varchar2
158                           , p_nlsSort out NOCOPY varchar2
159                           , p_nlsCurrency out NOCOPY varchar2
160    );
161 
162 --
163 -- ResetCookie
164 --  Resets cookie cookieName to -1.
165 --
166 procedure ResetCookie(cookieName in varchar2);
167 
168 --
169 -- GET_PROFILE_VALUE (PRIVATE)
170 --
171 function Get_Profile_Value(name varchar2,
172                            user_name varchar2)
173 return varchar2;
174 
175 -- Local_Chr
176 --   Return specified character in current codeset
177 -- IN
178 --   ascii_chr - chr number in US7ASCII
179 function Local_Chr(
180   ascii_chr in number)
181 return varchar2;
182 pragma restrict_references (LOCAL_CHR, WNDS);
183 
184 --
185 -- DirectLogin - Return proper function name for DirectLogin  --Bug: 1566390
186 --
187 --
188 function DirectLogin(nid in number)
189 return varchar2;
190 
191 --
192 -- GetFWKUserName
193 --   Return current Framework user name
194 --
195 function GetFWKUserName
196 return varchar2;
197 
198 --
199 -- Logout
200 --  For Single sign-on logout only, other security packages
201 --  still uses WFA_HTML.Logout to logout
202 --
203 procedure Logout;
204 
205 --
206 -- DS_Count_Local_Role (PRIVATE)
207 --   Returns count of a role in local directory service table
208 -- IN
209 --   role_name - role to be counted
210 -- RETURN
211 --   count of provided role in local directory service table
212 --
213 function DS_Count_Local_Role(role_name in varchar2)
214 return number;
215 
216 --
217 -- DS_Update_Local_Role (PRIVATE)
218 --   Update old name user/role in local directory service tables with new name
219 -- IN
220 --   OldName - original name to be replaced
221 --   NewName - new name to replace
222 --
223 procedure DS_Update_Local_Role(
224   OldName in varchar2,
225   NewName in varchar2
226 );
227 
228 --
229 -- GetUser
230 --   Return current user name
231 --   If apps get the FWKUser in standalone get session user.
232 
233 function GetUser
234 return varchar2;
235 
236 --
237 -- user_id
238 --   Return current user id, in apps, wrapper to  FND_GLOBAL.user_id
239 --   In standalone, returns -1.
240 function user_id return number;
241 
242 
243 --
244 -- login_id
245 --   Return current login id, in apps, wrapper to  FND_GLOBAL.login_id
246 --   In standalone, returns -1.
247 function login_id return number;
248 
249 --
250 -- security_group_id
251 --   Return current security_group_id, in apps, wrapper to
252 --   FND_GLOBAL.security_group_id  In standalone, returns -1.
253 function security_group_id return number;
254 
255 --
256 -- CheckSession
257 --   Check the cached ICX session id against the current session id to determine
258 --   if the session has been changed. This function caches the current session id
259 --   after the check.
260 -- RETURN
261 --   boolean - True if session matches, else false
262 function CheckSession return boolean;
263 
264 
265 --
266 -- Random
267 --   Return a random number in varchar2.  When an implementation is not
268 --   available, return null.
269 -- RETURN
270 --   Text of a random number
271 function Random return varchar2;
272 
273 -- bug 7828862
274 -- Cache_Ctx
275 --   Caches current session context values such as user_id, resp_id,
276 --   resp_appl_id and so on from FND_GLOBAL package
277 --
278 procedure Cache_Ctx;
279 
280 --
281 -- Restore_Ctx
282 --   Resets current context based on the cached values
283 --
284 procedure Restore_Ctx;
285 
286 end WFA_SEC;