DBA Data[Home] [Help]

PACKAGE: APPS.CS_TP_TEMPLATES_PVT

Source


1 package CS_TP_TEMPLATES_PVT AUTHID CURRENT_USER as
2 /* $Header: cstptmms.pls 115.21 2003/02/14 04:29:09 wma noship $ */
3 
4 -- *****************************************************************************
5 -- Start of Comments
6 --
7 --   Record: Template
8 --
9 --
10 --   mTemplateID	        NUMBER
11 --   mTemplateName              VARCHAR2(1000)
12 --   mStartDate		        VARCHAR2(120)
13 --   mEndDate			VARCHAR2(120)
14 --   mDefaultFlag		VARCHAR2(60)
15 --   mLast_Updated_Date		VARCHAR2(120)
16 
17 --  Newly added
18 --  mUniQuestionNoteFlag, mUniQuestionNoteType
19 -- End of Comments
20 
21 TYPE Template is RECORD (
22      mTemplateID	        NUMBER:=FND_API.G_MISS_NUM,
23      mTemplateName              VARCHAR2(1000):=FND_API.G_MISS_CHAR,
24      mStartDate		        VARCHAR2(120):=FND_API.G_MISS_CHAR,
25      mEndDate			VARCHAR2(120):=FND_API.G_MISS_CHAR,
26      mDefaultFlag		VARCHAR2(1):=FND_API.G_FALSE,
27      mShortCode			VARCHAR2(600):=FND_API.G_MISS_CHAR,
28      mLast_Updated_Date		VARCHAR2(120):=FND_API.G_MISS_CHAR,
29 	mUniQuestionNoteFlag     VARCHAR2(1) := FND_API.G_MISS_CHAR,
30 	mUniQuestionNoteType     VARCHAR2(30) := FND_API.G_MISS_CHAR
31 );
32 
33 -- *****************************************************************************
34 -- Start of Comments
35 --
36 --   Table:  Binary Indexed Table of Template
37 --
38 -- End of Comments
39 
40 TYPE Template_List is TABLE OF Template
41 		INDEX BY BINARY_INTEGER;
42 
43 
44 
45 -- *****************************************************************************
46 -- Start of Comments
47 --
48 --   Record: Template_Attribute
49 --
50 --
51 --   mAttributeID	        NUMBER
52 --   mAttributeName             VARCHAR2(1000)
53 --   mStartThreshold		NUMBER
54 --   mEndThreshold		NUMBER
55 --   mJTF_OBJECT_CODE		VARCHAR2(200)
56 --   mOther_ID                  NUMBER
57 --   mLast_Updated_Date		VARCHAR2(120)
58 
59 -- End of Comments
60 
61 TYPE Template_Attribute is RECORD (
62      mAttributeID	        NUMBER :=FND_API.G_MISS_NUM,
63      mAttributeName             VARCHAR2(1000):=FND_API.G_MISS_CHAR,
64      mStartThreshold		NUMBER:=FND_API.G_MISS_NUM,
65      mEndThreshold		NUMBER:=FND_API.G_MISS_NUM,
66      mJTF_OBJECT_CODE		VARCHAR2(200):=FND_API.G_MISS_CHAR,
67      mOther_ID                  NUMBER:=FND_API.G_MISS_NUM,
68      mDefaultFlag		VARCHAR2(200):=FND_API.G_FALSE,
69      mLast_Updated_Date		VARCHAR2(120):=FND_API.G_MISS_CHAR
70 );
71 
72 -- *****************************************************************************
73 -- Start of Comments
74 --
75 --   Table:  Binary Indexed Table of Template Attribute
76 --
77 
78 -- End of Comments
79 
80 TYPE Template_Attribute_List is TABLE OF Template_Attribute
81 		INDEX BY BINARY_INTEGER;
82 
83 -- *****************************************************************************
84 -- Start of Comments
85 --
86 --   Record: Template_Link
87 --
88 --
89 --   mLinkID	        	NUMBER
90 --   mLinkName             	VARCHAR2(1000)
91 --   mLinkDesc 			VARCHAR2(1000)
92 --   mJTF_OBJECT_CODE	        VARCHAR2(200)
93 --   mOther_ID                  NUMBER
94 --   mLast_Updated_Date		VARCHAR2(120)
95 
96 -- End of Comments
97 
98 TYPE Template_Link is RECORD (
99      mLinkID	        	NUMBER :=FND_API.G_MISS_NUM,
100      mLinkName             	VARCHAR2(1000):=FND_API.G_MISS_CHAR,
101      mLinkDesc 			VARCHAR2(1000):=FND_API.G_MISS_CHAR,
102      mJTF_OBJECT_CODE		VARCHAR2(200):=FND_API.G_MISS_CHAR,
103      mOther_ID                  NUMBER:=FND_API.G_MISS_NUM,
104      lookup_Code            VARCHAR2(30):= FND_API.G_MISS_CHAR,
105      lookup_Type            VARCHAR2(30):=FND_API.G_MISS_CHAR,
106      mLast_Updated_Date		VARCHAR2(120):=FND_API.G_MISS_CHAR
107 );
108 
109 -- *****************************************************************************
110 -- Start of Comments
111 --
112 --   Table:  Binary Indexed Table of Template Link
113 --
114 -- End of Comments
115 
116 TYPE Template_Link_List is TABLE OF Template_Link
117 		INDEX BY BINARY_INTEGER;
118 
119 -- *****************************************************************************
120 -- Start of Comments
121 --
122 --   Record: ID_NAME_PAIR
123 --   mOBJECT_CODE        	VARCHAR2(1000)
124 --   mName              	VARCHAR2(1000)
125 -- End of Comments
126 -- *****************************************************************************
127 TYPE ID_NAME_PAIR is RECORD (
128      mOBJECT_CODE			VARCHAR2(1000):=FND_API.G_MISS_CHAR,
129      mName			VARCHAR2(1000):=FND_API.G_MISS_CHAR);
130 
131 
132 -- *****************************************************************************
133 -- Start of Comments
134 --
135 --   Table of ID_NAME_PAIR index by binary integer
136 -- End of Comments
137 TYPE ID_NAME_PAIRS  is TABLE OF ID_NAME_PAIR
138 		INDEX BY BINARY_INTEGER;
139 
140 -- *****************************************************************************
141 -- Start of Comments
142 --
143 --   Record: OBJECT_OTHER_ID_PAIR
144 --   mOTHER_ID		        	NUMBER
145 --   mOBJECT_CODE   	           	VARCHAR2(1000)
146 -- End of Comments
147 -- *****************************************************************************
148 TYPE  OBJECT_OTHER_ID_PAIR is RECORD (
149      mOTHER_ID		        	NUMBER,
150      mLOOKUP_CODE               VARCHAR2(30),
151      mOBJECT_CODE   	           	VARCHAR2(1000)
152 );
153 
154 -- *****************************************************************************
155 -- Start of Comments
156 --
157 --   Table of OBJECT_OTHER_ID_PAIR  index by binary integer
158 -- End of Comments
159 TYPE OBJECT_OTHER_ID_PAIRS  is TABLE OF OBJECT_OTHER_ID_PAIR
160 		INDEX BY BINARY_INTEGER;
161 
162 
163 -- *****************************************************************************
164 -- Start of Comments
165 --
166 --   Constant Integer
167 --        g_attr_max_threshold
168 --        g_attr_min_threshold
169 
170 --	 These two constants define the maxmimum and minimum threshold values for the threshold values in the template attribute.  These two values are used in the threshold values validation.
171 
172 --   Display Order Constants are used to dictate the  order of the list of templates/questions queried
173 --        ALPHABATICAL
174 --        REVERSE_ALPHABATICAL
175 --        NORMAL
176 --        CRONOLOGICAL
177 --        REVERSE_CRONOLOGICAL
178 -- End of Comments
179           g_attr_max_threshold	    CONSTANT      NUMBER:=100;
180           g_attr_min_threshold       CONSTANT      NUMBER:=0;
181           ALPHABATICAL          CONSTANT       VARCHAR(60):='ALPHABATICAL';
182           REVERSE_ALPHABATICAL       CONSTANT   VARCHAR(60):='REVERSE_ALPHABATICAL';
183           NORMAL              CONSTANT             VARCHAR(60):='NORMAL';
184           CRONOLOGICAL        CONSTANT              VARCHAR(60):='CRONOLOGICAL';
185           REVERSE_CRONOLOGICAL        CONSTANT              VARCHAR(60):='REVERSE_CRONOLOGICAL';
186 
187 --   Constant G_JTF_LINK, G_JTF_ATTRIBUTE
188 --        G_JTF_LINK
189 --        G_JTF_ATTRIBUTE
190 
191 --	 These two constants define JTF_OBJECTS_TL, _B object function for the link and attribute
192 	  G_JTF_LINK         CONSTANT 		VARCHAR2(200) :='IBU_LINK';
193           G_JTF_ATTRIBUTE    CONSTANT		VARCHAR2(200) :='IBU_ATTRIBUTE';
194 
195           DEBUG       CONSTANT                VARCHAR2(100):=FND_API.G_TRUE;
196 -- *****************************************************************************
197 -- Start of Comments
198 --   This procedure Add_Template Add an additional template to the CS_TP_Templates_B Table
199 -- The user needs to pass in a template record which holds the template attribu
200 --tes.  User can leave the template id and last_updated_date field  in the temp
201 --late record blank.  However, user needs to pass in the rest of the fields in
202 --the template record.  In addition, the mEndDate must be later than mStartDate
203 --
204 -- @param	P_One_Template    required
205 -- @param	p_api_version_number   required
206 -- @param       p_commit
207 -- @param	p_init_msg_list
208 
209 -- @return	X_Template_ID
210 --   	 	X_Msg_Count
211 --              X_Msg_Data
212 --  	        X_Return_Status
213 
214 -- End of Comments
215 
216 procedure Add_Template  (
217 	p_api_version_number     IN   NUMBER,
218 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
219 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
220 	P_One_Template  IN 	Template,
221         X_Msg_Count	OUT NOCOPY     NUMBER,
222         X_Msg_Data	OUT NOCOPY     VARCHAR2,
223   	X_Return_Status	OUT NOCOPY     VARCHAR2,
224 	X_Template_ID	OUT NOCOPY     NUMBER);
225 
226 -- *****************************************************************************
227 -- Start of Comments
228 --
229 -- Delete Template will delete the template with the passed in template id in the CS_TP_Templates_B and CS_TP_Templates_TL table with the passed in P_Template_ID
230 --
231 -- An exception will be raised if the template with passed in templated id cannot be found
232 -- @param	P_Template_ID          required
233 -- @param	p_api_version_number   required
234 -- @param       p_commit
235 -- @param	p_init_msg_list
236 -- @return	X_Msg_Count
237 --              X_Msg_Data
238 --  	        X_Return_Status
239 --
240 -- End of Comments
241 procedure Delete_Template (
242 	p_api_version_number     IN   NUMBER,
243 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
244 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
245 	P_Template_ID 		IN NUMBER,
246  	X_Msg_Count   OUT NOCOPY NUMBER,
247  	X_Msg_Data		OUT NOCOPY VARCHAR2,
248  	X_Return_Status		OUT NOCOPY VARCHAR2
249 	);
250 -- *****************************************************************************
251 -- Start of Comments
252 --
253 -- Update Template will update the template with a specific template id  in the CS_TP_Templates_B and CS_TP_Templates_TL table with the new template attributes
254 -- All fields inside the template are required
255 -- An exception is raised if template with template id cannot be found
256 --Same validation are performed for Update_Template as Add_Template
257 -- @param	P_One_Template   required
258 --  @param	p_api_version_number   required
259 -- @param       p_commit
260 -- @param	p_init_msg_list
261 
262 -- @return	X_Msg_Count
263 --              X_Msg_Data
264 --  	        X_Return_Status
265 --
266 -- End of Comments
267 
268 procedure Update_Template (
269 	p_api_version_number     IN   NUMBER,
270 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
271 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
272 	P_One_Template  IN 	Template,
273         X_Msg_Count	OUT NOCOPY     NUMBER,
274         X_Msg_Data	OUT NOCOPY     VARCHAR2,
275   	X_Return_Status	OUT NOCOPY     VARCHAR2);
276 
277 
278 -- *****************************************************************************
279 -- Start of Comments
280 -- Update_Template_Attributes will save the the template attributes, such as urgency/severity to the
281 -- CS_TP_Template_Attribute_Link table.
282 -- The Attribute record passed needs to include the Attribute Name, StartThresh
283 --old and EndThreshold, valid JTF_OBJECT_CODE and Other_ID which is the ID of t
284 --he object table.  EndThreshold needs to be greater than StartThreshold and bo
285 --th Thresholds need to be in the boundary of  g_attr_max_threshold and g_attr_
286 --min_threshold.  If attributeID is passed, the procedure assumes an update on
287 --the attribute record and the last updated date needs to be passed in as well.
288 
289 -- @param	P_Template_ID  required
290 -- @param	P_Template_Attributes  required
291 --  @param	p_api_version_number   required
292 -- @param       p_commit
293 -- @param	p_init_msg_list
294 
295 -- @return	X_Msg_Count
296 --              X_Msg_Data
297 --  	        X_Return_Status
298 -- End of Comments
299 
300 procedure Update_Template_Attributes  (
301 	p_api_version_number     IN   NUMBER,
302 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
303 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
304 	 P_Template_ID    IN  NUMBER,
305 	 P_Template_Attributes  IN     Template_Attribute_List,
306 	 X_Msg_Count      OUT NOCOPY NUMBER,
307  	 X_Msg_Data			OUT NOCOPY VARCHAR2,
308  	 X_Return_Status		OUT NOCOPY VARCHAR2
309 	);
310 -- *****************************************************************************
311 -- Start of Comments
312 --
313 --  Update_Template_Links  will insert and update template links to the CS_TP_TEMPLATE_LINKS  table.
314 --  User needs to pass in a valid template id.  For each Link record, a valid link name, JTF_OBJECT_CODE, and other_id  need to be passed.
315 --  If the Link ID is passed in, the procedure will update the row corresponding to the link id in the CS_TP_TEMPLATE_LINKS table
316 --  If the link id is not passed, the procedure will insert a new row
317 --  Any rows in the CS_TP_TEMPLATE_LINKS that not are in the P_Template_Links passed in are deleted.
318 --
319 -- @param	P_Template_ID  required
320 -- @param	P_Template_Links required
321 --  @param	p_api_version_number   required
322 -- @param       p_commit
323 -- @param	p_init_msg_list
324 -- @return	X_Msg_Count
325 --              X_Msg_Data
326 --  	        X_Return_Status
327 
328 -- End of Comments
329 procedure Update_Template_Links (
330 	p_api_version_number     IN   NUMBER,
331 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
332 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
333 	 P_Template_ID 	 	 IN NUMBER,
334 	  P_JTF_OBJECT_CODE	 IN VARCHAR2,
335 	 P_Template_Links  	 IN  Template_Link_List,
336     	 X_Msg_Count		 OUT NOCOPY NUMBER,
337  	 X_Msg_Data		 OUT NOCOPY VARCHAR2,
338  	 X_Return_Status	 OUT NOCOPY VARCHAR2
339 );
340 -- *****************************************************************************
344 --@param	P_Start_Template
341 -- Start of Comments
342 --
343 -- Show templates takes two numbers P_Start_Temlate and P_End_Template as the start number and end number of the template, the Display Order of the templates, and a template name to search with.  It will return a table of templates.
345 --@param	P_End_Template
346 --@param	P_Display_Order
347 --@param	P_Template_Name
348 -- @param	p_api_version_number   required
349 -- @param       p_commit
350 -- @param	p_init_msg_list
351 
352 -- @return	X_Msg_Count
353 --              X_Msg_Data
354 --  	        X_Return_Status
355 --		X_Template_List_To_Show
356 --		X_Total_Templates
357 --       	X_Retrieved_Template_Num
358 
359 -- End of Comments
360 
361 procedure Show_Templates  (
362 	p_api_version_number     IN   NUMBER,
363 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
364 	p_commit       IN VARCHAR2          := FND_API.G_FALSE,
365 	P_Template_Name 	IN VARCHAR2,
366 	P_Start_Template 	IN NUMBER,
367 	P_End_Template 		IN NUMBER,
368 	P_Display_Order 	IN VARCHAR2,
369  	X_Msg_Count   OUT NOCOPY NUMBER,
370  	X_Msg_Data		OUT NOCOPY VARCHAR2,
371  	X_Return_Status		OUT NOCOPY VARCHAR2,
372 	X_Template_List_To_Show OUT NOCOPY Template_List,
373         X_Total_Templates       OUT NOCOPY NUMBER,
374         X_Retrieved_Template_Num    OUT NOCOPY NUMBER );
375 
376 -- *****************************************************************************
377 -- Start of Comments
378 --
379 -- Show_Template returns a template record which takes a template id and returns a template record.
380 -- @param P_Template_ID  required
381 -- @param	p_api_version_number   required
382 -- @param       p_commit
383 -- @param	p_init_msg_list
384 
385 -- @return	X_Msg_Count
386 --              X_Msg_Data
387 --  	        X_Return_Status
388 --		X_Template_To_Show
389 -- End of Comments
390 
391 procedure Show_Template (
392 	p_api_version_number     IN   NUMBER,
393 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
394 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
395 	P_Template_ID   	IN NUMBER,
396    	X_Msg_Count   OUT NOCOPY NUMBER,
397   	X_Msg_Data		OUT NOCOPY VARCHAR2,
398   	X_Return_Status		OUT NOCOPY VARCHAR2,
399 	X_Template_To_Show 	OUT NOCOPY Template
400         );
401 
402 -- *****************************************************************************
403 -- Start of Comments
404 --
405 -- Show_Templates_With_Attr show the list of templates with a certain attribute id
406 --@param 	P_Other_ID  required
407 -- @param	p_api_version_number   required
408 -- @param       p_commit
409 -- @param	p_init_msg_list
410 
411 -- @return	X_Msg_Count
412 --              X_Msg_Data
413 --  	        X_Return_Status
414 --		X_Template_List
415 
416 -- End of Comments
417 
418 procedure Show_Templates_With_Link (
419 	p_api_version_number     IN   NUMBER,
420 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
421 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
422 	p_Object_Other_list	IN OBJECT_OTHER_ID_PAIRS,
423   	X_Msg_Count		OUT NOCOPY NUMBER,
424   	X_Msg_Data		OUT NOCOPY VARCHAR2,
425  	X_Return_Status		OUT NOCOPY VARCHAR2,
426 	X_Template_List 	OUT NOCOPY  Template_List);
427 
428 -- *****************************************************************************
429 -- Start of Comments
430 --
431 --	Show_Template_Attributes show a list of attributes associated with a template
432 
433 --@param P_Template_ID     required
434 --@param P_JTF_OBJECT_CODE    required
435 --@param	p_api_version_number   required
436 --@param       p_commit
437 --@param	p_init_msg_list
438 
439 -- @return	X_Msg_Count
440 --              X_Msg_Data
441 --  	        X_Return_Status
442 --		X_Template_Attributes
443 
444 -- End of Comments
445 
446 procedure Show_Template_Attributes
447 	(
448 	p_api_version_number     IN   NUMBER,
449 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
450 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
451 	P_Template_ID 			IN NUMBER,
452 	P_JTF_OBJECT_CODE 		IN VARCHAR2,
453  	X_Msg_Count     OUT NOCOPY NUMBER,
454   	X_Msg_Data      OUT NOCOPY VARCHAR2,
455  	X_Return_Status			OUT NOCOPY VARCHAR2,
456 	X_Template_Attributes		OUT NOCOPY Template_Attribute_List );
457 
458 -- *****************************************************************************
459 -- Start of Comments
460 --
461 --   	Show_Template_Links will return a table of of Template_Link that's associated with a template.
462 --@param	P_Template_ID   required
463 --@param	P_JTF_OBJECT_CODE  required
464 -- @param	p_api_version_number   required
465 -- @param       p_commit
466 -- @param	p_init_msg_list
467 
468 -- @return	X_Msg_Count
469 --              X_Msg_Data
470 --  	        X_Return_Status
471 --       	X_Template_Links
472 
473 -- End of Comments
474 procedure Show_Template_Links
475 	(
476 	p_api_version_number     IN   NUMBER,
477 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
478 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
479 	 P_Template_ID			IN NUMBER,
480 	 P_JTF_OBJECT_CODE		IN VARCHAR2,
481 	 X_Msg_Count     OUT NOCOPY NUMBER,
482   	 X_Msg_Data			OUT NOCOPY VARCHAR2,
486 -- *****************************************************************************
483  	 X_Return_Status		OUT NOCOPY VARCHAR2,
484 	 X_Template_Links		OUT NOCOPY Template_Link_List);
485 
487 -- Start of Comments
488 --
489 --	Show_Link_Attribute_List returns a list of seeded links or a list of seeded attributes, depending on the P_Identify passed in.
490 --@param		P_Identify   required
491 -- @param	p_api_version_number   required
492 -- @param       p_commit
493 -- @param	p_init_msg_list
494 
495 -- @return	X_Msg_Count
496 --              X_Msg_Data
497 --  	        X_Return_Status
498 
499 
500 -- End of Comments
501 
502 procedure Show_Non_Asso_Links
503 	(
504 	p_api_version_number     IN   NUMBER,
505 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
506 	p_commit       IN VARCHAR          := FND_API.G_FALSE,
507 	 P_Template_ID			IN NUMBER,
508 	 P_JTF_OBJECT_CODE		IN VARCHAR2,
509 	 X_Msg_Count     OUT NOCOPY NUMBER,
510   	 X_Msg_Data			OUT NOCOPY VARCHAR2,
511  	 X_Return_Status		OUT NOCOPY VARCHAR2,
512 	 X_Template_Link_List		OUT NOCOPY  Template_Link_List);
513 
514 
515 procedure Show_Link_Attribute_List (
516 	p_api_version_number     IN   NUMBER,
517 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
518 	p_commit       IN VARCHAR2          := FND_API.G_FALSE,
519 	P_Identify			IN VARCHAR2,
520 	X_Msg_Count			OUT NOCOPY NUMBER,
521   	X_Msg_Data			OUT NOCOPY VARCHAR2,
522  	X_Return_Status			OUT NOCOPY VARCHAR2,
523 	X_IDName_Pairs			OUT NOCOPY  ID_NAME_PAIRS
524 	);
525 
526 procedure Retrieve_Constants (
527 	p_api_version_number     IN   NUMBER,
528 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
529 	p_commit       IN VARCHAR2          := FND_API.G_FALSE,
530 	X_Msg_Count			OUT NOCOPY NUMBER,
531   	X_Msg_Data			OUT NOCOPY VARCHAR2,
532  	X_Return_Status			OUT NOCOPY VARCHAR2,
533         X_IDName_Pairs    OUT NOCOPY ID_NAME_PAIRS
534 	);
535 
536 procedure Show_Default_Template  (
537 	p_api_version_number     IN   NUMBER,
538 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
539 	p_commit       IN VARCHAR2          := FND_API.G_FALSE,
540 	X_Msg_Count			OUT NOCOPY NUMBER,
541   	X_Msg_Data			OUT NOCOPY VARCHAR2,
542  	X_Return_Status			OUT NOCOPY VARCHAR2,
543 	X_Default_Template		OUT NOCOPY Template
544 	);
545 procedure Show_Error_Message (
546 	p_api_version_number 	IN   NUMBER,
547 	X_Out_Message	OUT NOCOPY	VARCHAR2
548 );
549 
550 /*
551 procedure Check_Attribute_Error (P_Template_Attributes IN Template_Attribute_List,
552 				 X_Return_Status OUT NOCOPY VARCHAR2);
553 */
554 
555 
556 /*
557   this procedure is used to copy the template
558 */
559 procedure Copy_Template(
560    p_api_version_number IN NUMBER,
561    B_Template_ID        IN NUMBER,
562    X_Template_Name      IN VARCHAR2,
563    p_init_msg_list      IN VARCHAR2    := FND_API.G_FALSE,
564    p_commit             IN VARCHAR     := FND_API.G_FALSE,
565    X_Msg_Count          OUT NOCOPY NUMBER,
566    X_Msg_Data           OUT NOCOPY VARCHAR2,
567    X_Return_Status     OUT NOCOPY VARCHAR2,
568    X_Template_ID        OUT NOCOPY NUMBER);
569 
570 /*
571   This procedure is used to test if one template is obsolete or not
572 */
573 
574  procedure Test_Template_Obsolete(
575    p_api_version_number IN NUMBER,
576    B_Template_ID        IN NUMBER,
577    p_init_msg_list      IN VARCHAR2    := FND_API.G_FALSE,
578    p_commit             IN VARCHAR     := FND_API.G_FALSE,
579    X_Msg_Count          OUT NOCOPY NUMBER,
580    X_Msg_Data           OUT NOCOPY VARCHAR2,
581    X_Return_Status      OUT NOCOPY VARCHAR2,
582    B_Obsolete           OUT NOCOPY VARCHAR2);
583 
584 
585 -- *****************************************************************************
586 -- Start of Comments
587 --
588 -- Show_Template_Links_Two will return a table of of Template_Link that's associated with a template by the given start link number and end link number.
589 --@param	P_Template_ID   required
590 --@param	P_JTF_OBJECT_CODE  required
591 --@param	p_api_version_number   required
592 --@param        p_start_link
593 --@param        p_end_link
594 --@param        p_commit
595 --@param	p_init_msg_list
596 
597 --@return	X_Msg_Count
598 --              X_Msg_Data
599 --  	        X_Return_Status
600 --       	X_Template_Links
601 --              X_Total_Link_Number
602 --              X_Retrieved_Link_Number
603 
604 -- End of Comments
605 procedure Show_Template_Links_Two
606 	(
607 	p_api_version_number     IN   NUMBER,
608 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
609 	p_commit                 IN   VARCHAR   := FND_API.G_FALSE,
610         P_Template_ID		 IN NUMBER,
611 	P_JTF_OBJECT_CODE	 IN VARCHAR2,
612         p_start_link             IN NUMBER,
613         p_end_link               IN NUMBER,
614 	X_Msg_Count              OUT NOCOPY NUMBER,
615   	X_Msg_Data               OUT NOCOPY VARCHAR2,
616  	X_Return_Status	         OUT NOCOPY VARCHAR2,
617 	X_Template_Links         OUT NOCOPY Template_Link_List,
618         X_Total_Link_Number      OUT NOCOPY NUMBER,
619         X_Retrieved_Link_Number  OUT NOCOPY NUMBER );
620 
621 
622 -- **************************************************************************
623 -- query the availabe product link by the start link number and
624 -- end link number
625 
626 procedure Show_Non_Asso_Links_Two
627 	(
628 	p_api_version_number     IN   NUMBER,
629 	p_init_msg_list          IN   VARCHAR2  := FND_API.G_FALSE,
630 	p_commit                 IN   VARCHAR   := FND_API.G_FALSE,
631         P_Template_ID		 IN NUMBER,
632 	P_JTF_OBJECT_CODE        IN VARCHAR2,
633         p_start_link             IN NUMBER,
634         p_end_link               IN NUMBER,
635         p_link_name              IN VARCHAR2,
636 	X_Msg_Count              OUT NOCOPY NUMBER,
637   	X_Msg_Data	         OUT NOCOPY VARCHAR2,
638  	X_Return_Status		 OUT NOCOPY VARCHAR2,
639 	X_Template_Link_List	 OUT NOCOPY  Template_Link_List,
640         X_Total_Link_Number      OUT NOCOPY NUMBER,
641         X_Retrieved_Link_Number  OUT NOCOPY NUMBER );
642 
643 
644 -- ***********************************************************************
645 -- Delete the template links
646 
647 PROCEDURE Delete_Template_Links (
648     p_api_version_number     IN  NUMBER,
649     p_init_msg_list          IN  VARCHAR2  := FND_API.G_FALSE,
650     p_commit                 IN  VARCHAR   := FND_API.G_FALSE,
651     p_template_id            IN  NUMBER,
652     p_jtf_object_code        IN  VARCHAR2,
653     p_template_links         IN  Template_Link_List,
654     x_msg_count              OUT NOCOPY NUMBER,
655     x_msg_data               OUT NOCOPY VARCHAR2,
656     x_return_status          OUT NOCOPY VARCHAR2);
657 
658 
659 -- ***********************************************************************
660 -- Add the template links
661 
662 PROCEDURE Add_Template_Links (
663     p_api_version_number     IN  NUMBER,
664     p_init_msg_list          IN  VARCHAR2  := FND_API.G_FALSE,
665     p_commit                 IN  VARCHAR   := FND_API.G_FALSE,
666     p_template_id            IN  NUMBER,
667     p_jtf_object_code        IN  VARCHAR2,
668     p_template_links         IN  Template_Link_List,
669     x_msg_count              OUT NOCOPY NUMBER,
670     x_msg_data               OUT NOCOPY VARCHAR2,
671     x_return_status          OUT NOCOPY VARCHAR2);
672 
673 
674 
675 end CS_TP_TEMPLATES_PVT;