1 package WFA_HTML AUTHID CURRENT_USER as
2 /* $Header: wfhtms.pls 120.2.12010000.1 2008/07/25 14:42:07 appldev ship $ */
3
4 --base_url VARCHAR2(2000) := wf_core.translate('WF_WEB_AGENT');
5
6 image_loc VARCHAR2(80) := '/OA_MEDIA/';
7
8 --
9 -- Types
10 --
11
12 -- complex name#type identifiers from the web page
13 type name_array is table of varchar2(240) index by binary_integer;
14
15 -- values from the web page.
16 type value_array is table of varchar2(4000) index by binary_integer;
17
18 --
19 -- Homemenu
20 -- Generate menu on Home page.
21 -- IN
22 -- message - optional message
23 -- NOTE
24 -- This page links to all other workflow web interfaces.
25 procedure Homemenu(
26 message in varchar2 default null,
27 origin in varchar2 default 'NORMAL');
28
29 procedure Home_float;
30
31
32 --
33 -- Home
34 -- Generates Home page.
35 -- IN
36 -- message - optional message
37 procedure Home(
38 message in varchar2 default null);
39
40 procedure logout;
41
42 procedure Header;
43
44 --
45 -- Login
46 -- Generate login page.
47 -- IN
48 -- message - optional login message
49 -- NOTE
50 -- This page is only used to enable access when no external security
51 -- is installed. Normally users are authenticated by the chosen
52 -- security system (IC, WebServer native, etc) and can then access
53 -- the Workflow Notification pages (Worklist, Detail) directly.
54 --
55 --
56 -- CTILLEY Added i_direct arg - bug 1838410
57 --
58
59 procedure Login(
60 message in varchar2 default null,
61 i_direct in varchar2 default null);
62
63 --
64 -- Viewer
65 -- Validate user from Login page, then show worklist.
66 -- IN
67 -- user_id - user name
68 -- password - user password
69 -- NOTE
70 -- This page is only used to enable access when no external security
71 -- is installed. Normally users are authenticated by the chosen
72 -- security system (IC, WebServer native, etc) and can then access
73 -- the Workflow Notification pages (Worklist, Detail) directly.
74 --
75 --
76 -- CTILLEY Added i_direct arg - bug 1838410
77 --
78
79 procedure Viewer(
80 user_id in varchar2 default null,
81 password in varchar2 default null,
82 i_direct in varchar2 default null);
83
84 --
85 -- Find
86 -- Filter page to find notifications of user
87 --
88 procedure Find ;
89
90
91 --
92 -- WorkList
93 -- Construct the worklist (summary page) for user.
94 -- IN
95 -- orderkey - Key to order by (default PRIORITY)
96 -- Valid values are PRIORITY, MESSAGE_TYPE, SUBJECT, BEGIN_DATE,
97 -- DUE_DATE, END_DATE, STATUS.
98 -- status - Status to query (default OPEN)
99 -- Valid values are OPEN, CLOSED, CANCELED, ERROR.
100 -- If null query any status.
101 -- user - User to query notifications for. If null query current user.
102 -- Note: only WF_ADMIN_ROLE can query other than the current user.
103 -- fromlogin - flag to indicate if coming from apps login screen,
104 -- - if non-zero, force an exception
105 -- - so that cookie value is not being used
106 --
107 procedure WorkList(
108 nid in number default null,
109 orderkey in varchar2 default null,
110 status in varchar2 default null,
111 owner in varchar2 default null,
112 display_owner in varchar2 default null,
113 user in varchar2 default null,
114 display_user in varchar2 default null,
115 fromuser in varchar2 default null,
116 display_fromuser in varchar2 default null,
117 ittype in varchar2 default null,
118 msubject in varchar2 default null,
119 beg_sent in varchar2 default null,
120 end_sent in varchar2 default null,
121 beg_due in varchar2 default null,
122 end_due in varchar2 default null,
123 priority in varchar2 default null,
124 delegatedto in varchar2 default null,
125 display_delegatedto in varchar2 default null,
126 delegated_by_me in number default 0,
127 resetcookie in number default 0 ,
128 clearbanner in varchar2 default 'FALSE',
129 fromfindscreen in number default 0,
130 fromlogin in number default 0);
131
132 --
133 -- DetailFrame
134 -- generate Detail notification screen
135 -- IN
136 -- nid - notification id
137 -- nkey - notification access key (for mailed html only)
138 -- agent - web agent (OBSOLETE)
139 -- showforms - show form attributes
140 --
141 procedure DetailFrame(
142 nid in varchar2 default null,
143 nkey in varchar2 default null,
144 agent in varchar2 default null,
145 showforms in varchar2 default null);
146
147 -- ResponseFrame
148 -- generate response frame contents
149 -- IN
150 -- nid - notification id
151 -- nkey - notification access key (for mailed html only)
152 -- agent - web agent (OBSOLETE)
153 -- showforms - show form attributes
154 procedure ResponseFrame(
155 nid in varchar2 default null,
156 nkey in varchar2 default null,
157 agent in varchar2 default null,
158 showforms in varchar2 default null);
159
160 -- ForwardFrame
161 -- generate forward frame contents
162 -- IN
163 -- nid - notification id
164 -- nkey - notification access key (for mailed html only)
165 procedure ForwardFrame(
166 nid in varchar2 default null,
167 nkey in varchar2 default null);
168
169 --
170 -- AttributeInfo
171 -- Generate page with details about a response attribute
172 -- IN
173 -- nid - notification id
174 -- name - attribute name
175 --
176 procedure AttributeInfo(
177 nid in varchar2,
178 name in varchar2);
179
180 -- Detail (PROCEDURE)
181 -- generate detail screen
182 -- IN
183 -- notification id
184 -- NOTE
185 -- Detail is overloaded.
186 -- This version is used by the Web notifications page.
187 procedure Detail(
188 nid in varchar2 default null);
189
190 -- Detail (FUNCTION)
191 -- return standalone detail screen text
192 -- IN
193 -- nid - notification id
194 -- nkey - notification key
195 -- agent - web agent URL root
196 -- NOTE
197 -- Detail is overloaded.
198 -- This produces the version used by the mailer.
199 function Detail(
200 nid in number,
201 nkey in varchar2,
202 agent in varchar2)
203 return varchar2;
204
205 -- Detail2 (FUNCTION)
206 -- return standalone detail screen text
207 -- IN
208 -- nid - notification id
209 -- nkey - notification key
210 -- agent - web agent URL root
211 -- NOTE
212 -- Detail is overloaded.
213 -- This produces the version used by the mailer.
214 function Detail2(
215 nid in number,
216 nkey in varchar2,
217 agent in varchar2)
218 return varchar2;
219
220 -- DetailLink
221 -- display standalone detail screen text
222 -- IN
223 -- nid - notification id
224 -- nkey - notification key
225 -- agent - web agent URL root
226 -- NOTE
227 -- Detaillink called function Detail above.
228 -- This produces the version used by the mailer.
229 procedure DetailLink(
230 nid in number,
231 nkey in varchar2,
232 agent in varchar2);
233
234
235 -- SubmitForward
236 -- Submit notification forward
237 -- IN
238 -- h_nid - notification id
239 -- forwardee - new recipient field
240 -- display_forwardee - display name for the new recipient
241 -- comments - forwarding comments field
242 -- fmode - reassign mode can be:
243 -- transfer - transferring responsibility
244 -- delegate - delegate responsibility
245 -- submit - submit forward button
246 -- cancel - cancel forward button
247 -- nkey - access key for mailed html
248 procedure SubmitForward(
249 h_nid in varchar2,
250 forwardee in varchar2,
251 display_forwardee in varchar2,
252 comments in varchar2 default null,
253 fmode in varchar2 default null,
254 submit in varchar2 default null,
255 cancel in varchar2 default null,
256 nkey in varchar2 default null);
257
258 -- SubmitResponse
259 -- Submit notification response
260 -- IN
261 -- h_nid - notification id
262 -- h_fnames - array of field names
263 -- h_fvalues - array of field values
264 -- h_fdocnames - array of documentnames
265 -- h_counter - number of fields passed in fnames and fvalues
266 -- submit - submit response button
267 -- forward - forward button
268 -- nkey - access key for mailed html
269 procedure SubmitResponse(
270 h_nid in varchar2,
271 h_fnames in Name_Array,
272 h_fvalues in Value_Array,
273 h_fdocnames in Value_Array,
274 h_counter in varchar2,
275 submit in varchar2 default null,
276 forward in varchar2 default null,
277 nkey in varchar2 default null);
278
279 -- SubmitSelectedResponse
280 -- Submit selected notification response
281 -- IN
282 -- nids - notification ids
283 -- close - close response button
284 -- forward - forward button
285 -- showto - display the TO column
286 -- nkey - access key for mailed html
287 procedure SubmitSelectedResponse(
288 nids in Name_Array,
289 close in varchar2 default null,
290 forward in varchar2 default null,
291 showto in varchar2 default 'F',
292 nkey in varchar2 default null);
293
294 -- ForwardNids
295 -- Forward (Delegating) for each notification ids
296 -- IN
297 -- h_nids - hidden notification ids
298 -- forwardee - forwardee role specified
299 -- display_forwardee - display name for the new recipient
300 -- comments - comments included
301 -- fmode - reassign mode can be:
302 -- transfer - transferring responsibility
303 -- delegate - delegate responsibility
304 -- submit - submit the reassign request
305 -- cancel - cancel button
306 procedure ForwardNids(
307 h_nids in Name_Array,
308 forwardee in varchar2,
309 display_forwardee in varchar2,
310 comments in varchar2 default null,
311 fmode in varchar2 default null,
312 submit in varchar2 default null,
313 cancel in varchar2 default null,
314 nkey in varchar2 default null);
315
316 -- GotoURL
317 -- GotoURL let you open an url in a specify place. This is very useful
318 -- when you need to go from a child frame to the full browser window,
319 -- for instnace.
320 -- IN
321 -- url - Fully qualified universal resouce location
322 -- location - Where you want to open it. Samples of values are
323 -- _blank - unnamed window
324 -- _self - the current frame
325 -- _parent - the parent frame of the current one
326 -- _top - the full Web browser window
327 -- "myWin" - name of the new window
328 --
329 procedure GotoURL(
330 url in varchar2,
331 location in varchar2 default '_self',
332 attributes in varchar2 default NULL
333 );
334
335
336 /*===========================================================================
337 PROCEDURE NAME: create_help_function
338
339 DESCRIPTION:
340 Create the java script function to support the Help
341 Icon from the header
342
343 PARAMETERS:
344
345 p_help_file IN Name of .htl help file you would like to display in
346 help window.
347
348 ============================================================================*/
349 procedure create_help_function (p_help_file IN VARCHAR2);
350
351
352 /*===========================================================================
353 FUNCTION NAME: conv_special_url_chars
354
355 DESCRIPTION:
356 Convert all of the ASCII special characters that are
357 disallowed as a part of a URL. The encoding requires
358 that we convert the special characters to HEX for
359 any characters in a URL string that is built
360 manually outside a form get/post.
361 This API now also converts multibyte characters
362 into their HEX equivalent.
363
364 PARAMETERS:
365
366 p_url_token IN Token that will be converted
367
368 NOTE:
369 This api allows double-encoding.
370 ============================================================================*/
371 FUNCTION conv_special_url_chars (p_url_token IN VARCHAR2) RETURN VARCHAR2;
372
373 /*===========================================================================
374 FUNCTION NAME: encode_url (PRIVATE)
375
376 DESCRIPTION:
377 Convert all of the ASCII special characters that are
378 disallowed as a part of a URL. The encoding requires
379 that we convert the special characters to HEX for
380 any characters in a URL string that is built
381 manually outside a form get/post.
382 This API now also converts multibyte characters
383 into their HEX equivalent.
384
385 URL encoding was documented in RFC 1738.
386 We have put some "unsafe" characters in the encode
387 list for purpose of encoding them.
388
389 NOTE: This private api does not allow double-encoding.
390 ============================================================================*/
391 FUNCTION encode_url (p_url_token IN VARCHAR2) RETURN VARCHAR2;
392
393 --
394 -- User_LOV
395 -- Create the data for the User List of Values
396 --
397 procedure User_LOV (p_titles_only IN VARCHAR2 DEFAULT NULL,
398 p_find_criteria IN VARCHAR2 DEFAULT NULL);
399
400 --
401 -- create_reg_button
402 -- Create a button that is an anchor.
403 --
404 procedure create_reg_button (
405 when_pressed_url IN VARCHAR2,
406 onmouseover IN VARCHAR2,
407 icon_top IN VARCHAR2,
408 icon_name IN VARCHAR2,
409 show_text IN VARCHAR2);
410
411 -- show_plsql_doc
412 -- Show the content of a plsql document in a browser window
413 -- Called from the related documents function
414 procedure show_plsql_doc (
415 nid in number,
416 aname in varchar2,
417 nkey in varchar2 default null);
418
419 -- base_url
420 -- Get the base url for the current browser where you have launched the
421 -- login for Workflow
422 function base_url (get_from_resources BOOLEAN default FALSE) return varchar2;
423
424 --
425 -- wf_user_val
426 -- Create the lov content for our user lov. This function
427 -- is called by the generic lov function
428 -- IN
429 -- RETURNS
430 --
431 procedure wf_user_val (
432 p_mode in varchar2,
433 p_lov_name in varchar2,
434 p_start_row in number,
435 p_max_rows in number,
436 p_hidden_value in out nocopy varchar2,
437 p_display_value in out nocopy varchar2,
438 p_result out nocopy number);
439
440 -- replace_onMouseOver_quotes
441 -- The replace_quotes function takes a string as an in parameter, and
442 -- returns a string with all single and double quotes preceeded with a \.
443 -- This function is designed to escape out all quotes in a phrase that is
444 -- used with javascript. The \ character is the escape character for
445 -- javascript. If a string with quotes already preceeded by the \ escape
446 -- character is passed to the replace_quotes function, the return string
447 -- will only have one \ infront of each quote.
448 function replace_onMouseOver_quotes(p_string in varchar2) return varchar2;
449
450 -- validate_display_name
451 -- Validates that a display name is both unique and valid. If the display
452 -- name is passed in then it will set the internal user name.
453 procedure validate_display_name (
454 p_display_name in varchar2,
455 p_user_name in out nocopy varchar2);
456
457 -- LongDesc
458 -- Displays an html page with the token message. This is called from
459 -- frames for the LONGDESC attribute.
460 procedure LongDesc (
461 p_token in varchar2);
462
463 end WFA_HTML;