1 Package AME_CONDITION_API as
2 /* $Header: amconapi.pkh 120.2 2006/12/23 09:58:45 avarri noship $ */
3 /*#
4 * This package contains the AME Condition APIs.
5 * @rep:scope public
6 * @rep:product AME
7 * @rep:displayname Condition
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< CREATE_AME_CONDITION >--------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a new condition.
17 *
18 * <p><b>Licensing</b><br>
19 * This API is available for use with any licensed component of the e-business
20 * suite.
21 *
22 * <p><b>Prerequisites</b><br>
23 * No known prerequisites.
24 *
25 * <p><b>Post Success</b><br>
26 * The condition is created.
27 *
28 * <p><b>Post Failure</b><br>
29 * The condition is not created and an error is raised.
30 *
31 * @param p_validate If true, then validation alone will be performed and
32 * the database will remain unchanged. If false and all validation checks pass,
33 * then the database will be modified. Default value is False.
34 * @param p_condition_key The unique key of the condition.
35 * @param p_condition_type This indicates the type of the condition.
36 * The AME_CONDITION_LOOKUP lookup type defines valid values.
37 * @param p_attribute_id This uniquely identifies the attribute on which the
38 * condition is based. This parameter is mandatory for ordinary and exception
39 * conditions. It is not required for list modification conditions.
40 * @param p_parameter_one For date, number and currency attributes
41 * this parameter contains the lower limit. For boolean attributes this
42 * parameter will be either 'true' or 'false'. For string attributes this
43 * parameter will be null. For list modification conditions this parameter
44 * indicates the approver order.
45 * @param p_parameter_two For date, number and currency attributes
46 * this parameter contains the upper limit. For boolean and string attributes
47 * this parameter will be null. For list modification conditions
48 * this parameter contains the role name.
49 * @param p_parameter_three This parameter is used for conditions that
50 * are based on currency attributes. For these conditions this parameter
51 * contains the currency code. For other conditions it will be null.
52 * @param p_include_upper_limit Indicates whether the upper limit is inclusive.
53 * Valid for the conditions based on number, date and currency attributes.
54 * @param p_include_lower_limit Indicates whether the lower limit is
55 * inclusive. Valid for the conditions based on number, date and
56 * currency attributes.
57 * @param p_string_value This parameter contains the allowed string value
58 * for string attributes.
59 * @param p_condition_id If p_validate is false, then this uniquely identifies
60 * the condition created. If p_validate is true, then it is set to null.
61 * @param p_con_start_date If p_validate is false, then it is set to the
62 * effective start date for the created condition. If p_validate is true,
63 * then it is set to null.
64 * @param p_con_end_date It is the date up to, which the condition is
65 * effective. If p_validate is false, then it is set to 31-Dec-4712.
66 * If p_validate is true, then it is set to null.
67 * @param p_con_object_version_number If p_validate is false, then it is set
68 * to version number of the created condition. If p_validate is true,
69 * then it is set to null.
70 * @param p_stv_start_date If p_validate is false, then it is set to the
71 * effective start date for the created string value. If p_validate is true,
72 * then it is set to null. Set only when string value is created.
73 * @param p_stv_end_date It is the date up to, which the string value is
74 * effective. If p_validate is false, then it is set to 31-Dec-4712.
75 * If p_validate is true, then it is set to null. Set only when string value
76 * is created.
77 * @param p_stv_object_version_number If p_validate is false, then it is
78 * set to version number of the created string value. If p_validate is true,
79 * then it is set to null. Set only when string value is created.
80 * @rep:displayname Create Ame Condition
81 * @rep:category BUSINESS_ENTITY AME_CONDITION
82 * @rep:lifecycle active
83 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
84 * @rep:scope public
85 */
86 --
87 -- {End Of Comments}
88 --
89 procedure create_ame_condition
90 (p_validate in boolean default false
91 ,p_condition_key in varchar2
92 ,p_condition_type in varchar2
93 ,p_attribute_id in number default null
94 ,p_parameter_one in varchar2 default null
95 ,p_parameter_two in varchar2 default null
96 ,p_parameter_three in varchar2 default null
97 ,p_include_upper_limit in varchar2 default null
98 ,p_include_lower_limit in varchar2 default null
99 ,p_string_value in varchar2 default null
100 ,p_condition_id out nocopy number
101 ,p_con_start_date out nocopy date
102 ,p_con_end_date out nocopy date
103 ,p_con_object_version_number out nocopy number
104 ,p_stv_start_date out nocopy date
105 ,p_stv_end_date out nocopy date
106 ,p_stv_object_version_number out nocopy number
107 );
108 --
109 -- ----------------------------------------------------------------------------
110 -- |------------------------<UPDATE_AME_CONDITION >---------------------------|
111 -- ----------------------------------------------------------------------------
112 --
113 -- {Start Of Comments}
114 /*#
115 * This API updates the given condition.
116 *
117 * <p><b>Licensing</b><br>
118 * This API is available for use with any licensed component of the e-business
119 * suite.
120 *
121 * <p><b>Prerequisites</b><br>
122 * The condition id should be valid.
123 *
124 * <p><b>Post Success</b><br>
125 * The given condition is updated.
126 *
127 * <p><b>Post Failure</b><br>
128 * The condition is not updated and an error is raised.
129 *
130 * @param p_validate If true, then validation alone will be performed and the
131 * database will remain unchanged. If false and all validation checks pass,
132 * then the database will be modified. Default value is False.
133 * @param p_condition_id This uniquely identifies the condition to be updated.
134 * @param p_parameter_one For date, number and currency attributes
135 * this parameter contains the lower limit.
136 * For boolean attributes this parameter will be either 'true' or 'false'.
137 * For string attributes this parameter will be null.
138 * For list modification conditions this parameter indicates the approver order.
139 * @param p_parameter_two For date, number and currency attributes
140 * this parameter contains the upper limit.
141 * For boolean and string attributes this parameter will be null.
142 * For list modification conditions this parameter contains the role name.
143 * @param p_parameter_three This parameter is used for conditions that are
144 * based on currency attributes. For these conditions this parameter contains
145 * the currency code. For other conditions it will be null.
146 * @param p_include_upper_limit Indicates whether the upper limit is inclusive.
147 * Valid for the conditions based on number, date and currency attributes.
148 * @param p_include_lower_limit Indicates whether the lower limit is inclusive.
149 * Valid for the conditions based on number, date and currency attributes.
150 * @param p_object_version_number Pass in the current version number of the
151 * condition to be updated. When the API completes, if p_validate is false,
152 * it will be set to the new version number of the updated condition. If
153 * p_validate is true, will be set to the same value which was passed in.
154 * @param p_start_date If p_validate is false, it is set to present date.
155 * If p_validate is true, it is set to the same date which was passed in.
156 * @param p_end_date It is the date up to, which the updated condition is
157 * effective. If p_validate is false, it is set to 31-Dec-4712.
158 * If p_validate is true, it is set to the same date which was passed in.
159 * @rep:displayname Update Ame Condition
160 * @rep:category BUSINESS_ENTITY AME_CONDITION
161 * @rep:lifecycle active
162 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
163 * @rep:scope public
164 */
165 --
166 -- {End Of Comments}
167 --
168 procedure update_ame_condition
169 (p_validate in boolean default false
170 ,p_condition_id in number
171 ,p_parameter_one in varchar2 default hr_api.g_varchar2
172 ,p_parameter_two in varchar2 default hr_api.g_varchar2
173 ,p_parameter_three in varchar2 default hr_api.g_varchar2
174 ,p_include_upper_limit in varchar2 default hr_api.g_varchar2
175 ,p_include_lower_limit in varchar2 default hr_api.g_varchar2
176 ,p_object_version_number in out nocopy number
177 ,p_start_date out nocopy date
178 ,p_end_date out nocopy date
179 );
180 --
181 -- ----------------------------------------------------------------------------
182 -- |-----------------------< DELETE_AME_CONDITION >---------------------------|
183 -- ----------------------------------------------------------------------------
184 --
185 -- {Start Of Comments}
186 /*#
187 * This API deletes the given condition.
188 *
189 * <p><b>Licensing</b><br>
190 * This API is available for use with any licensed component of the e-business
191 * suite.
192 *
193 * <p><b>Prerequisites</b><br>
194 * The condition id that identifies the condition should be valid.
195 *
196 * <p><b>Post Success</b><br>
197 * The condition is deleted.
198 *
199 * <p><b>Post Failure</b><br>
200 * The condition is not deleted and an error is raised.
201 *
202 * @param p_validate If true, then validation alone will be performed and the
203 * database will remain unchanged. If false and all validation checks pass,
204 * then the database will be modified. Default value is False.
205 * @param p_condition_id This uniquely identifies the condition to be deleted.
206 * @param p_object_version_number Pass in the current version number of the
207 * condition to be deleted. When the API completes if p_validate is false,
208 * will be set to the new version number of the deleted condition. If
209 * p_validate is true will be set to the same value which was passed in.
210 * @param p_start_date If p_validate is false, it is set to the date from
211 * which the deleted condition was effective.
212 * If p_validate is true, it is set to the same date which was passed in.
213 * @param p_end_date If p_validate is false, it is set to present date.
214 * If p_validate is true, it is set to the same date which was passed in.
215 * @rep:displayname Delete Ame Condition
216 * @rep:category BUSINESS_ENTITY AME_CONDITION
217 * @rep:lifecycle active
218 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
219 * @rep:scope public
220 */
221 --
222 -- {End Of Comments}
223 --
224 procedure delete_ame_condition
225 (p_validate in boolean default false
226 ,p_condition_id in number
227 ,p_object_version_number in out nocopy number
228 ,p_start_date out nocopy date
229 ,p_end_date out nocopy date
230 );
231 --
232 -- ----------------------------------------------------------------------------
233 -- |----------------------< CREATE_AME_STRING_VALUE >-------------------------|
234 -- ----------------------------------------------------------------------------
235 --
236 -- {Start Of Comments}
237 /*#
238 * This API creates and adds a new string value to the given condition.
239 *
240 * <p><b>Licensing</b><br>
241 * This API is available for use with any licensed component of the e-business
242 * suite.
243 *
244 * <p><b>Prerequisites</b><br>
245 * The condition id that identifies the condition should be valid.
246 *
247 * <p><b>Post Success</b><br>
248 * The string value is created and added to the given condition.
249 *
250 * <p><b>Post Failure</b><br>
251 * The string value is not created and an error is raised.
252 *
253 * @param p_validate If true, then validation alone will be performed and the
254 * database will remain unchanged. If false and all validation checks pass,
255 * then the database will be modified. Default value is false.
256 * @param p_condition_id This uniquely identifies the condition to which
257 * the string value is to be added.
258 * @param p_string_value This parameter contains the string value that is to be
259 * added for the condition.
260 * @param p_object_version_number If p_validate is false, then it is set to
261 * version number of the created string value. If p_validate is true,
262 * then it is set to null.
263 * @param p_start_date If p_validate is false, then it is set to the
264 * effective start date for the created string value. If p_validate is true,
265 * then it is set to null.
266 * @param p_end_date It is the date up to, which the string value is effective.
267 * If p_validate is false, then it is set to 31-Dec-4712. If p_validate
268 * is true, then it is set to null.
269 * @rep:displayname Create Ame String Value
270 * @rep:category BUSINESS_ENTITY AME_CONDITION
271 * @rep:lifecycle active
272 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
273 * @rep:scope public
274 */
275 --
276 -- {End Of Comments}
277 --
278 procedure create_ame_string_value
279 (p_validate in boolean default false
280 ,p_condition_id in number
281 ,p_string_value in varchar2
282 ,p_object_version_number out nocopy number
283 ,p_start_date out nocopy date
284 ,p_end_date out nocopy date
285 );
286 --
287 -- ----------------------------------------------------------------------------
288 -- |----------------------< DELETE_AME_STRING_VALUE >-------------------------|
289 -- ----------------------------------------------------------------------------
290 --
291 -- {Start Of Comments}
292 /*#
293 * This API deletes a string value associated with the given condition.
294 *
295 * <p><b>Licensing</b><br>
296 * This API is available for use with any licensed component of the e-business
297 * suite.
298 *
299 * <p><b>Prerequisites</b><br>
300 * The condition id that identifies the condition should be valid.
301 *
302 * <p><b>Post Success</b><br>
303 * The string value associated with the given condition is deleted.
304 *
305 * <p><b>Post Failure</b><br>
306 * The string value is not deleted and an error is raised.
307 *
308 * @param p_validate If true, then validation alone will be performed and the
309 * database will remain unchanged. If false and all validation checks pass,
310 * then the database will be modified. Default value is false.
311 * @param p_condition_id This uniquely identifies the condition to which
312 * the string value is attached.
313 * @param p_string_value The string value that is to be deleted
314 * @param p_object_version_number Pass in the current version number of the
315 * string value to be deleted. When the API completes if p_validate is false,
316 * will be set to the new version number of the deleted string value. If
317 * p_validate is true will be set to the same value which was passed in.
318 * @param p_start_date If p_validate is false, it is set to
319 * the date from which the deleted string value was effective.
320 * If p_validate is true, it is set to the same date which was passed in.
321 * @param p_end_date If p_validate is false, it is set to present date.
322 * If p_validate is true, it is set to the same date which was passed in.
323 * @rep:displayname Delete Ame String Value
324 * @rep:category BUSINESS_ENTITY AME_CONDITION
325 * @rep:lifecycle active
326 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
327 * @rep:scope public
328 */
329 --
330 -- {End Of Comments}
331 --
332 procedure delete_ame_string_value
333 (p_validate in boolean default false
334 ,p_condition_id in number
335 ,p_string_value in varchar2
336 ,p_object_version_number in out nocopy number
337 ,p_start_date out nocopy date
338 ,p_end_date out nocopy date
339 );
340 end AME_CONDITION_API;