1 Package irc_cmp_bus as
2 /* $Header: ircmprhi.pkh 120.0 2007/11/19 11:40:35 sethanga noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< set_security_group_id >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
11 -- group context.
12 --
13 -- Prerequisites:
14 -- The primary key identified by p_communication_property_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_communication_property_id
19 --
20 --
21 -- Post Success:
22 -- The security_group_id will be set in CLIENT_INFO.
23 --
24 -- Post Failure:
25 -- An error is raised if the value does not exist.
26 --
27 -- Access Status:
28 -- Internal Development Use Only.
29 --
30 -- {End Of Comments}
31 -- ---------------------------------------------------------------------------
32 procedure set_security_group_id
33 (p_communication_property_id in number
34 ,p_associated_column1 in varchar2 default null
35 );
36 --
37 --
38 -- ---------------------------------------------------------------------------
39 -- |---------------------< return_legislation_code >-------------------------|
40 -- ---------------------------------------------------------------------------
41 -- {Start Of Comments}
42 --
43 -- Description:
44 -- Return the legislation code for a specific primary key value
45 --
46 -- Prerequisites:
47 -- The primary key identified by p_communication_property_id
48 -- already exists.
49 --
50 -- In Arguments:
51 -- p_communication_property_id
52 --
53 --
54 -- Post Success:
55 -- The business group's legislation code will be returned.
56 --
57 -- Post Failure:
58 -- An error is raised if the value does not exist.
59 --
60 -- Access Status:
61 -- Internal Development Use Only.
62 --
63 -- {End Of Comments}
64 -- ---------------------------------------------------------------------------
65 FUNCTION return_legislation_code
66 (p_communication_property_id in number
67 ) RETURN varchar2;
68 --
69 -- ---------------------------------------------------------------------------
70 -- |----------------------------< chk_default_comm_status >------------------|
71 -- ---------------------------------------------------------------------------
72 --
73 -- {Start Of Comments}
74 --
75 -- Description:
76 -- This process validates that 'status' exists in the lookup
77 -- IRC_COMM_DEFAULT_COMM_STATUS.
78 --
79 -- Pre Conditions:
80 -- None.
81 --
82 -- In Parameters:
83 -- status varchar2(50) default communication status
84 -- communication_property_id number(15) PK of irc_comm_properties
85 -- effective_date date date record effective
86 -- object_version_number number(9) version of row
87 --
88 -- Post Success:
89 -- Processing continues.
90 --
91 -- Post Failure:
92 -- An application error will be raised for the following faliure conditions:
93 -- 1: p_status does not exist in lookup IRC_COMM_DEFAULT_COMM_STATUS
94 --
95 -- Access Status:
96 -- Internal Table Handler Use Only.
97 Procedure chk_default_comm_status(p_status in varchar2,
98 p_communication_property_id in number,
99 p_effective_date in date,
100 p_object_version_number in number);
101 --
102 -- ---------------------------------------------------------------------------
103 -- |----------------------------< chk_allow_add_recipients >-----------------|
104 -- ---------------------------------------------------------------------------
105 --
106 -- {Start Of Comments}
107 --
108 -- Description:
109 -- This process validates that 'allow_add_recipients' exists in the lookup
110 -- IRC_COMM_ALLOW_ADD_RECIPIENTS.
111 --
112 -- Pre Conditions:
113 -- None.
114 --
115 -- In Parameters:
116 -- allow_add_recipients varchar2(50) allow add recipients flag
117 -- communication_property_id number(15) PK of irc_comm_properties
118 -- effective_date date date record effective
119 -- object_version_number number(9) version of row
120 --
121 -- Post Success:
122 -- Processing continues.
123 --
124 -- Post Failure:
125 -- An application error will be raised for the following faliure conditions:
126 -- 1: p_flag does not exist in lookup IRC_COMM_ALLOW_ADD_RECIPIENTS.
127 --
128 -- Access Status:
129 -- Internal Table Handler Use Only.
130 Procedure chk_allow_add_recipients(p_allow_add_recipients in varchar2,
131 p_communication_property_id in number,
132 p_effective_date in date,
133 p_object_version_number in number);
134 --
135 -- ---------------------------------------------------------------------------
136 -- |----------------------------< chk_auto_notification_flag >--------------|
137 -- ---------------------------------------------------------------------------
138 --
139 -- {Start Of Comments}
140 --
141 -- Description:
142 -- This process validates that 'auto_notification_flag' exists in the lookup
143 -- YES_NO.
144 --
145 -- Pre Conditions:
146 -- None.
147 --
148 -- In Parameters:
149 -- auto_notification_flag varchar2(1) auto_notification_flag
150 -- communication_property_id number(15) PK of irc_comm_properties
151 -- effective_date date date record effective
152 -- object_version_number number(9) version of row
153 --
154 -- Post Success:
155 -- Processing continues.
156 --
157 -- Post Failure:
158 -- An application error will be raised for the following faliure conditions:
159 -- 1: p_auto_notification_flag does not exist in lookup YES_NO
160 --
161 -- Access Status:
162 -- Internal Table Handler Use Only.
163 Procedure chk_auto_notification_flag(p_auto_notification_flag in varchar2,
164 p_communication_property_id in number,
165 p_effective_date in date,
166 p_object_version_number in number);
167 --
168 -- ---------------------------------------------------------------------------
169 -- |----------------------------< chk_default_moderator >-----------------|
170 -- ---------------------------------------------------------------------------
171 --
172 -- {Start Of Comments}
173 --
174 -- Description:
175 -- This process validates that 'default_moderator' exists in the lookup
176 -- IRC_COMM_DEFAULT_MODERATOR.
177 --
178 -- Pre Conditions:
179 -- None.
180 --
181 -- In Parameters:
182 -- default_moderator varchar2(50) default_moderator
183 -- communication_property_id number(15) PK of irc_comm_properties
184 -- effective_date date date record effective
185 -- object_version_number number(9) version of row
186 --
187 -- Post Success:
188 -- Processing continues.
189 --
190 -- Post Failure:
191 -- An application error will be raised for the following faliure conditions:
192 -- 1: p_default_moderator does not exist in lookup IRC_COMM_DEFAULT_MODERATOR.
193 --
194 -- Access Status:
195 -- Internal Table Handler Use Only.
196 Procedure chk_default_moderator(p_default_moderator in varchar2,
197 p_communication_property_id in number,
198 p_effective_date in date,
199 p_object_version_number in number) ;
200 --
201 -- ----------------------------------------------------------------------------
202 -- |-----------------------------< chk_object_id >-----------------------------|
203 -- ----------------------------------------------------------------------------
204 --
205 -- {Start Of Comments}
206 --
207 -- Description:
208 -- This procedure is used to ensure-
209 -- 1) that object_id exists in PER_ALL_VACANCIES
210 -- when the object_type is 'VACANCY'
211 -- 2) that combination of (object_id,object_type) is
212 -- unique.
213
214 -- Pre Conditions:
215 --
216 -- In Arguments:
217 -- p_object_id
218 -- p_object_type
219 -- Post Success:
220 -- Processing continues if object_id is valid.
221 --
222 -- Post Failure:
223 -- An application error is raised if object_id is invalid.
224 --
225 -- {End Of Comments}
226 -- ----------------------------------------------------------------------------
227 Procedure chk_object_id
228 (p_object_id in irc_comm_properties.object_id%TYPE,
229 p_object_type in irc_comm_properties.object_type%TYPE
230 );
231 --
232 -- ----------------------------------------------------------------------------
233 -- |-----------------------------< chk_object_type >-----------------------------|
234 -- ----------------------------------------------------------------------------
235 --
236 -- {Start Of Comments}
237 --
238 -- Description:
239 -- This procedure is used to ensure that object_type has one of the following
240 -- values :
241 -- 'VACANCY'
242 --
243 -- Pre Conditions:
244 --
245 -- In Arguments:
246 -- p_object_type
247 --
248 -- Post Success:
249 -- Processing continues if object_type is valid.
250 --
251 -- Post Failure:
252 -- An application error is raised if object_type is invalid.
253 --
254 -- {End Of Comments}
255 -- ----------------------------------------------------------------------------
256 Procedure chk_object_type
257 (p_object_type in irc_comm_properties.object_type%TYPE
258 );
259 --
260 -- ----------------------------------------------------------------------------
261 -- |---------------------------< insert_update_validate >----------------------------|
262 -- ----------------------------------------------------------------------------
263 -- {Start of comments}
264 --
265 -- Description:
266 -- This procedure groups calls to various business-rules validation procedures
267 -- which are commonly called by insert_validate and update_validate procedures.
268 --
269 -- Prerequisites:
270 -- This private procedure is called from insert_validate and update_validate
271 -- procedures.
272 --
273 -- In Parameters:
274 -- A Pl/Sql record structure.
275 --
276 -- Post Success:
277 -- Processing continues.
278 --
279 -- Post Failure:
280 -- If a business rules fails the error will not be handled by this procedure
281 -- unless explicity coded.
282 --
283 -- Access Status:
284 -- Internal Row Handler Use Only.
285 --
286 -- {End of comments}
287 -- ----------------------------------------------------------------------------
288 Procedure insert_update_validate
289 (p_effective_date in date
290 ,p_rec in irc_cmp_shd.g_rec_type
291 );
292 --
293 -- ----------------------------------------------------------------------------
294 -- |---------------------------< insert_validate >----------------------------|
295 -- ----------------------------------------------------------------------------
296 -- {Start of comments}
297 --
298 -- Description:
299 -- This procedure controls the execution of all insert business rules
300 -- validation.
301 --
302 -- Prerequisites:
303 -- This private procedure is called from ins procedure.
304 --
305 -- In Parameters:
306 -- A Pl/Sql record structure.
307 --
308 -- Post Success:
309 -- Processing continues.
310 --
311 -- Post Failure:
312 -- If a business rules fails the error will not be handled by this procedure
313 -- unless explicity coded.
314 --
315 -- Developer Implementation Notes:
316 -- For insert, your business rules should be executed from this procedure
317 -- and should ideally (unless really necessary) just be straight procedure
318 -- or function calls. Try and avoid using conditional branching logic.
319 --
320 -- Access Status:
321 -- Internal Row Handler Use Only.
322 --
323 -- {End of comments}
324 -- ----------------------------------------------------------------------------
325 Procedure insert_validate
326 (p_effective_date in date
327 ,p_rec in irc_cmp_shd.g_rec_type
328 );
329 --
330 -- ----------------------------------------------------------------------------
331 -- |---------------------------< update_validate >----------------------------|
332 -- ----------------------------------------------------------------------------
333 -- {Start Of Comments}
334 --
335 -- Description:
336 -- This procedure controls the execution of all update business rules
337 -- validation.
338 --
339 -- Prerequisites:
340 -- This private procedure is called from upd procedure.
341 --
342 -- In Parameters:
343 -- A Pl/Sql record structure.
344 --
345 -- Post Success:
346 -- Processing continues.
347 --
348 -- Post Failure:
349 -- If a business rules fails the error will not be handled by this procedure
350 -- unless explicity coded.
351 --
352 -- Access Status:
353 -- Internal Row Handler Use Only.
354 --
355 -- {End Of Comments}
356 -- ----------------------------------------------------------------------------
357 Procedure update_validate
358 (p_effective_date in date
359 ,p_rec in irc_cmp_shd.g_rec_type
360 );
361 --
362 -- ----------------------------------------------------------------------------
363 -- |---------------------------< delete_validate >----------------------------|
364 -- ----------------------------------------------------------------------------
365 -- {Start Of Comments}
366 --
367 -- Description:
368 -- This procedure controls the execution of all delete business rules
369 -- validation.
370 --
371 -- Prerequisites:
372 -- This private procedure is called from del procedure.
373 --
374 -- In Parameters:
375 -- A Pl/Sql record structure.
376 --
377 -- Post Success:
378 -- Processing continues.
379 --
380 -- Post Failure:
381 -- If a business rules fails the error will not be handled by this procedure
382 -- unless explicity coded.
383 --
384 -- Developer Implementation Notes:
385 -- For delete, your business rules should be executed from this procedure
386 -- and should ideally (unless really necessary) just be straight procedure
387 -- or function calls. Try and avoid using conditional branching logic.
388 --
389 -- Access Status:
390 -- Internal Row Handler Use Only.
391 --
392 -- {End Of Comments}
393 -- ----------------------------------------------------------------------------
394 Procedure delete_validate
395 (p_rec in irc_cmp_shd.g_rec_type
396 );
397 --
398 end irc_cmp_bus;