DBA Data[Home] [Help]

PACKAGE: APPS.JTF_EC_UTIL

Source


1 PACKAGE JTF_EC_UTIL AUTHID CURRENT_USER as
2 /* $Header: jtfvecus.pls 120.1 2005/07/02 01:39:45 appldev ship $ */
3 /*#
4  * This is the private interface to the JTF Escalation Management.
5  * This utility Interface is used for all validation and conversion
6  *
7  * @rep:scope private
8  * @rep:product JTF
9  * @rep:lifecycle active
10  * @rep:displayname Escalation Management
11  * @rep:compatibility S
12  * @rep:category BUSINESS_ENTITY JTA_ESCALATION
13 */
14 
15 -- Start of comments
16 --	API name 	: JTF_EC_UTIL
17 --	Type		: Private.
18 --	Function	: Escalation utility package
19 --	Pre-reqs	: None.
20 --	Parameters	:
21 --      name                 direction  type     required?
22 --      ----                 ---------  ----     ---------
23 --      p_api_version         	IN	NUMBER	  required
24 --      p_init_msg_list       	IN	VARCHAR2  optional  DEFAULT fnd_api.g_false
25 --      p_commit              	IN	VARCHAR2  optional  DEFAULT fnd_api.g_false
26 --      x_return_status       	OUT     VARCHAR2  required
27 --      x_msg_count           	OUT     NUMBER	  required
28 --      x_msg_data            	OUT     VARCHAR2  required
29 --	x_wf_process_id		OUT	NUMBER    required
30 --
31 --	Version	:	1.0
32 --
33 ---------------------------------------------------------------------------------
34 --
35 -- End of comments
36 
37 G_PKG_NAME   		CONSTANT VARCHAR2(30) := 'JTF_EC_UTIL';
38 
39 
40 /*#
41 * Validates a Owner
42 *
43 * @param p_owner_id the owner id
44 * @param p_owner_type the owner type
45 * @param x_return_status the parameter that returns the result of all the operations performed.
46 * by the API and must have one of the following values:
47 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
48 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
49 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
50 * @rep:scope private
51 * @rep:lifecycle active
52 * @rep:displayname Validate Owner
53 * @rep:compatibility S
54 */
55 PROCEDURE Validate_Owner(p_owner_id IN NUMBER,
56 			 p_owner_type IN VARCHAR2,
57 			 x_return_status OUT NOCOPY  VARCHAR2);
58 
59 /*#
60 * Validates a Requester
61 *
62 * @param p_escalation_id the escalation id
63 * @param x_return_status the parameter that returns the result of all the operations performed.
64 * by the API and must have one of the following values:
65 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
66 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
67 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
68 * @rep:scope private
69 * @rep:lifecycle active
70 * @rep:displayname Validate Requester
71 * @rep:compatibility S
72 */
73 PROCEDURE Validate_Requester(p_escalation_id IN	NUMBER,
74 			     x_return_status OUT NOCOPY  VARCHAR2);
75 
76 /*#
77 * Adds the invalid argument message
78 *
79 * @param p_token_api_name the API name for which the message token is passed
80 * @param p_token_value the message for the token
81 * @param p_token_parameter the token name
82 * @rep:scope private
83 * @rep:lifecycle active
84 * @rep:displayname Add Invalid Argument Message
85 * @rep:compatibility S
86 */
87 PROCEDURE Add_Invalid_Argument_Msg
88 ( p_token_api_name	IN VARCHAR2,
89   p_token_value		IN VARCHAR2,
90   p_token_parameter	IN VARCHAR2
91 );
92 
93 
94 /*#
95 * Adds message for the ignored parameter
96 *
97 * @param p_token_api_name the API name for which the message token is passed
98 * @param p_token_ignored_param the ignored token name
99 * @rep:scope private
100 * @rep:lifecycle active
101 * @rep:displayname Add Ignored Parameter Message
102 * @rep:compatibility S
103 */
104 PROCEDURE Add_Param_Ignored_Msg
105 ( p_token_api_name		VARCHAR2,
106   p_token_ignored_param		VARCHAR2
107 );
108 
109 ----------------------------------------------------------------------------------------
110 -- Add missing parameter procedure
111 ----------------------------------------------------------------------------------------
112 
113 /*#
114 * Adds missing parameter
115 *
116 * @param p_token_api_name the API name for which the message token is passed
117 * @param p_token_miss_param the missing parameter
118 * @rep:scope private
119 * @rep:lifecycle active
120 * @rep:displayname Add Missing Parameter
121 * @rep:compatibility S
122 */
123 PROCEDURE Add_Missing_Param_Msg
124 ( p_token_api_name		VARCHAR2,
125   p_token_miss_param		VARCHAR2
126 );
127 
128 /*#
129 * Validate the Escalation Status
130 *
131 * @param p_esc_status_id the escalation status id
132 * @param p_esc_status_name the escalation status name
133 * @param x_return_status the parameter that returns the result of all the operations performed.
134 * by the API and must have one of the following values:
135 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
136 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
137 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
138 * @param x_esc_status_id the escalation status id
139 * @rep:scope private
140 * @rep:lifecycle active
141 * @rep:displayname Validate Escalation Status
142 * @rep:compatibility S
143 */
144 PROCEDURE Validate_Esc_Status (
145         p_esc_status_id          IN       NUMBER,
146         p_esc_status_name        IN       VARCHAR2,
147         x_return_status          OUT NOCOPY       VARCHAR2,
148         x_esc_status_id         OUT NOCOPY       NUMBER
149     );
150 
151 
152 /*#
153 * Validate Lookup
154 *
155 * @param p_lookup_type the lookup type
156 * @param p_lookup_code the lookup code
157 * @return the boolean value of validation on Lookup
158 * @rep:scope private
159 * @rep:lifecycle active
160 * @rep:displayname Validate Lookup
161 * @rep:compatibility S
162 */
163 FUNCTION Validate_Lookup(p_lookup_type        IN VARCHAR2 ,
164         		 p_lookup_code        IN VARCHAR2
165         		 ) RETURN BOOLEAN;
166 
167 /*#
168 * Checks if escalated
169 *
170 * @param p_object_type_code the object type code
171 * @param p_object_id the object id
172 * @param p_object_name the object name
173 * @param x_task_ref_id the parameter that returns task reference id
174 * @return the boolean value if escalated
175 * @rep:scope private
176 * @rep:lifecycle active
177 * @rep:displayname Check If Escalated
178 * @rep:compatibility S
179 */
180 FUNCTION  Check_If_Escalated (p_object_type_code IN VARCHAR2,
181                               p_object_id IN NUMBER,
182 			      p_object_name IN VARCHAR2,
183 			      x_task_ref_id OUT NOCOPY  NUMBER) RETURN BOOLEAN;
184 
185 /*#
186 * Checks if the reference is duplicated
187 *
188 * @param p_object_type_code the object type code
189 * @param p_object_id the object id
190 * @param p_object_name the object name
191 * @param p_reference_code the reference code
192 * @param p_escalation_id the escalation id
193 * @return the boolean value in context of reference is duplicated
194 * @rep:scope private
195 * @rep:lifecycle active
196 * @rep:displayname Check Duplicate Reference
197 * @rep:compatibility S
198 */
199 FUNCTION  Reference_Duplicated (p_object_type_code IN VARCHAR2,
200                                p_object_id IN NUMBER,
201 			       p_object_name IN VARCHAR2,
202 			       p_reference_code IN VARCHAR2,
203 			       p_escalation_id IN NUMBER) RETURN BOOLEAN;
204 
205 
206 /*#
207 * Checks if the contact is duplicated
208 *
209 * @param p_contact_id the contact id
210 * @param p_contact_type_code the contact type code
211 * @param p_escalation_id the escalation id
212 * @return the boolean value in context of contact is duplicated
213 * @rep:scope private
214 * @rep:lifecycle active
215 * @rep:displayname Check Duplicate Contact
216 * @rep:compatibility S
217 */
218 FUNCTION Contact_Duplicated(p_contact_id IN NUMBER,
219 			    p_contact_type_code IN VARCHAR2,
220 			    p_escalation_id IN NUMBER) RETURN BOOLEAN;
221 
222 /*#
223 * Validates the descriptive flex field items
224 *
225 * @param p_api_name the API name
226 * @param p_application_short_name the application short name
227 * @param p_desc_flex_name the name of the flex fields
228 * @param p_desc_segment1 the value of the flex field attribute1
229 * @param p_desc_segment2 the value of the flex field attribute2
230 * @param p_desc_segment3 the value of the flex field attribute3
231 * @param p_desc_segment4 the value of the flex field attribute4
232 * @param p_desc_segment5 the value of the flex field attribute5
233 * @param p_desc_segment6 the value of the flex field attribute6
234 * @param p_desc_segment7 the value of the flex field attribute7
235 * @param p_desc_segment8 the value of the flex field attribute8
236 * @param p_desc_segment9 the value of the flex field attribute9
237 * @param p_desc_segment10 the value of the flex field attribute10
238 * @param p_desc_segment11 the value of the flex field attribute11
239 * @param p_desc_segment12 the value of the flex field attribute12
240 * @param p_desc_segment13 the value of the flex field attribute13
241 * @param p_desc_segment14 the value of the flex field attribute14
242 * @param p_desc_segment15 the value of the flex field attribute15
243 * @param p_desc_context the value of the flex field attribute category
244 * @param p_resp_appl_id the responsibility application id
245 * @param p_resp_id the responsibility id
246 * @param x_return_status the parameter that returns the result of all the operations performed.
247 * by the API and must have one of the following values:
248 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
249 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
250 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
251 * @rep:scope private
252 * @rep:lifecycle active
253 * @rep:displayname Validate Descriptive FlexFields
254 * @rep:compatibility S
255 */
256 PROCEDURE Validate_Desc_Flex
257 ( p_api_name			IN	VARCHAR2,
258   p_application_short_name	IN	VARCHAR2,
259   p_desc_flex_name		IN	VARCHAR2,
260   p_desc_segment1		IN	VARCHAR2,
261   p_desc_segment2		IN	VARCHAR2,
262   p_desc_segment3		IN	VARCHAR2,
263   p_desc_segment4		IN	VARCHAR2,
264   p_desc_segment5		IN	VARCHAR2,
265   p_desc_segment6		IN	VARCHAR2,
266   p_desc_segment7		IN	VARCHAR2,
267   p_desc_segment8		IN	VARCHAR2,
268   p_desc_segment9		IN	VARCHAR2,
269   p_desc_segment10		IN	VARCHAR2,
270   p_desc_segment11		IN	VARCHAR2,
271   p_desc_segment12		IN	VARCHAR2,
272   p_desc_segment13		IN	VARCHAR2,
273   p_desc_segment14		IN	VARCHAR2,
274   p_desc_segment15		IN	VARCHAR2,
275   p_desc_context		IN	VARCHAR2,
276   p_resp_appl_id		IN	NUMBER		:= NULL,
277   p_resp_id			IN	NUMBER		:= NULL,
278   x_return_status		OUT NOCOPY 	VARCHAR2
279 );
280 
281 /*#
282 * Validate the Escalation document
283 *
284 * @param p_esc_id the escalation id
285 * @param p_esc_number the escalation number
286 * @param x_esc_id the parameter that returns the escalation id
287 * @param x_return_status the parameter that returns the result of all the operations performed.
288 * by the API and must have one of the following values:
289 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
290 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
291 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
292 * @rep:scope private
293 * @rep:lifecycle active
294 * @rep:displayname Validate Escalation Document
295 * @rep:compatibility S
296 */
297 PROCEDURE Validate_Esc_Document(p_esc_id 	IN NUMBER,
298 				p_esc_number 	IN VARCHAR2,
299 				x_esc_id	OUT NOCOPY  NUMBER,
300 				x_return_status	OUT NOCOPY  VARCHAR2);
301 
302 
303 /*#
304 * Checks for the completed status of the escalation
305 *
306 * @param p_status_id the status id of the escalation
307 * @param p_esc_id the escalation id
308 * @param p_esc_level the escalation level
309 * @param x_closed_flag the parameter that returns value for the completed status
310 * @param x_return_status the parameter that returns the result of all the operations performed.
311 * by the API and must have one of the following values:
312 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
313 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
314 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
315 * @rep:scope private
316 * @rep:lifecycle active
317 * @rep:displayname Check Completed Status
318 * @rep:compatibility S
319 */
320 PROCEDURE Check_Completed_Status(p_status_id	IN 	NUMBER,
321 				 p_esc_id	IN	NUMBER,
322 				 p_esc_level	IN	VARCHAR2,
323 				 x_closed_flag	OUT NOCOPY 	VARCHAR2,
324 			     	 x_return_status	OUT NOCOPY 	VARCHAR2);
325 
326 /*#
327 * Converts a missed number
328 *
329 * @param p_number the number value
330 * @rep:scope private
331 * @rep:lifecycle active
332 * @rep:displayname Convert Missed Number
333 * @rep:compatibility S
334 */
335 PROCEDURE Conv_Miss_Num(p_number IN OUT NOCOPY  NUMBER);
336 
337 /*#
338 * Converts a missed date
339 *
340 * @param p_date the date value
341 * @rep:scope private
342 * @rep:lifecycle active
343 * @rep:displayname Convert Missed Date
344 * @rep:compatibility S
345 */
346 PROCEDURE Conv_Miss_Date(p_date IN OUT NOCOPY  DATE);
347 
348 /*#
349 * Converts a missed char
350 *
351 * @param p_char the date value
352 * @rep:scope private
353 * @rep:lifecycle active
354 * @rep:displayname Convert Missed Character
355 * @rep:compatibility S
356 */
357 PROCEDURE Conv_Miss_Char(p_char IN OUT NOCOPY  VARCHAR2);
358 
359 /*#
360 * Validates the Task Phone ID
361 *
362 * @param p_task_phone_id the task phone ID
363 * @param p_escalation_id the escalation ID
364 * @param x_return_status the parameter that returns the result of all the operations performed.
365 * by the API and must have one of the following values:
366 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
367 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
368 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
369 * @rep:scope private
370 * @rep:lifecycle active
371 * @rep:displayname Validate Task Phone ID
372 * @rep:compatibility S
373 */
374 PROCEDURE Validate_Task_Phone_Id(p_task_phone_id IN NUMBER,
375 		    	         p_escalation_id IN NUMBER,
376 		    	         x_return_status OUT NOCOPY  VARCHAR2);
377 
378 /*#
379 * Validates the Task Contact ID
380 *
381 * @param p_task_contact_id the task contact ID
382 * @param p_escalation_id the escalation ID
383 * @param x_return_status the parameter that returns the result of all the operations performed.
384 * by the API and must have one of the following values:
385 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
386 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
387 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
388 * @rep:scope private
389 * @rep:lifecycle active
390 * @rep:displayname Validate Task Contact ID
391 * @rep:compatibility S
392 */
393 PROCEDURE Validate_Task_Contact_Id(p_task_contact_id IN NUMBER,
394 		    	      	   p_escalation_id IN NUMBER,
395 		    	           x_return_status OUT NOCOPY  VARCHAR2);
396 
397 /*#
398 * Validates the Contact ID
399 *
400 * @param p_contact_id the contact ID
401 * @param p_contact_type_code the contact type code
402 * @param p_escalation_id the escalation ID
403 * @param x_task_contact_id the parameter that returns the task contact ID
404 * @param x_return_status the parameter that returns the result of all the operations performed.
405 * by the API and must have one of the following values:
406 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
410 * @rep:lifecycle active
407 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
408 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
409 * @rep:scope private
411 * @rep:displayname Validate Contact ID
412 * @rep:compatibility S
413 */
414 PROCEDURE Validate_Contact_Id( 	p_contact_id 		IN NUMBER,
415 				p_contact_type_code 	IN VARCHAR2,
416 		    	      	p_escalation_id 	IN NUMBER,
417 				x_task_contact_id	OUT NOCOPY  NUMBER,
418 				x_return_status 	OUT NOCOPY  VARCHAR2);
419 
420 /*#
421 * Validates the Task Reference ID
422 *
423 * @param p_task_reference_id the task reference ID
424 * @param p_escalation_id the escalation ID
425 * @param x_return_status the parameter that returns the result of all the operations performed.
426 * by the API and must have one of the following values:
427 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
428 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
429 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
430 * @rep:scope private
431 * @rep:lifecycle active
432 * @rep:displayname Validate Task Reference ID
433 * @rep:compatibility S
434 */
435 PROCEDURE Validate_Task_Reference_Id(p_task_reference_id IN NUMBER,
436 		    	      	     p_escalation_id IN NUMBER,
437 		    	             x_return_status OUT NOCOPY  VARCHAR2);
438 
439 /*#
440 * Validates the WHO column information
441 *
442 * @param p_api_name the API name
443 * @param p_user_id the user id
444 * @param p_login_id the login id
445 * @param x_return_status the parameter that returns the result of all the operations performed.
446 * by the API and must have one of the following values:
447 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
448 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
449 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
450 * @rep:scope private
451 * @rep:lifecycle active
452 * @rep:displayname Validate Who Information
453 * @rep:compatibility S
454 */
455 PROCEDURE Validate_Who_Info(	p_api_name	IN  	VARCHAR2,
456 				p_user_id	IN  	NUMBER,
457 				p_login_id	IN  	NUMBER,
458 				x_return_status	OUT NOCOPY   	VARCHAR2
459   				);
460 
461 /*#
462 * Validates the Note ID
463 *
464 * @param p_note_id the note id
465 * @param p_escalation_id the escalation id
466 * @param x_return_status the parameter that returns the result of all the operations performed.
467 * by the API and must have one of the following values:
468 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
469 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
470 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
471 * @rep:scope private
472 * @rep:lifecycle active
473 * @rep:displayname Validate Note ID
474 * @rep:compatibility S
475 */
476 PROCEDURE Validate_Note_Id(p_note_id IN NUMBER,
477 		    	   p_escalation_id IN NUMBER,
478 		    	   x_return_status OUT NOCOPY  VARCHAR2);
479 
480 /*#
481 * Gets the requester name
482 *
483 * @param p_escalation_id the escalation id
484 * by the API and must have one of the following values:
485 *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
486 *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
487 *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
488 * @return the requester name
489 * @rep:scope private
490 * @rep:lifecycle active
491 * @rep:displayname Get Requester Name
492 * @rep:compatibility S
493 */
494 FUNCTION Get_Requester_Name(p_escalation_id in NUMBER) RETURN VARCHAR2;
495 
496 END JTF_EC_UTIL;