1 PACKAGE JTF_PERZ_LF_PUB as
2 /* $Header: jtfzplfs.pls 120.2 2005/11/02 03:42:04 skothe ship $ */
3 --
4 --
5 -- Start of Comments
6 --
7 -- NAME
8 -- JTF_PERZ_LF_PUB
9 --
10 -- PURPOSE
11 -- Public API for creating, getting and updatingthe look and feel objects
12 -- in the Personalization Framework.
13 --
14 -- NOTES
15 -- This is a pulicly accessible pacakge. It should be used by all
16 -- sources for creating, getting and updating look and feel objects
17 -- in the Personalization framework.
18 --
19 --
20 -- HISTORY
21 -- 05/25/99 SMATTEGU Created
22 -- 05/26/99 CCHANDRA reorganized, added get, update APIs
23 -- 05/26/99 SMATTEGU updated create, get and update APIs
24 -- 06/01/99 SMATTEGU updated create, get and update APIs
25 -- to incorporate the active inactive flag
26 -- 06/15/99 SMATTEGU Changed the record structures of attribute
27 -- value record to reflect the schema changes.
28 -- 06/24/99 SMATTEGU Changed the record structures of attribute
29 -- value record, object record.
30 -- Changed the p_object_tbl parameter in
31 -- get_lf_object to a IN OUT paramater
32 -- 07/28/99 CCHANDRA Re-organised documentation
33 -- 07/29/99 CCHANDRA Changed specs
34 -- 08/08/99 SMATTEGU Changed the specs of personalize, create, update and get
35 -- to incorporate Object context
36 -- 08/08/99 SMATTEGU Changed the OBJ_ATTRIB_REC_TYPE Record structure
37 -- to include object comtext
38 -- to exclude object_child_flag
39 -- 08/08/99 SMATTEGU Changed the documentation
40 -- 08/17/99 SMATTEGU Changed the following
41 -- 1. LF_OBJECT_OUT_REC_TYPE
42 -- 2. personalize_lf_object() to include
43 -- object_type_desc, object_type_id and
44 -- excluded context_id, context_name
45 -- 3. create_lf_object() to include
46 -- object_type_id and excluded context_id,
47 -- context_name, attrobute_tbl
48 -- 08/18/99 SMATTEGU Added the following
49 -- 1. create_lf_object_type()
50 -- 2. get_lf_object_type()
51 -- 3. attrib_rec_type
52 -- Changed the following
53 -- 1. get_lf_object()
54 -- 2. LF_OBJECT_OUT_REC_TYPE to include object_type_id
55 -- this is needed because, this is an IN OUT parameter
56 -- for get_lf_object
57 -- 3. update_lf_object() to exclude context_id, name
58 -- and object_description. Included object_type_id
59 -- 08/31/99 SMATTEGU Added the following
60 -- 1. save_lf_object_type()
61 -- 2. OBJ_TYPE_MAP_REC_TYPE and corresponding table type
62 -- Deleted create_lf_object_type() as save does both
63 -- create and update.
64 --
65 -- 09/01/99 SMATTEGU, CCHANDRA Changed
66 -- 1. get_lf_object_type()
67 -- 2. save_lf_object()
68 -- (renamed personalize_lf_object to save_lf_object)
69 -- 3. ATTRIB_VALUE_REC_TYPE
70 -- removed the active_flag
71 -- 4. LF_OBJECT_OUT_REC_TYPE
72 --
73 --
74 -- End of Comments
75 --
76 -- *****************************************************************************
77 -- Start of Comments
78 --
79 -- ATTRIB_Rec
80 --
81 -- Parameters
82 --
83 -- ATTRIBUTE ID NUMBER
84 -- ATTRIBUTE NAME VARCHAR2(60)
85 -- ATTRIBUTE TYPE VARCHAR2(60)
86 --
87 -- End of Comments
88
89 TYPE ATTRIB_REC_TYPE IS RECORD
90 (
91 ATTRIBUTE_ID NUMBER := FND_API.G_MISS_NUM,
92 ATTRIBUTE_NAME VARCHAR2(30) := FND_API.G_MISS_CHAR,
93 ATTRIBUTE_TYPE VARCHAR2(30) := FND_API.G_MISS_CHAR
94 );
95
96 -- Start of Comments
97 --
98 -- Attrib_Rec Table: Attrib_rec_tbl_type
99 --
100 --
101 -- End of Comments
102
103 TYPE ATTRIB_REC_TBL_TYPE IS TABLE OF ATTRIB_REC_TYPE
104 INDEX BY BINARY_INTEGER;
105
106 -- G_MISS definition for table
107 G_MISS_ATTRIB_REC_TBL ATTRIB_REC_TBL_TYPE;
108
109 -- *****************************************************************************
110 -- *****************************************************************************
111
112
113 -- Start of Comments
114 --
115 -- ATTRIB_VALUE Rec
116 --
117 -- Parameters
118 --
119 -- ATTRIBUTE ID NUMBER
120 -- ATTRIBUTE NAME VARCHAR2(60)
121 -- ATTRIBUTE VALUE VARCHAR2(60)
122 -- ATTRIBUTE TYPE VARCHAR2(60)
123 -- ACTIVE FLAG VARCHAR2(1)
124 -- PRIORITY NUMBER
125 --
126 -- End of Comments
127
128 TYPE ATTRIB_VALUE_REC_TYPE IS RECORD
129 (
130 ATTRIBUTE_ID NUMBER := FND_API.G_MISS_NUM,
131 ATTRIBUTE_NAME VARCHAR2(30) := FND_API.G_MISS_CHAR,
132 ATTRIBUTE_TYPE VARCHAR2(30) := FND_API.G_MISS_CHAR,
133 ATTRIBUTE_VALUE VARCHAR2(100) := FND_API.G_MISS_CHAR,
134 PRIORITY NUMBER := FND_API.G_MISS_NUM
135 );
136
137 -- Start of Comments
138 --
139 -- Attrib_Value Table: Attrib_Value_tbl_type
140 --
141 --
142 -- End of Comments
143
144 TYPE ATTRIB_VALUE_TBL_TYPE IS TABLE OF ATTRIB_VALUE_REC_TYPE
145 INDEX BY BINARY_INTEGER;
146
147 -- G_MISS definition for table
148 G_MISS_ATTRIB_VALUE_TBL ATTRIB_VALUE_TBL_TYPE;
149
150
151 -- *****************************************************************************
152 -- *****************************************************************************
153 -- Start of Comments
154 --
155 -- LF_OBJECT_OUT Record: This record will define the OUT record from a
156 -- 'get' operation on the LF data store.
157 --
158 -- End of Comments
159 /*
160 -- profile_id must also be part of LF_OBJECT_OUT_REC_TYPE.
161 -- please make the change. Srikanth - 9-2-1999.
162 */
163
164 TYPE LF_OBJECT_OUT_REC_TYPE IS RECORD
165 (
166 PARENT_ID NUMBER := NULL,
167 OBJECT_ID NUMBER := NULL,
168 APPLICATION_ID NUMBER := NULL,
169 OBJECT_NAME VARCHAR2(60) := NULL,
170 OBJECT_DESCRIPTION VARCHAR2(240) := NULL,
171 OBJECT_TYPE_ID NUMBER := NULL,
172 OBJECT_TYPE VARCHAR2(60) := NULL,
173 ATTRIBUTE_ID NUMBER := NULL,
174 ATTRIBUTE_NAME VARCHAR2(30) := NULL,
175 ATTRIBUTE_TYPE VARCHAR2(30) := NULL,
176 ATTRIBUTE_VALUE VARCHAR2(100) := NULL,
177 ACTIVE_FLAG VARCHAR2(1) := NULL,
178 PRIORITY NUMBER := NULL
179 );
180 -- *****************************************************************************
181
182 -- Start of Comments
183 --
184 -- LF_OBJECT_OUT_REC Table: LF_OBJECT_OUT_TBL_TYPE
185 --
186 --
187 -- End of Comments
188
189 TYPE LF_OBJECT_OUT_TBL_TYPE IS TABLE OF LF_OBJECT_OUT_REC_TYPE
190 INDEX BY BINARY_INTEGER;
191
192 -- Start of Comments
193 --
194 -- API name : save_lf_object
195 -- Type : Public
196 -- Function : Create and update if exists, attribute value pairs for
197 -- a given object and profile in an application_id domain.
198 --
199 -- Paramaeters :
200 -- IN :
201 -- p_api_version_number IN NUMBER Required
202 -- p_init_msg_list IN VARCHAR2 Optional
203 -- Default = FND_API.G_FALSE
204 -- p_commit IN VARCHAR2 Optional
205 -- p_application_id IN NUMBER Required
206 -- p_profile_id IN NUMBER Required
207 -- p_profile_name IN VARCHAR2 Optional
208 -- p_profile_type IN VARCHAR2,
209 -- p_profile_attrib_tbl IN JTF_PERZ_PROFILE_PUB.PROFILE_ATTRIB_TBL_TYPE Optional
210 -- p_parent_id IN NUMBER Required
211 -- p_object_id IN NUMBER Optional
212 -- p_object_name IN VARCHAR2 Required
213 -- p_object_description IN VARCHAR2 Optional
214 -- p_object_type_id IN NUMBER Optional
215 -- p_object_type IN VARCHAR2 Required
216 -- p_active_flag IN VARCHAR2 Optional
217 -- Default = NO
218 -- p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
219 -- := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL Optional
220 --
221 -- OUT :
222 -- x_object_id OUT NUMBER
223 -- x_return_status OUT VARCHAR2(1)
224 -- x_msg_count OUT NUMBER
225 -- x_msg_data OUT VARCHAR2(2000)
226 --
227 --
228 -- Version : Current version 1.0
229 -- Initial version 1.0
230 --
231 -- Notes:
232 --
233 -- *****************************************************************************
234 --
235 -- USAGE NOTES :
236 --
237 -- This procedure is the only one needed to personalize a look and feel object.
238 -- Essentially, there are 5 main parameter sets that get passed to the procedure :
239 --
240 -- 1. The object name (or object id) [ p_object_name, p_object_id ]
241 -- 2. The object attributes and their values [ p_attrib_value_tbl ]
242 -- 3. The profile name (or profile id, attributes etc)
243 -- [ p_profile_name, p_profile_id ]. One of them must be given.
244 -- 4. The application id of the calling program [ p_application_id ]
245 -- 5. The object type (or object id) [p_object_type, p_object_type_id]
246 --
247 -- Based on this this information the procedure does the following :
248 --
249 -- 1.Looks up the the profile for the give profile data.
250 -- It is highly recommended for performance reasons to query the user's
251 -- PERSONALIZATION profile_id at log on time using
252 -- PERZ_PROFILE_PUB.Get_Profile() by passing the PERSONALIZATION <tag> and
253 -- user_id.
254 --
255 -- 2.The procedure will then check if a personalized LF object with the
256 -- specified name exists. Again, specifying object_id will improve
257 -- performance. The name of the object should be continious characters with
258 -- allowed underscores.
259 --
260 -- 3.If there is such an object, then it is updated with the values specified
261 -- in the attribute/value table and values made active. This also implies that
262 -- ther can be only one object with that name for a given application and
263 -- profile ID.
264 --
265 -- 4.If no object was found then, check if the give object type exists.
266 -- If, yes, create the object and the associated attributes value/profile pairs
267 -- for each attribute specified.
268 --
269 -- If no object type was found then an object type with the specified
270 -- name/attributes is created, an object is created and value/profile pairs
271 -- are created for each attribute specified.
272 --
273 -- Once a parent object (for a given profile and application id) is set to
274 -- inactive then, all it's children will also be set to inactive for that
275 -- domain.
276 -- *****************************************************************************
277 --
278
279 PROCEDURE save_lf_object
280 ( p_api_version_number IN NUMBER,
281 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
282 p_commit IN VARCHAR2 := FND_API.G_FALSE,
283
284 p_profile_id IN NUMBER,
285 p_profile_name IN VARCHAR2,
286 p_profile_type IN VARCHAR2,
287 p_profile_attrib_tbl IN JTF_PERZ_PROFILE_PUB.PROFILE_ATTRIB_TBL_TYPE
288 := JTF_PERZ_PROFILE_PUB.G_MISS_PROFILE_ATTRIB_TBL,
289
290 p_application_id IN NUMBER,
291 p_parent_id IN NUMBER,
292 p_object_type_id IN NUMBER,
293 p_object_type IN VARCHAR2,
294
295 p_object_id IN NUMBER,
296 p_object_name IN VARCHAR2,
297 p_object_description IN VARCHAR2,
298
299 p_active_flag IN VARCHAR2,
300 p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
301 := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL,
302
303 x_object_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
304 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
305 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
306 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
307 );
308
309 -- *****************************************************************************
310 -- *****************************************************************************
311
312 -- Start of Comments
313 --
314 -- API name : save_lf_object_type
315 -- Type : Public
316 -- Function : This procedure will create or update the given lf
317 -- object type.
318 --
319 -- Paramaeters :
320 -- IN :
321 -- p_api_version_number IN NUMBER Required
322 -- p_init_msg_list IN VARCHAR2 Optional
323 -- Default = FND_API.G_FALSE
324 -- p_commit IN VARCHAR2 Optional
325
326 -- p_object_type_id IN NUMBER Optional
327 -- p_object_type IN VARCHAR2 Optional
328 -- p_object_type_desc IN VARCHAR2 Optional
329
330 -- p_attribute_rec_tbl IN JTF_PERZ_LF_PUB.ATTRIB_REC_TBL_TYPE Required
331 --
332 -- OUT :
333 -- x_object_type_id OUT NUMBER
334 -- x_return_status OUT VARCHAR2
335 -- x_msg_count OUT NUMBER
336 -- x_msg_data OUT VARCHAR2(2000)
337 --
338 --
339 -- Version : Current version 1.0
340 -- Initial version 1.0
341 --
342 -- Notes:
343 --
344 -- *****************************************************************************
345
346 -- USAGE NOTES :
347 --
348 -- This procedure is used to create or update a look and feel object type in the
349 -- personalization framework.Essentially, there are 2 main parameter sets that
350 -- get passed to the procedure :
351 --
352 -- 1. the object type (or object_type id) [ p_object_type, p_object_type_id ]
353 -- 2. the object attributes and their values [ p_attrib_value_tbl ]
354 --
355 -- based on this this information the procedure does the following :
356 --
357 -- 1. the procedure will check if the object type already exists or not.
358 --
359 -- 2. If the object type already exists, then each attribute supplied,
360 -- will be compared against the existing attributes for that object type.
361 -- If there are any new attribute supplied, then they will be created in
362 -- along with the map to object type.
363 --
364 -- 3. If the object type does not exist, Then object type will be created.
365 -- Then each attribute supplied, an object type - attribute map will be created
366 -- If any attribute supplied does not exist in the attribute store, then
367 -- they will be created.
368 --
369 -- *****************************************************************************
370 PROCEDURE save_lf_object_type
371 ( p_api_version_number IN NUMBER,
372 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
373 p_commit IN VARCHAR2 := FND_API.G_FALSE,
374
375 p_object_type_id IN NUMBER,
376 p_object_type IN VARCHAR2,
377 p_object_type_desc IN VARCHAR2,
378
379 p_attrib_rec_tbl IN JTF_PERZ_LF_PUB.ATTRIB_REC_TBL_TYPE
380 := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_REC_TBL,
381
382 x_object_type_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
383 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
384 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
385 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
386 );
387
388 -- *****************************************************************************
389 -- *****************************************************************************
390
391 -- Start of Comments
392 --
393 -- API name : Create_lf_object
394 -- Type : Public
395 -- Function : Create attribute value pairs for a given object and profile
396 --
397 -- Paramaeters :
398 -- IN :
399 -- p_api_version_number IN NUMBER Required
400 -- p_init_msg_list IN VARCHAR2 Optional
401 -- Default = FND_API.G_FALSE
402 -- p_commit IN VARCHAR2 Optional
403
404 -- p_profile_id IN NUMBER Optional
405 -- p_profile_name IN VARCHAR2 Required
406
407 -- p_application_id IN NUMBER Required
408 -- p_parent_id IN NUMBER Optional
409 -- p_object_id IN NUMBER Optional
410 -- p_object_name IN VARCHAR2 Required
411
412 -- p_object_type_id IN NUMBER Optional
413 -- p_object_type IN VARCHAR2 Optional
414
415 -- p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
416 -- := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL
417
421 -- x_msg_count OUT NUMBER
418 -- OUT :
419 -- x_object_id OUT NUMBER
420 -- x_return_status OUT VARCHAR2(1)
422 -- x_msg_data OUT VARCHAR2(2000)
423 --
424 --
425 -- Version : Current version 1.0
426 -- Initial version 1.0
427 --
428 -- Notes: Personalization Framework API to create the Object attrib-
429 -- Value pair with their corresponding profile.
430 --
431 --
432 -- *****************************************************************************
433 --
434 -- USAGE NOTES :
435 --
436 -- This procedure is used to create a look and feel object in the
437 -- personalization framework.Essentially, there are 6 main parameter sets that
438 -- get passed to the procedure :
439 --
440 -- 1. the object name (or object id) [ p_object_name, p_object_id ]
441 -- 2. the object attributes and their values [ p_attrib_value_tbl ]
442 -- 3. the profile name (or profile id )
443 -- [ p_profile_name, p_profile_id ]
444 -- 4. the application id of the calling program [ p_application_id ]
445 -- 5. the ID of the parent if this object has a parent (like a screen/form etc)
446 -- 6. The object type (or object id) [p_object_type, p_object_id]
447 --
448 -- based on this this information the procedure does the following :
449 --
450 -- 1. looks up the the profile for the give profile data.
451 -- It is highly recommended for performance reasons to bring the user's
452 -- PERSONALIZATION profile at log on time using
453 -- JTF_PERZ_PROFILE_PUB.Get_Profile() by passing the PERSONALIZATION <tag> and
454 -- user_id.
455 -- 2. looks up the object type, if it exists
456 -- 3. the procedure will then create a LF object in the framework
457 --
458 -- 4. The parent id specified has to be an object
459 -- that already exists in the personalization framework.
460 --
461 -- Object creation will default the object attribute avlues active for
462 -- that profile.
463 --
464 -- *****************************************************************************
465 --
466 PROCEDURE Create_lf_object
467 ( p_api_version_number IN NUMBER,
468 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
469 p_commit IN VARCHAR2 := FND_API.G_FALSE,
470
471 p_profile_id IN NUMBER,
472 p_profile_name IN VARCHAR2,
473
474 p_application_id IN NUMBER,
475 p_parent_id IN NUMBER,
476 p_object_id IN NUMBER,
477 p_object_name IN VARCHAR2,
478
479 p_object_type_id IN NUMBER,
480 p_object_type IN VARCHAR2,
481
482 p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
483 := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL,
484
485 x_object_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
486 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
487 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
488 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
489 );
490
491 -- *****************************************************************************
492 -- *****************************************************************************
493
494 -- Start of Comments
495 --
496 -- API name : Get_lf_object_type
497 -- Type : Public
498 -- Function : Get attribute pairs for a given LF object_type
499 --
500 -- Paramaeters :
501 -- IN :
502 -- p_api_version_number IN NUMBER Required
503 -- p_init_msg_list IN VARCHAR2 Optional
504 -- Default = FND_API.G_FALSE
505 --
506 -- p_object_type IN VARCHAR2 Optional
507 -- p_object_type_id IN NUMBER Optional
508 --
509 -- OUT :
510 -- x_object_type_id OUT NUMBER
511 -- x_object_type_desc OUT VARCHAR,
512
513 -- x_attrib_rec_tbl OUT JTF_PERZ_LF_PUB.ATTRIB_REC_TBL_TYPE
514
515 -- x_return_status OUT VARCHAR2(1)
516 -- x_msg_count OUT NUMBER
517 -- x_msg_data OUT VARCHAR2(2000)
518 --
519 --
520 --
521 -- Version : Current version 1.0
522 -- Initial version 1.0
523 --
524 -- Notes:
525 --
526 -- *****************************************************************************
527 --
528 -- USAGE NOTES :
529 --
530 -- This procedure is used to get a LF object type from the personalization
531 -- framework.Essentially, there are 2 main parameter sets that get passed to
532 -- the procedure :
533 --
534 -- 1. the object type (or object_type_id) [ p_object_type, p_object_type_id ]
535 -- 2. The attribute_rec_tbl [x_attribute_rec_tbl]
536 --
537 -- based on this this information the procedure does the following :
538 --
539 -- 1. the procedure will then check if a personalized LF object_type with the
540 -- specified name and attributes exists. Again, specifying ids
541 -- will improve performance.
542 -- 2. if there is such an object, then it's attributes are returned as an
543 -- out table.
544 --
545 --
546 -- *****************************************************************************
547 --
548
549 PROCEDURE Get_lf_object_type
550 ( p_api_version_number IN NUMBER,
551 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
552
553 p_Object_type IN VARCHAR,
554 p_Object_type_Id IN NUMBER,
555
556 x_Object_type_Id OUT NOCOPY /* file.sql.39 change */ NUMBER,
557 x_object_type_desc OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
558
562 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
559 x_attrib_rec_tbl OUT NOCOPY /* file.sql.39 change */ JTF_PERZ_LF_PUB.ATTRIB_REC_TBL_TYPE,
560
561 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
563 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
564 );
565
566
567 -- *****************************************************************************
568 -- *****************************************************************************
569
570 -- Start of Comments
571 --
572 -- API name : Get_lf_object
573 -- Type : Public
574 -- Function : Get attribute value pairs for a given LF object and profile
575 --
576 -- Paramaeters :
577 -- IN :
578 -- p_api_version_number IN NUMBER Required
579 -- p_init_msg_list IN VARCHAR2 Optional
580 -- Default = FND_API.G_FALSE
581 -- p_profile_id IN NUMBER Optional
582 -- p_profile_name IN VARCHAR2 Optional
583 -- p_parent_id IN NUMBER Optional
584 -- p_object_id IN NUMBER Optional
585 -- p_object_name IN VARCHAR2 Optional
586 -- p_obj_active_flag IN VARCHAR2 Optional
587 -- p_get_children_flag IN VARCHAR2 Optional
588 --
589 -- OUT :
590 -- x_Object_Tbl OUT JTF_PERZ_LF_PUB.LF_OBJECT_OUT_TBL_TYPE
591 -- x_return_status OUT VARCHAR2(1)
592 -- x_msg_count OUT NUMBER
593 -- x_msg_data OUT VARCHAR2(2000)
594 --
595 --
596 --
597 -- Version : Current version 1.0
598 -- Initial version 1.0
599 --
600 -- Notes:
601 --
602 -- *****************************************************************************
603 --
604 -- USAGE NOTES :
605 --
606 -- This procedure is used to get a look and feel object from the personalization
607 -- framework.Essentially, there are 4 main parameter sets that get passed to
608 -- the procedure :
609 --
610 -- 1. the object name (or object id) [ p_object_name, p_object_id ]
611 -- 2. the profile name (or profile id)
612 -- [ p_profile_name, p_profile_id ]
613 -- 3. the application id of the calling program [ p_application_id ]
614 -- 4. LF_OBJECT_OUT_TBL_TYPE [x_Object_Tbl] which has parent_id etc.
615 --
616 -- based on this this information the procedure does the following :
617 --
618 -- 1. looks up the the profile for the give profile data. It is highly
619 -- recommended for performance reasons to bring the user's
620 -- PERSONALIZATION profile at log on time using
621 -- JTF_PERZ_PROFILE_PUB.Get_Profile() by passing the PERSONALIZATION <tag> and
622 -- user_id.
623 -- 2. the procedure will then check if a personalized LF object with the
624 -- specified name exists. Again, specifying object_id will improve
625 -- performance.
626 -- 3. if there is such an object, then it's attributes and values associated
627 -- with the profile specified are returned as an out table for that profile.
628 -- 4. Get_children_flag is used to indicate whether the api must get details of
629 -- the immediate children or not. If the flag is set to FND_API.G_TRUE then,
630 -- the API gets the attributes and their associated value pairs for all the
631 -- immediate children of the given object. If the flag is set to FND_API.G_FALSE,
632 -- then the object is only the given object's details will be obtained.
633 -- 5. by default only the active objects will be fetched
634 -- 6. if a parent (or given object) is inactive for a profile,
635 -- all it's children will not be fetched.
636 --
637 --
638 --
639 --
640 -- *****************************************************************************
641 --
642
643 PROCEDURE Get_lf_object
644 ( p_api_version_number IN NUMBER,
645 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
646
647 p_application_id IN NUMBER,
648 p_priority IN NUMBER,
649 p_profile_id IN NUMBER,
650 p_profile_name IN VARCHAR2,
651 P_Object_Id IN NUMBER,
652 p_Object_Name IN VARCHAR,
653 p_obj_active_flag IN VARCHAR2,
654 p_get_children_flag IN VARCHAR2,
655 x_Object_Tbl OUT NOCOPY /* file.sql.39 change */ JTF_PERZ_LF_PUB.LF_OBJECT_OUT_TBL_TYPE,
656 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
657 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
658 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
659 );
660
661 -- *****************************************************************************
662 -- *****************************************************************************
663
664
665 -- Start of Comments
666 --
667 -- API name : Update_lf_object
668 -- Type : Public
669 -- Function : Update attribute-value pairs for a given LF object and profile
670 --
671 -- Paramaeters :
672 -- IN :
673 -- p_api_version_number IN NUMBER Required
674 -- p_init_msg_list IN VARCHAR2 Optional
675 -- Default = FND_API.G_FALSE
676 -- p_commit IN VARCHAR2
677 -- Default = FND_API.G_FALSE
678 --
679 -- p_profile_id IN NUMBER Optional
680 -- p_profile_name IN VARCHAR2 Optional
681 --
682 -- p_application_id IN NUMBER Required
683 -- p_parent_id IN NUMBER Required
684 -- p_object_id IN NUMBER Optional
685 -- p_object_name IN VARCHAR2 Optional
686 -- p_active_flag IN VARCHAR2 Optional
687
688 -- p_object_type_id IN NUMBER Optional
689 -- p_object_type IN VARCHAR2 Optional
690 -- p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
691 -- := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL Optional
692 --
693 -- OUT :
694 -- x_object_id OUT NUMBER
695 -- x_return_status OUT VARCHAR2(1)
696 -- x_msg_count OUT NUMBER
697 -- x_msg_data OUT VARCHAR2(2000)
698 --
699 --
700 --
701 -- Version : Current version 1.0
702 -- Initial version 1.0
703 --
704 -- Notes: Object id or name must be specified.
705 -- Profile id or name must be specified.
706 --
707 --
708 -- *****************************************************************************
709 --
710 -- USAGE NOTES :
711 --
712 -- This procedure is used to update a look and feel object in the personalization framework.
713 -- Essentially, there are 5 main parameter sets that get passed to the procedure :
714 --
715 -- 1. the object id (or object id) [ p_object_id ]
716 -- 2. the object attributes and their values [ p_attrib_value_tbl ]
717 -- 3. the profile id ( p_profile id) [ p_profile_id ]
718 -- 4. the application id of the calling program [ p_application_id ]
719 -- 5. the ID of the parent if this object has a parent (like a screen/form etc)
720 --
721 -- based on this this information the procedure does the following :
722 --
723 -- 1. looks to see if object exists in framework
724 -- 2. the procedure will then update the LF object in the framework and will
725 -- update attribute/value/profile tuples with the given attributes/values.
726 -- 3. The parent id specified has to be an object that already exists in the object store.
727 -- 4. Updating the object attribute/value pair will automatically makes the
728 -- object active with an exception of updating the active flag to inactive. In
729 -- which case that object will be made inactive for that profile-application id.
730 --
731 -- *****************************************************************************
732 --
733 PROCEDURE Update_lf_object
734 ( p_api_version_number IN NUMBER,
735 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
736 p_commit IN VARCHAR2 := FND_API.G_FALSE,
737
738 p_profile_id IN NUMBER,
739 p_profile_name IN VARCHAR2,
740
741 p_application_id IN NUMBER,
742 p_parent_id IN NUMBER,
743 p_object_Id IN NUMBER,
744 p_object_name IN VARCHAR2,
745 p_active_flag IN VARCHAR2,
746
747 p_object_type_id IN NUMBER,
748 p_object_type IN VARCHAR2,
749
750 p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
751 := JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL,
752
753 x_object_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
754 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
755 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
756 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
757 );
758
759 -- *****************************************************************************
760 -- *****************************************************************************
761 END JTF_PERZ_LF_PUB ;