DBA Data[Home] [Help]

PACKAGE: APPS.JTF_PERZ_DDF_PVT

Source


1 PACKAGE JTF_PERZ_DDF_PVT as
2 /* $Header: jtfzvdds.pls 120.2 2005/11/02 22:19:22 skothe ship $ */
3 --
4 --
5 -- Start of Comments
6 --
7 -- NAME
8 --   jtf_perz_ddf_pvt
9 --
10 -- PURPOSE
11 --   Public API for creating, getting, updating and deleteing data defaults
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, updating and deleting personalized data defaults
17 -- 	 in the Personalization Framework.
18 --
19 -- HISTORY
20 --	09/10/99	SMATTEGU	Created and documented the following
21 --					save_data_default()
22 --					create_data_default()
23 --					get_data_default()
24 --					update_data_default()
25 --					delete_data_default()
26 --
27 -- End of Comments
28 --
29 --
30 -- *****************************************************************************
31 
32 -- Start of Comments
33 --
34 --	API name 	: save_data_default
35 --	Type		: Public
36 --	Function	: Create or update if exists, a personalized data default
37 --
38 --	Parameters	:
39 --	IN		:
40 --			p_api_version_number	IN NUMBER	Required
41 --   			p_init_msg_list		IN VARCHAR2	Optional
42 -- 			p_commit		IN VARCHAR	Optional
43 --
44 -- 			p_application_id	IN NUMBER	Required
45 
46 -- 			p_profile_id		IN NUMBER	Required
47 -- 			p_profile_name		IN VARCHAR2	Optional
48 -- 			p_profile_type		IN VARCHAR2	Optional
49 -- 			p_profile_attrib	IN JTF_PERZ_PROFILE_PUB.PROFILE_ATTRIB_TBL_TYPE Optional
50 --
51 -- 			p_perz_ddf_id		IN NUMBER	Optional
52 -- 			p_perz_ddf_context	IN VARCHAR2	Required
53 -- 			p_gui_object_name	IN VARCHAR2	Required
54 -- 			p_gui_object_id		IN NUMBER	Optional
55 -- 			p_ddf_value		IN VARCHAR2	Required
56 -- 			p_ddf_value_type	IN VARCHAR2	Required
57 --
58 -- OUT 	:
59 --			x_perz_ddf_id	    OUT  NUMBER
60 -- 			x_return_status	 OUT  VARCHAR2
61 -- 			x_msg_count	 OUT  NUMBER
62 -- 			x_msg_data	 OUT  VARCHAR2
63 --
64 --
65 --	Version	:	Current version	1.0
66 --			Initial version 1.0
67 --
68 --	Notes:
69 --		Data Default is used a single value tied to any given GUI object
70 --		This Association can be identified by ddf_name. The same GUI object
71 --		can have different values in different (profile_id, application_id)
72 --		combination.
73 --		The perz_ddf_context is used to store under what context the GUI
74 --		object will have the assigned value for any given profile_id
75 --		application id combination
76 --
77 --
78 -- *****************************************************************************
79 --
80 -- USAGE NOTES :
81 --
82 --	1. This API creates or updates if it already exists, a Personalized data
83 --		default in the personalization framework.
84 --	2. Of the input parameters p_profile_id (or the name of the profile
85 --		p_profile_name p_profile_type and its attributes p_Profile_Attrib)
86 --		is a required field.
87 --	3. The other required fields are :
88 --	  3.1	p_application_id (the application id of the caller)
89 --	  3.2	p_perz_ddf_context
90 --		This field has to be unique for that profile id and application id, or
91 --		the API will return an error. This field also has to be made of
92 --		characters with no spaces (underscores allowed).
93 --	  3.3	p_gui_object_name (Gui object to which the value is associated with)
94 --	4. Rest of the parameters are optional. p_perz_ddf_id, p_gui_object_id
95 --		if available, may be provided.
96 --	5. p_ddf_value will hold the personalized value for that ddf_name.
97 --	   p_ddf_value_type will hold the data type that of the value.
98 --
99 --
100 --	6. The main out parameter for this API is x_perz_ddf_id.
101 --	   This returns the data default id for the saved data default.
102 --	   Another important out parameter is x_return_status which returns
103 --		FND_API.G_RETURN_SUCCESS when the API completes successfully
104 --		FND_API.G_RETURN_UNEXPECTED when the API reaches a unxpected state
105 --		FND_API.G_RETURN_ERROR when the API hits an error
106 --
107 -- *****************************************************************************
108 --
109 PROCEDURE save_data_default
110 ( 	p_api_version_number	IN	NUMBER,
111   	p_init_msg_list		IN	VARCHAR2 	:= FND_API.G_FALSE,
112 	p_commit		IN 	VARCHAR		:= FND_API.G_FALSE,
113 
114 	p_application_id	IN 	NUMBER,
115 
116 	p_profile_id        	IN 	NUMBER,
117 	p_profile_name      	IN 	VARCHAR2,
118 	p_profile_type      	IN 	VARCHAR2,
119 	p_profile_attrib    	IN JTF_PERZ_PROFILE_PUB.PROFILE_ATTRIB_TBL_TYPE
120 				:= JTF_PERZ_PROFILE_PUB.G_MISS_PROFILE_ATTRIB_TBL,
121 
122 	p_perz_ddf_id		IN NUMBER	,
123 	p_perz_ddf_context	IN VARCHAR2	,
124 
125 	p_gui_object_name	IN VARCHAR2	,
126 	p_gui_object_id		IN NUMBER	,
127 	p_ddf_value		IN VARCHAR2	,
128 	p_ddf_value_type	IN VARCHAR2	,
129 
130 	x_perz_ddf_id	    OUT NOCOPY /* file.sql.39 change */ NUMBER,
131 
132 	x_return_status	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
133 	x_msg_count	 OUT NOCOPY /* file.sql.39 change */ NUMBER,
134 	x_msg_data	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
135 );
136 
137 -- *****************************************************************************
138 
139 -- Start of Comments
140 --
141 --	API name 	: create_data_default
142 --	Type		: Public
143 --	Function	: Create a data default for a given profile and application id.
144 --
145 --	Parameters	:
146 --	IN		:
147 --			p_api_version_number	IN NUMBER	Required
148 --   			p_init_msg_list		IN VARCHAR2	Optional
149 -- 			p_commit		IN VARCHAR	Optional
150 --
151 -- 			p_application_id	IN NUMBER	Required
152 
153 -- 			p_profile_id		IN NUMBER	Required
154 -- 			p_profile_name		IN VARCHAR2	Optional
155 --
156 -- 			p_perz_ddf_id		IN NUMBER	Optional
157 -- 			p_perz_ddf_context	IN VARCHAR2	Required
158 -- 			p_gui_object_name	IN VARCHAR2	Required
159 -- 			p_gui_object_id		IN NUMBER	Optional
160 -- 			p_ddf_value		IN VARCHAR2	Required
161 -- 			p_ddf_value_type	IN VARCHAR2	Required
162 --
163 -- OUT  	:
164 --			x_perz_ddf_id	    OUT  NUMBER
165 -- 			x_return_status	 OUT  VARCHAR2
166 -- 			x_msg_count	 OUT NUMBER
167 -- 			x_msg_data	 OUT VARCHAR2
168 --
169 --
170 --	Version	:	Current version	1.0
171 --			Initial version 1.0
172 --
173 --	Notes:
174 --		This API is used to create a Data Default. A data default is
175 --		associated with a GUI object, default value and type.
176 --		The same GUI object can have different values in different
177 --		(profile_id, application_id, ddf_context) combination.
178 --
179 --		Also, for the same profile, applicatin and contgext,
180 --		different data defaults can be associated with the same
181 --		GUI object, if one GUI object has GUI Object ID and other
182 --		does not. If this is not allowed, this can be fixed by
183 --		creating the unique keyindex on profile id, application id,
184 --		gui object name
185 --
186 -- *****************************************************************************
187 --
188 -- USAGE NOTES :
189 --
190 --	1. This API creates a Personalized data default in the personalization
191 --		framework.
192 --	2. Of the input parameters p_profile_id (or the name) is a required field.
193 --	3. The other required fields are :
194 --	  3.1	p_application_id (the application id of the caller)
195 --	  3.2	p_perz_ddf_context
196 --		This field has to be unique for that profile id and application id,
197 --		or the API will return an error. This field also has to be made of
198 --		characters with no spaces (underscores allowed).
199 --	  3.3	p_gui_object_name (to which the value is associated with)
200 --	4. Rest of the parameters are optional. p_perz_ddf_id, p_gui_object_id
201 --		if available, may be provided.
202 --	5. p_ddf_value will hold the personalized value for that ddf_name.
203 --	   p_ddf_value_type will hold the data type that of the value.
204 --
205 --
206 --	6. The main out parameter for this API is x_perz_ddf_id.
207 --	   This returns the data default id for the created data default object.
208 --	   Another important out parameter is x_return_status which returns
209 --		FND_API.G_RETURN_SUCCESS when the API completes successfully
210 --		FND_API.G_RETURN_UNEXPECTED when the API reaches a unxpected state
211 --		FND_API.G_RETURN_ERROR when the API hits an error
212 --
213 -- *****************************************************************************
214 
215 PROCEDURE create_data_default
216 (
217 	p_api_version_number	IN NUMBER,
218 	p_init_msg_list		IN VARCHAR2,
219 	p_commit		IN VARCHAR,
220 
221 	p_application_id	IN NUMBER,
222 
223 	p_profile_id		IN NUMBER,
224 	p_profile_name		IN VARCHAR2,
225 
226 	p_perz_ddf_id		IN NUMBER,
227 	p_perz_ddf_context	IN VARCHAR2,
228 
229 	p_gui_object_name	IN VARCHAR2,
230 	p_gui_object_id		IN NUMBER,
231 	p_ddf_value		IN VARCHAR2,
232 	p_ddf_value_type	IN VARCHAR2,
233 
234 	x_perz_ddf_id	    OUT NOCOPY /* file.sql.39 change */ NUMBER,
235 
236 	x_return_status	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
237 	x_msg_count	 OUT NOCOPY /* file.sql.39 change */ NUMBER,
238 	x_msg_data	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
239 );
240 
241 -- *****************************************************************************
242 -- Start of Comments
243 --
244 --	API name 	: get_data_default
245 --	Type		: Public
246 --	Function	: Get personalized data default object, and associated
247 --				values for a given personalized data object and
248 --				profile and app id.
249 --
250 --	Parameters	:
251 --	IN		:
252 --			p_api_version_number	IN NUMBER	Required
253 --   			p_init_msg_list		IN VARCHAR2	Optional
254 --
255 -- 			p_application_id	IN NUMBER	Required
256 
257 -- 			p_profile_id		IN NUMBER	Required
258 -- 			p_profile_name		IN VARCHAR2	Optional
259 --
260 -- 			p_perz_ddf_id		IN NUMBER	Optional
261 -- 			p_perz_ddf_context	IN VARCHAR2	Required
262 -- 			p_gui_object_name	IN VARCHAR2	Required
263 -- 			p_gui_object_id		IN NUMBER	Optional
264 -- 			p_ddf_value		IN VARCHAR2	Required
265 -- 			p_ddf_value_type	IN VARCHAR2	Required
266 --
267 -- OUT  	:
268 --			x_ddf_out_tbl	    OUT JTF_PERZ_DDF_PUB.DDF_OUT_TBL_TYPE
269 -- 			x_return_status	 OUT VARCHAR2
270 -- 			x_msg_count	 OUT  NUMBER
271 -- 			x_msg_data	 OUT VARCHAR2
272 --
273 --
274 --	Version	:	Current version	1.0
275 --			Initial version 1.0
276 --
277 --	Notes:
278 --
279 -- *****************************************************************************
280 --
281 -- USAGE NOTES :
282 --
283 --	1. This API gets a Personalized data default from the personalization
284 --		framework.
285 --	2. Of the input parameters p_profile_id (or the name) is a required field.
286 --	3. The other required fields are :
287 --	  3.1	p_application_id (the application id of the caller)
288 --	  3.2	p_perz_ddf_context
289 --	4. Rest of the parameters are optional. p_perz_ddf_id, p_gui_object_id
290 --		if available, may be provided.
291 --
292 --	5. The main out parameter is p_ddf_out_tbl which holds all the details
293 --		of the data default object(s)
294 --
295 --	6. Another important out parameter is x_return_status which returns
296 --		FND_API.G_RETURN_SUCCESS when the API completes successfully
297 --		FND_API.G_RETURN_UNEXPECTED when the API reaches a unxpected state
298 --		FND_API.G_RETURN_ERROR when the API hits an error
299 --
300 --	This API can be used in two ways,
301 --	1. To get the table of DDF by supplying profile id/name, application_id,
302 --		gui_object_id/name and dddf_context
303 --		(In this case out put table will have only one row) OR
304 --	2. To get the table of DDF by supplying profile id/name, application_id,
305 --		gui_object_id/name .
306 -- *****************************************************************************
307 
308 PROCEDURE get_data_default
309 ( 	p_api_version_number	IN	NUMBER,
310 	p_init_msg_list		IN VARCHAR2,
311 
312 	p_application_id	IN NUMBER,
313 
314 	p_profile_id		IN NUMBER,
315 	p_profile_name		IN VARCHAR2,
316 
317 	p_perz_ddf_id		IN NUMBER,
318 	p_perz_ddf_context	IN VARCHAR2,
319 
320 	p_gui_object_name	IN VARCHAR2,
321 	p_gui_object_id		IN NUMBER,
322 
323 	p_ddf_value		IN VARCHAR2,
324 	p_ddf_value_type	IN VARCHAR2,
325 
326 	x_ddf_out_tbl	    OUT NOCOPY /* file.sql.39 change */ jtf_perz_ddf_pub.DDF_OUT_TBL_TYPE,
327 	x_return_status	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
328 	x_msg_count	 OUT NOCOPY /* file.sql.39 change */ NUMBER,
329 	x_msg_data	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
330 );
331 
332 -- *****************************************************************************
333 
334 
335 -- Start of Comments
336 --
337 --	API name 	: update_data_default
338 --	Type		: Public
339 --	Function	: Update data default object in the Framework.
340 --
341 --	Parameters	:
342 --	IN		:
343 --			p_api_version_number	IN NUMBER	Required
344 --   			p_init_msg_list		IN VARCHAR2	Optional
345 -- 			p_commit		IN VARCHAR	Optional
346 --
347 -- 			p_application_id	IN NUMBER	Optional
348 
349 -- 			p_profile_id		IN NUMBER	Optional
350 -- 			p_profile_name		IN VARCHAR2	Optional
351 --
352 -- 			p_perz_ddf_id		IN NUMBER	Optional
353 -- 			p_perz_ddf_context	IN VARCHAR2	Required
354 -- 			p_gui_object_name	IN VARCHAR2	Required
355 -- 			p_gui_object_id		IN NUMBER	Optional
356 -- 			p_ddf_value		IN VARCHAR2	Required
357 -- 			p_ddf_value_type	IN VARCHAR2	Required
358 --
359 -- OUT 	:
360 --			x_perz_ddf_id	    OUT  NUMBER
361 -- 			x_return_status	 OUT  VARCHAR2
362 -- 			x_msg_count	 OUT  NUMBER
363 -- 			x_msg_data	 OUT VARCHAR2
364 --
365 --
366 --	Version	:	Current version	1.0
367 --			Initial version 1.0
368 --
369 --	Notes:
370 --		For a given data default object, this API only updates
371 --		associated value and type fields only.
372 --
373 --
374 -- *****************************************************************************
375 --
376 -- USAGE NOTES :
377 --
378 --	1. This API updates a Personalized data default in the personalization
379 --		framework.
380 --	2. The required fields are :
381 --	  3.1	p_perz_ddf_context
382 --	  3.2	p_gui_object_name (to which the value is associated with)
383 --	4. Rest of the parameters are optional. Wherever available ids may be
384 --		provided.
385 --	5. p_ddf_value will hold the personalized value for that ddf_name.
386 --	   p_ddf_value_type will hold the data type that of the value.
387 --
388 --	6. The main out  parameter for this API is x_perz_ddf_id.
389 --	   This returns the data default id for the created data default object.
390 --	   Another important out parameter is x_return_status which returns
391 --		FND_API.G_RETURN_SUCCESS when the API completes successfully
392 --		FND_API.G_RETURN_UNEXPECTED when the API reaches a unxpected state
393 --		FND_API.G_RETURN_ERROR when the API hits an error
394 --
395 -- *****************************************************************************
396 
397 PROCEDURE update_data_default
398 (
399 	p_api_version_number	IN NUMBER,
400 	p_init_msg_list		IN VARCHAR2,
401 	p_commit		IN VARCHAR,
402 
403 	p_application_id	IN NUMBER,
404 
405 	p_profile_id		IN NUMBER,
406 	p_profile_name		IN VARCHAR2,
407 
408 	p_perz_ddf_id		IN NUMBER,
409 	p_perz_ddf_context	IN VARCHAR2,
410 
411 	p_gui_object_name	IN VARCHAR2,
412 	p_gui_object_id		IN NUMBER,
413 	p_ddf_value		IN VARCHAR2,
414 	p_ddf_value_type	IN VARCHAR2,
415 
416 	x_perz_ddf_id	    OUT NOCOPY /* file.sql.39 change */ NUMBER,
417 
418 	x_return_status	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
419 	x_msg_count	 OUT NOCOPY /* file.sql.39 change */ NUMBER,
420 	x_msg_data	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
421 );
422 -- *****************************************************************************
423 
424 -- Start of Comments
425 --
426 --	API name 	: delete_data_default
427 --	Type		: Public
428 --	Function	: Deletes a data dafault object in the framework.
429 --
430 --	Paramaeters	:
431 --	IN		:
432 -- 			p_api_version_number	IN NUMBER	Required
433 --   			p_init_msg_list		IN VARCHAR2	Optional
434 -- 			p_commit		IN VARCHAR	Optional
435 --
436 -- 			p_application_id	IN NUMBER	Required
437 -- 			p_profile_id        	IN NUMBER	Required
438 -- 			p_perz_ddf_id           IN NUMBER	Required
439 --
440 -- OUT  	:
441 -- 			x_return_status	 OUT VARCHAR2
442 -- 			x_msg_count	 OUT NUMBER
443 -- 			x_msg_data	 OUT VARCHAR2
444 --
445 --
446 --
447 --	Version	:	Current version	1.0
448 --			Initial version 1.0
449 --
450 --	Notes:
451 --		This API accepts only the ids - profile id, application id
452 --		and perz_ddf_id to delete the data default object.
453 --
454 -- *****************************************************************************
455 --
456 -- USAGE NOTES :
457 --
458 --	1. This API deletes the data default object from the framework.
459 --	2. The required fields are:
460 --		application_id
461 --		profile_id
462 --		perz_ddf_id
463 --	3. The out parameter for this API is x_return_status which returns
464 --	FND_API.G_RETURN_SUCCESS when the API completes successfully
465 --	FND_API.G_RETURN_UNEXPECTED when the API reaches a unxpected state
466 --	FND_API.G_RETURN_ERROR when the API hits an error
467 --
468 -- *****************************************************************************
469 
470 PROCEDURE delete_data_default
471 (	p_api_version_number	IN	NUMBER,
472   	p_init_msg_list		IN	VARCHAR2 	:= FND_API.G_FALSE,
473 	p_commit		IN 	VARCHAR		:= FND_API.G_FALSE,
474 
475 	p_application_id	IN NUMBER,
476 	p_profile_id        	IN NUMBER,
477 	p_perz_ddf_id           IN NUMBER,
478 
479 	x_return_status	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
480 	x_msg_count	 OUT NOCOPY /* file.sql.39 change */ NUMBER,
481 	x_msg_data	 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
482 );
483 
484 END  jtf_perz_ddf_pvt;