DBA Data[Home] [Help]

PACKAGE BODY: APPS.OTA_CONFERENCE_SERVER_API

Source


1 PACKAGE BODY ota_conference_server_api as
2 /* $Header: otcfsapi.pkb 120.0 2005/05/29 07:05:31 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ota_conference_server_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-----------------------< create_conference_server >-----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_conference_server
13   (p_effective_date               in  date
14   ,p_conference_server_id         out nocopy number
15   ,p_name                         in  varchar2
16   ,p_description                  in  varchar2         default null
17   ,p_url                          in  varchar2
18   ,p_type                         in  varchar2
19   ,p_owc_site_id                  in  varchar2         default null
20   ,p_owc_auth_token               in  varchar2         default null
21   ,p_end_date_active              in  date             default null
22   ,p_object_version_number        out nocopy number
23   ,p_business_group_id            in  number
24   ,p_attribute_category           in  varchar2         default null
25   ,p_attribute1                   in  varchar2         default null
26   ,p_attribute2                   in  varchar2         default null
27   ,p_attribute3                   in  varchar2         default null
28   ,p_attribute4                   in  varchar2         default null
29   ,p_attribute5                   in  varchar2         default null
30   ,p_attribute6                   in  varchar2         default null
31   ,p_attribute7                   in  varchar2         default null
32   ,p_attribute8                   in  varchar2         default null
33   ,p_attribute9                   in  varchar2         default null
34   ,p_attribute10                  in  varchar2         default null
35   ,p_attribute11                  in  varchar2         default null
36   ,p_attribute12                  in  varchar2         default null
37   ,p_attribute13                  in  varchar2         default null
38   ,p_attribute14                  in  varchar2         default null
39   ,p_attribute15                  in  varchar2         default null
40   ,p_attribute16                  in  varchar2         default null
41   ,p_attribute17                  in  varchar2         default null
42   ,p_attribute18                  in  varchar2         default null
43   ,p_attribute19                  in  varchar2         default null
44   ,p_attribute20                  in  varchar2         default null
45   ,p_validate                     in  boolean          default false
46   ) is
47   --
48   -- Declare cursors and local variables
49   --
50   l_proc                    varchar2(72) := g_package||' Create Conference Server';
51   l_conference_server_id number;
52   l_object_version_number   number;
53   l_effective_date          date;
54 begin
55   hr_utility.set_location('Entering:'|| l_proc, 10);
56   --
57   -- Issue a savepoint
58   --
59   savepoint CREATE_CONFERENCE_SERVER;
60   --
61   -- Truncate the time portion from all IN date parameters
62   --
63   l_effective_date := trunc(p_effective_date);
64   --
65   -- Call Before Process User Hook
66   --
67 
68   begin
69     ota_conference_server_bk1.create_conference_server_b
70   (p_effective_date                 => l_effective_date
71   ,p_name                           => p_name
72   ,p_description                    => p_description
73   ,p_url                            => p_url
74   ,p_type                           => p_type
75   ,p_owc_site_id                    => p_owc_site_id
76   ,p_owc_auth_token                 => p_owc_auth_token
77   ,p_end_date_active                => p_end_date_active
78   ,p_business_group_id              => p_business_group_id
79   ,p_attribute_category             => p_attribute_category
80   ,p_attribute1                     => p_attribute1
81   ,p_attribute2                     => p_attribute2
82   ,p_attribute3                     => p_attribute3
83   ,p_attribute4                     => p_attribute4
84   ,p_attribute5                     => p_attribute5
85   ,p_attribute6                     => p_attribute6
86   ,p_attribute7                     => p_attribute7
87   ,p_attribute8                     => p_attribute8
88   ,p_attribute9                     => p_attribute9
89   ,p_attribute10                    => p_attribute10
90   ,p_attribute11                    => p_attribute11
91   ,p_attribute12                    => p_attribute12
92   ,p_attribute13                    => p_attribute13
93   ,p_attribute14                    => p_attribute14
94   ,p_attribute15                    => p_attribute15
95   ,p_attribute16                    => p_attribute16
96   ,p_attribute17                    => p_attribute17
97   ,p_attribute18                    => p_attribute18
98   ,p_attribute19                    => p_attribute19
99   ,p_attribute20                    => p_attribute20
100   );
101 
102   exception
103     when hr_api.cannot_find_prog_unit then
104       hr_api.cannot_find_prog_unit_error
105         (p_module_name => 'CREATE_CONFERENCE_SERVER'
106         ,p_hook_type   => 'BP'
107         );
108   end;
109   --
110 
111   -- Validation in addition to Row Handlers
112   --
113   --
114   -- Process Logic
115   --
116   ota_cfs_ins.ins
117   (p_effective_date                 => l_effective_date
118   ,p_name                           => p_name
119   ,p_url                            => p_url
120   ,p_type                           => p_type
121   ,p_business_group_id              => p_business_group_id
122   ,p_description                    => p_description
123   ,p_owc_site_id                    => p_owc_site_id
124   ,p_owc_auth_token                 => p_owc_auth_token
125   ,p_end_date_active                => p_end_date_active
126   ,p_attribute_category             => p_attribute_category
127   ,p_attribute1                     => p_attribute1
128   ,p_attribute2                     => p_attribute2
129   ,p_attribute3                     => p_attribute3
130   ,p_attribute4                     => p_attribute4
131   ,p_attribute5                     => p_attribute5
132   ,p_attribute6                     => p_attribute6
133   ,p_attribute7                     => p_attribute7
134   ,p_attribute8                     => p_attribute8
135   ,p_attribute9                     => p_attribute9
136   ,p_attribute10                    => p_attribute10
137   ,p_attribute11                    => p_attribute11
138   ,p_attribute12                    => p_attribute12
139   ,p_attribute13                    => p_attribute13
140   ,p_attribute14                    => p_attribute14
141   ,p_attribute15                    => p_attribute15
142   ,p_attribute16                    => p_attribute16
143   ,p_attribute17                    => p_attribute17
144   ,p_attribute18                    => p_attribute18
145   ,p_attribute19                    => p_attribute19
146   ,p_attribute20                    => p_attribute20
147   ,p_conference_server_id           => l_conference_server_id
148   ,p_object_version_number          => l_object_version_number
149   );
150   --
151   -- Set all output arguments
152   --
153   p_conference_server_id         := l_conference_server_id;
154   p_object_version_number        := l_object_version_number;
155 
156   ota_cft_ins.ins_tl
157   (p_effective_date	             => p_effective_date
158   ,p_language_code	             => USERENV('LANG')
159   ,p_conference_server_id         => p_conference_server_id
160   ,p_name                         => rtrim(p_name)
161   ,p_description                  => p_description
162   );
163 --
164 
165   --
166   -- Call After Process User Hook
167   --
168   begin
169   ota_conference_server_bk1.create_conference_server_a
170   (p_effective_date                 => l_effective_date
171   ,p_conference_server_id           => l_conference_server_id
172   ,p_name                           => p_name
173   ,p_description                    => p_description
174   ,p_url                            => p_url
175   ,p_type                           => p_type
176   ,p_owc_site_id                    => p_owc_site_id
177   ,p_owc_auth_token                 => p_owc_auth_token
178   ,p_end_date_active                => p_end_date_active
179   ,p_object_version_number          => l_object_version_number
180   ,p_business_group_id              => p_business_group_id
181   ,p_attribute_category             => p_attribute_category
182   ,p_attribute1                     => p_attribute1
183   ,p_attribute2                     => p_attribute2
184   ,p_attribute3                     => p_attribute3
185   ,p_attribute4                     => p_attribute4
186   ,p_attribute5                     => p_attribute5
187   ,p_attribute6                     => p_attribute6
188   ,p_attribute7                     => p_attribute7
189   ,p_attribute8                     => p_attribute8
190   ,p_attribute9                     => p_attribute9
191   ,p_attribute10                    => p_attribute10
192   ,p_attribute11                    => p_attribute11
193   ,p_attribute12                    => p_attribute12
194   ,p_attribute13                    => p_attribute13
195   ,p_attribute14                    => p_attribute14
196   ,p_attribute15                    => p_attribute15
197   ,p_attribute16                    => p_attribute16
198   ,p_attribute17                    => p_attribute17
199   ,p_attribute18                    => p_attribute18
200   ,p_attribute19                    => p_attribute19
201   ,p_attribute20                    => p_attribute20
202   );
203   exception
204     when hr_api.cannot_find_prog_unit then
205       hr_api.cannot_find_prog_unit_error
206         (p_module_name => 'CREATE_CONFERENCE_SERVER'
207         ,p_hook_type   => 'AP'
208         );
209   end;
210 
211   --
212   -- When in validation only mode raise the Validate_Enabled exception
213   --
214   if p_validate then
215     raise hr_api.validate_enabled;
216   end if;
217   --
218   -- Set all output arguments
219   --
220   p_conference_server_id        := l_conference_server_id;
221   p_object_version_number       := l_object_version_number;
222   --
223   hr_utility.set_location(' Leaving:'||l_proc, 70);
224 exception
225   when hr_api.validate_enabled then
226     --
227     -- As the Validate_Enabled exception has been raised
228     -- we must rollback to the savepoint
229     --
230     rollback to CREATE_CONFERENCE_SERVER;
231     --
232     -- Only set output warning arguments
233     -- (Any key or derived arguments must be set to null
234     -- when validation only mode is being used.)
235     --
236     p_conference_server_id := null;
237     p_object_version_number   := null;
238     hr_utility.set_location(' Leaving:'||l_proc, 80);
239   when others then
240     --
241     -- A validation or unexpected error has occured
242     --
243     rollback to CREATE_CONFERENCE_SERVER;
244     p_conference_server_id    := null;
245     p_object_version_number   := null;
246     hr_utility.set_location(' Leaving:'||l_proc, 90);
247     raise;
248 end create_conference_server;
249 --
250 -- ----------------------------------------------------------------------------
251 -- |-------------------< update_conference_server >---------------------------|
252 -- ----------------------------------------------------------------------------
253 --
254 procedure update_conference_server
255   (p_effective_date               in  date
256   ,p_conference_server_id         in  number
257   ,p_name                         in  varchar2
258   ,p_description                  in  varchar2
259   ,p_url                          in  varchar2
260   ,p_type                         in  varchar2
261   ,p_owc_site_id                  in  varchar2         default hr_api.g_varchar2
262   ,p_owc_auth_token               in  varchar2         default hr_api.g_varchar2
263   ,p_end_date_active              in  date             default hr_api.g_date
264   ,p_business_group_id            in  number
265   ,p_object_version_number        in out nocopy number
266   ,p_attribute_category           in  varchar2         default hr_api.g_varchar2
267   ,p_attribute1                   in  varchar2         default hr_api.g_varchar2
268   ,p_attribute2                   in  varchar2         default hr_api.g_varchar2
269   ,p_attribute3                   in  varchar2         default hr_api.g_varchar2
270   ,p_attribute4                   in  varchar2         default hr_api.g_varchar2
271   ,p_attribute5                   in  varchar2         default hr_api.g_varchar2
272   ,p_attribute6                   in  varchar2         default hr_api.g_varchar2
273   ,p_attribute7                   in  varchar2         default hr_api.g_varchar2
274   ,p_attribute8                   in  varchar2         default hr_api.g_varchar2
275   ,p_attribute9                   in  varchar2         default hr_api.g_varchar2
276   ,p_attribute10                  in  varchar2         default hr_api.g_varchar2
277   ,p_attribute11                  in  varchar2         default hr_api.g_varchar2
278   ,p_attribute12                  in  varchar2         default hr_api.g_varchar2
279   ,p_attribute13                  in  varchar2         default hr_api.g_varchar2
280   ,p_attribute14                  in  varchar2         default hr_api.g_varchar2
281   ,p_attribute15                  in  varchar2         default hr_api.g_varchar2
282   ,p_attribute16                  in  varchar2         default hr_api.g_varchar2
283   ,p_attribute17                  in  varchar2         default hr_api.g_varchar2
284   ,p_attribute18                  in  varchar2         default hr_api.g_varchar2
285   ,p_attribute19                  in  varchar2         default hr_api.g_varchar2
286   ,p_attribute20                  in  varchar2         default hr_api.g_varchar2
287   ,p_validate                     in  boolean          default false
288   ) is
289   --
290   -- Declare cursors and local variables
291   --
292   l_proc                    varchar2(72) := g_package||' Update Conference Server';
293   l_effective_date          date;
294   l_object_version_number   number := p_object_version_number;
295 begin
296   hr_utility.set_location('Entering:'|| l_proc, 10);
297   --
298   -- Issue a savepoint
299   --
300   savepoint UPDATE_CONFERENCE_SERVER;
301   --
302   -- Truncate the time portion from all IN date parameters
303   --
304   l_effective_date := trunc(p_effective_date);
305   --
306   -- Call Before Process User Hook
307   --
308 
309   begin
310   ota_conference_server_bk2.update_conference_server_b
311   (p_effective_date                 => l_effective_date
312   ,p_conference_server_id           => p_conference_server_id
313   ,p_name                           => p_name
314   ,p_description                    => p_description
315   ,p_url                            => p_url
316   ,p_type                           => p_type
317   ,p_owc_site_id                    => p_owc_site_id
318   ,p_owc_auth_token                 => p_owc_auth_token
319   ,p_end_date_active                => p_end_date_active
320   ,p_business_group_id              => p_business_group_id
321   ,p_object_version_number          => l_object_version_number
322   ,p_attribute_category             => p_attribute_category
323   ,p_attribute1                     => p_attribute1
324   ,p_attribute2                     => p_attribute2
325   ,p_attribute3                     => p_attribute3
326   ,p_attribute4                     => p_attribute4
327   ,p_attribute5                     => p_attribute5
328   ,p_attribute6                     => p_attribute6
329   ,p_attribute7                     => p_attribute7
330   ,p_attribute8                     => p_attribute8
331   ,p_attribute9                     => p_attribute9
332   ,p_attribute10                    => p_attribute10
333   ,p_attribute11                    => p_attribute11
334   ,p_attribute12                    => p_attribute12
335   ,p_attribute13                    => p_attribute13
336   ,p_attribute14                    => p_attribute14
337   ,p_attribute15                    => p_attribute15
338   ,p_attribute16                    => p_attribute16
339   ,p_attribute17                    => p_attribute17
340   ,p_attribute18                    => p_attribute18
341   ,p_attribute19                    => p_attribute19
342   ,p_attribute20                    => p_attribute20
343   );
344   exception
345     when hr_api.cannot_find_prog_unit then
346       hr_api.cannot_find_prog_unit_error
347         (p_module_name => 'UPDATE_CONFERENCE_SERVER'
348         ,p_hook_type   => 'BP'
349         );
350   end;
351   --
352 
353   -- Validation in addition to Row Handlers
354   --
355   --
356   -- Process Logic
357   --
358   ota_cfs_upd.upd
359   (p_effective_date                 => p_effective_date
360   ,p_conference_server_id           => p_conference_server_id
361   ,p_object_version_number          => l_object_version_number
362   ,p_name                           => p_name
363   ,p_url                            => p_url
364   ,p_type                           => p_type
365   ,p_business_group_id              => p_business_group_id
366   ,p_description                    => p_description
367   ,p_owc_site_id                    => p_owc_site_id
368   ,p_owc_auth_token                 => p_owc_auth_token
369   ,p_end_date_active                => p_end_date_active
370   ,p_attribute_category             => p_attribute_category
371   ,p_attribute1                     => p_attribute1
372   ,p_attribute2                     => p_attribute2
373   ,p_attribute3                     => p_attribute3
374   ,p_attribute4                     => p_attribute4
375   ,p_attribute5                     => p_attribute5
376   ,p_attribute6                     => p_attribute6
377   ,p_attribute7                     => p_attribute7
378   ,p_attribute8                     => p_attribute8
379   ,p_attribute9                     => p_attribute9
380   ,p_attribute10                    => p_attribute10
381   ,p_attribute11                    => p_attribute11
382   ,p_attribute12                    => p_attribute12
383   ,p_attribute13                    => p_attribute13
384   ,p_attribute14                    => p_attribute14
385   ,p_attribute15                    => p_attribute15
386   ,p_attribute16                    => p_attribute16
387   ,p_attribute17                    => p_attribute17
388   ,p_attribute18                    => p_attribute18
389   ,p_attribute19                    => p_attribute19
390   ,p_attribute20                    => p_attribute20
391   );
392 
393   ota_cft_upd.upd_tl
394   (p_effective_date                 => p_effective_date
395   ,p_language_code	               => USERENV('LANG')
396   ,p_conference_server_id           => p_conference_server_id
397   ,p_name                           => rtrim(p_name)
398   ,p_description                    => p_description
399   );
400 
401 
402 
403   --
404   -- Call After Process User Hook
405   --
406   begin
407   ota_conference_server_bk2.update_conference_server_a
408   (p_effective_date                 => l_effective_date
409   ,p_conference_server_id           => p_conference_server_id
410   ,p_name                           => p_name
411   ,p_description                    => p_description
412   ,p_url                            => p_url
413   ,p_type                           => p_type
414   ,p_owc_site_id                    => p_owc_site_id
415   ,p_owc_auth_token                 => p_owc_auth_token
416   ,p_end_date_active                => p_end_date_active
417   ,p_business_group_id              => p_business_group_id
418   ,p_object_version_number          => l_object_version_number
419   ,p_attribute_category             => p_attribute_category
420   ,p_attribute1                     => p_attribute1
421   ,p_attribute2                     => p_attribute2
422   ,p_attribute3                     => p_attribute3
423   ,p_attribute4                     => p_attribute4
424   ,p_attribute5                     => p_attribute5
425   ,p_attribute6                     => p_attribute6
426   ,p_attribute7                     => p_attribute7
427   ,p_attribute8                     => p_attribute8
428   ,p_attribute9                     => p_attribute9
429   ,p_attribute10                    => p_attribute10
430   ,p_attribute11                    => p_attribute11
431   ,p_attribute12                    => p_attribute12
432   ,p_attribute13                    => p_attribute13
433   ,p_attribute14                    => p_attribute14
434   ,p_attribute15                    => p_attribute15
435   ,p_attribute16                    => p_attribute16
436   ,p_attribute17                    => p_attribute17
437   ,p_attribute18                    => p_attribute18
438   ,p_attribute19                    => p_attribute19
439   ,p_attribute20                    => p_attribute20
440   );
441   exception
442     when hr_api.cannot_find_prog_unit then
443       hr_api.cannot_find_prog_unit_error
444         (p_module_name => 'UPDATE_CONFERENCE_SERVER'
445         ,p_hook_type   => 'AP'
446         );
447   end;
448 
449   --
450   -- When in validation only mode raise the Validate_Enabled exception
451   --
452   if p_validate then
453     raise hr_api.validate_enabled;
454   end if;
455   --
456   -- Set all output arguments
457   --
458   hr_utility.set_location(' Leaving:'||l_proc, 70);
459 exception
460   when hr_api.validate_enabled then
461     --
462     -- As the Validate_Enabled exception has been raised
463     -- we must rollback to the savepoint
464     --
465     rollback to UPDATE_CONFERENCE_SERVER;
466     --
467     -- Only set output warning arguments
468     -- (Any key or derived arguments must be set to null
469     -- when validation only mode is being used.)
470     --
471     p_object_version_number  := null;
472     hr_utility.set_location(' Leaving:'||l_proc, 80);
473   when others then
474     --
475     -- A validation or unexpected error has occured
476     --
477     rollback to UPDATE_CONFERENCE_SERVER;
478     p_object_version_number  := l_object_version_number;
479     hr_utility.set_location(' Leaving:'||l_proc, 90);
480     raise;
481 end update_conference_server;
482 --
483 -- ----------------------------------------------------------------------------
484 -- |-------------------< delete_conference_server >---------------------------|
485 -- ----------------------------------------------------------------------------
486 --
487 procedure delete_conference_server
488   (p_validate                      in     boolean  default false
489   ,p_conference_server_id          in     number
490   ,p_object_version_number         in     number
491   ) is
492   --
493   -- Declare cursors and local variables
494   --
495   l_proc                    varchar2(72) := g_package||' Delete Conference Server';
496   l_object_version_id       number;
497   --
498   --
499 begin
500   hr_utility.set_location('Entering:'|| l_proc, 10);
501   --
502   -- Issue a savepoint
503   --
504   savepoint DELETE_CONFERENCE_SERVER;
505   --
506   -- Truncate the time portion from all IN date parameters
507   --
508   --
509 
510   -- Call Before Process User Hook
511   --
512   begin
513     ota_conference_server_bk3.delete_conference_server_b
514     (p_conference_server_id        => p_conference_server_id
515     ,p_object_version_number       => p_object_version_number
516     );
517   exception
518     when hr_api.cannot_find_prog_unit then
519       hr_api.cannot_find_prog_unit_error
520         (p_module_name => 'DELETE_CONFERENCE_SERVER'
521         ,p_hook_type   => 'BP'
522         );
523   end;
524   --
525 
526   -- Validation in addition to Row Handlers
527   --
528   --
529   -- Process Logic
530   --
531  --
532   ota_cft_del.del_tl
533   (p_conference_server_id        => p_conference_server_id
534   );
535   --
536 
537   ota_cfs_del.del
538   (p_conference_server_id        => p_conference_server_id
539   ,p_object_version_number       => p_object_version_number
540   );
541   --
542 
543   -- Call After Process User Hook
544   --
545   begin
546   ota_conference_server_bk3.delete_conference_server_a
547   (p_conference_server_id        => p_conference_server_id
548   ,p_object_version_number       => p_object_version_number
549   );
550   exception
551     when hr_api.cannot_find_prog_unit then
552       hr_api.cannot_find_prog_unit_error
553         (p_module_name => 'DELETE_CONFERENCE_SERVER'
554         ,p_hook_type   => 'AP'
555         );
556   end;
557 
558   --
559   -- When in validation only mode raise the Validate_Enabled exception
560   --
561   if p_validate then
562     raise hr_api.validate_enabled;
563   end if;
564   --
565   -- Set all output arguments
566   --
567   --
568   hr_utility.set_location(' Leaving:'||l_proc, 170);
569 exception
570   when hr_api.validate_enabled then
571     --
572     -- As the Validate_Enabled exception has been raised
573     -- we must rollback to the savepoint
574     --
575     rollback to DELETE_CONFERENCE_SERVER;
576     --
577     -- Only set output warning arguments
578     -- (Any key or derived arguments must be set to null
579     -- when validation only mode is being used.)
580     --
581     hr_utility.set_location(' Leaving:'||l_proc, 180);
582   when others then
583     --
584     -- A validation or unexpected error has occured
585     --
586     rollback to DELETE_CONFERENCE_SERVER;
587     hr_utility.set_location(' Leaving:'||l_proc, 190);
588     raise;
589 end delete_conference_server;
590 --
591 end ota_conference_server_api;