1 Package ame_attribute_api AUTHID CURRENT_USER as
2 /* $Header: amatrapi.pkh 120.3 2006/12/23 09:54:27 avarri noship $ */
3 /*#
4 * This package contains AME Attribute APIs.
5 * @rep:scope public
6 * @rep:product AME
7 * @rep:displayname Attribute
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-----------------------< create_ame_attribute >---------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 /*#
15 * This API creates a new attribute and creates an attribute usage
16 * for a given transaction type.
17 *
18 * <p><b>Licensing</b><br>
19 * This API is available for use with any licensed component of the
20 * e-business suite.
21 *
22 * <p><b>Prerequisites</b><br>
23 * Application Id should be valid.
24 *
25 * <p><b>Post Success</b><br>
26 * The attribute and the usage is created.
27 *
28 * <p><b>Post Failure</b><br>
29 * The attribute is not created and an error is raised.
30 *
31 * @param P_VALIDATE If true, then validation alone will be performed and the
32 * database will remain unchanged. If false and all validation checks pass,
33 * then the database will be modified.
34 * @param P_LANGUAGE_CODE Specifies to which language the translation values
35 * apply. You can set to the base or any installed language. The default value
36 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
37 * value.
38 * @param P_NAME This is the unique attribute name given to an attribute
39 * while creating it.
40 * @param P_DESCRIPTION This parameter contains the description for the
41 * attribute.
42 * @param P_ATTRIBUTE_TYPE This parameter contains the type of the attribute.
43 * Valid values of attribute type are defined in AME_ATTRIBUTE_DATA_TYPE
44 * lookup type.
45 * @param P_ITEM_CLASS_ID This uniquely identifies the item class to which
46 * the attribute belongs.
47 * @param P_APPROVER_TYPE_ID This uniquely identifies the approver type
48 * associated with the attribute.
49 * @param P_APPLICATION_ID This uniquely identifies the transaction type for
50 * which attribute usage is to be created.
51 * @param P_IS_STATIC This parameter tells whether the attribute usage is
52 * static or dynamic.
53 * @param P_QUERY_STRING This parameter is the query string for the attribute
54 * usage and should not be null when P_IS_STATIC is false.
55 * @param P_USER_EDITABLE This parameter tells whether the attribute is user
56 * editable or not.
57 * @param p_VALUE_SET_ID This uniquely identifies the value set associated
58 * with the attribute usage.
59 * @param P_ATTRIBUTE_ID If p_validate is false, then this uniquely
60 * identifies the attribute created. If p_validate is true, then set to null.
61 * @param P_ATR_OBJECT_VERSION_NUMBER If p_validate is false, then set to
62 * version number of the created attribute. If p_validate is true,
63 * then set to null.
64 * @param P_ATR_START_DATE If p_validate is false, then set to the start date
65 * for the created attribute. If p_validate is true, then set to null.
66 * @param P_ATR_END_DATE It is the date up to, which the attribute is
67 * effective. If p_validate is false, then it is set to 31-Dec-4712.
68 * If p_validate is true, then it is set to null.
69 * @param P_ATU_OBJECT_VERSION_NUMBER If p_validate is false, then set to
70 * version number of the created attribute usage. If p_validate is true,
71 * then set to null.
72 * @param P_ATU_START_DATE If p_validate is false, then set to the effective
73 * start date for the created attribute usage. If p_validate is true,
74 * then set to null.
75 * @param P_ATU_END_DATE It is the date up to, which the attribute usage is
76 * effective. If p_validate is false, then it is set to 31-Dec-4712. If
77 * p_validate is true, then it is set to null.
78 * @rep:displayname Create Ame Attribute
79 * @rep:category BUSINESS_ENTITY AME_ATTRIBUTE
80 * @rep:lifecycle active
81 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
82 * @rep:scope public
83 */
84 --
85 -- {End Of Comments}
86 --
87 procedure create_ame_attribute
88 (p_validate in boolean default false
89 ,p_language_code in varchar2 default hr_api.userenv_lang
90 ,p_name in varchar2
91 ,p_description in varchar2
92 ,p_attribute_type in varchar2
93 ,p_item_class_id in number
94 ,p_approver_type_id in number default null
95 ,p_application_id in number default null
96 ,p_is_static in varchar2 default ame_util.booleanTrue
97 ,p_query_string in varchar2 default null
98 ,p_user_editable in varchar2 default ame_util.booleanTrue
99 ,p_value_set_id in number default null
100 ,p_attribute_id out nocopy number
101 ,p_atr_object_version_number out nocopy number
102 ,p_atr_start_date out nocopy date
103 ,p_atr_end_date out nocopy date
104 ,p_atu_object_version_number out nocopy number
105 ,p_atu_start_date out nocopy date
106 ,p_atu_end_date out nocopy date
107 );
108 --
109 -- ----------------------------------------------------------------------------
110 -- |----------------------< create_ame_attribute_usage >----------------------|
111 -- ----------------------------------------------------------------------------
112 -- {Start Of Comments}
113 /*#
114 * This API creates an attribute usage for a given transaction type for an
115 * existing attribute.
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 * Application Id and attribute Id should be valid.
123 *
124 * <p><b>Post Success</b><br>
125 * Attribute usage is created.
126 *
127 * <p><b>Post Failure</b><br>
128 * Attribute Usage is not created and 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.
133 * @param P_ATTRIBUTE_ID If p_validate is false, then this uniquely identifies
134 * the attribute for which a usage has to be created. If p_validate is true,
135 * then it is set to null.
136 * @param P_APPLICATION_ID This uniquely identifies the transaction type for
137 * which attribute usage is to be created.
138 * @param P_IS_STATIC This parameter tells whether the attribute is static or
139 * dynamic.
140 * @param P_QUERY_STRING This parameter is the query string for the attribute
141 * and should not be null when P_IS_STATIC is false.
142 * @param P_USER_EDITABLE This parameter tells whether the attribute is user
143 * editable or not.
144 * @param p_VALUE_SET_ID This uniquely identifies the value set associated
145 * with the attribute.
146 * @param P_OBJECT_VERSION_NUMBER If p_validate is false, then set to
147 * version number of the created item class usage. If p_validate is true,
148 * then set to null.
149 * @param P_START_DATE If p_validate is false, then set to the start date
150 * for the created attribute usage. If p_validate is true, then set to null.
151 * @param P_END_DATE It is the date up to, which the attribute usage is
152 * effective. If p_validate is false, then it is set to 31-Dec-4712.
153 * If p_validate is true, then it is set to null.
154 * @rep:displayname Create Ame Attribute Usage
155 * @rep:category BUSINESS_ENTITY AME_ATTRIBUTE
156 * @rep:lifecycle active
157 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
158 * @rep:scope public
159 */
160 --
161 -- {End Of Comments}
162 --
163 procedure create_ame_attribute_usage
164 (p_validate in boolean default false
165 ,p_attribute_id in number
166 ,p_application_id in number
167 ,p_is_static in varchar2 default ame_util.booleanTrue
168 ,p_query_string in varchar2 default null
169 ,p_user_editable in varchar2 default ame_util.booleanTrue
170 ,p_value_set_id in number default null
171 ,p_object_version_number out nocopy number
172 ,p_start_date out nocopy date
173 ,p_end_date out nocopy date
174 );
175 --
176 -- ----------------------------------------------------------------------------
177 -- |--------------------------< update_ame_attribute >------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start Of Comments}
180 /*#
181 * This API Updates the attribute definition.
182 *
183 * <p><b>Licensing</b><br>
184 * This API is available for use with any licensed component of the e-business
185 * suite.
186 *
187 * <p><b>Prerequisites</b><br>
188 * Attribute Id should be valid.
189 *
190 * <p><b>Post Success</b><br>
191 * Updates the attribute Successfully.
192 *
193 * <p><b>Post Failure</b><br>
194 * The attribute is not updated and an error is raised.
195 *
196 * @param P_VALIDATE If true, then validation alone will be performed and the
197 * database will remain unchanged. If false and all validation checks pass,
198 * then the database will be modified.
199 * @param P_LANGUAGE_CODE Specifies to which language the translation values
200 * apply. You can set to the base or any installed language. The default value
201 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
202 * value.
203 * @param P_ATTRIBUTE_ID This uniquely identifies the attribute to be updated.
204 * @param P_DESCRIPTION This is the description of the attribute.
205 * @param P_OBJECT_VERSION_NUMBER Pass in the current version number of the
206 * attribute to be updated. When the API completes, if p_validate is
207 * false, it will be set to the new version number of the updated
208 * attribute. If p_validate is true, will be set to the same value
209 * which was passed in.
210 * @param P_START_DATE If p_validate is false, then set to the start date
211 * for the updated attribute. If p_validate is true, then set to null.
212 * @param P_END_DATE It is the date up to, which the attribute is
213 * effective. If p_validate is false, then it is set to 31-Dec-4712.
214 * If p_validate is true, then it is set to null.
215 * @rep:displayname Update Ame Attribute
216 * @rep:category BUSINESS_ENTITY AME_ATTRIBUTE
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 update_ame_attribute
225 (p_validate in boolean default false
226 ,p_language_code in varchar2 default hr_api.userenv_lang
227 ,p_attribute_id in number
228 ,p_description in varchar2 default hr_api.g_varchar2
229 ,p_object_version_number in out nocopy number
230 ,p_start_date out nocopy date
231 ,p_end_date out nocopy date
232 );
233 --
234 -- ----------------------------------------------------------------------------
235 -- |--------------------------< update_ame_attribute_usage >------------------|
236 -- ----------------------------------------------------------------------------
237 -- {Start Of Comments}
238 /*#
239 * This API updates the attribute usage definition.
240 *
241 * <p><b>Licensing</b><br>
242 * This API is available for use with any licensed component of the e-business
243 * suite.
244 *
245 * <p><b>Prerequisites</b><br>
246 * Application Id and attribute Id should be valid.
247 *
248 * <p><b>Post Success</b><br>
249 * Attribute usage is updated successfully for the entered transaction type.
250 *
251 * <p><b>Post Failure</b><br>
252 * The attribute usage is not updated and an error is raised.
253 *
254 * @param P_VALIDATE If true, then validation alone will be performed and the
255 * database will remain unchanged. If false and all validation checks pass,
256 * then the database will be modified.
257 * @param P_ATTRIBUTE_ID This uniquely identifies the attribute for the
258 * application id.
259 * @param P_APPLICATION_ID This uniquely identifies the transaction type for
260 * which attribute usage is to be updated.
261 * @param P_IS_STATIC This parameter tells whether the attribute usage is
262 * static or dynamic.
263 * @param P_QUERY_STRING This parameter is the query string for the attribute
264 * usage and should not be null when P_IS_STATIC is false.
265 * @param p_VALUE_SET_ID This uniquely identifies the value set associated
266 * with the attribute usage.
267 * @param P_OBJECT_VERSION_NUMBER Pass in the current version number of the
268 * attribute usage to be updated. When the API completes, if p_validate is
269 * false, it will be set to the new version number of the updated
270 * attribute usage. If p_validate is true, will be set to the same value
271 * which was passed in.
272 * @param P_START_DATE If p_validate is false, then set to the start date
273 * for the updated attribute usage. If p_validate is true, then set to null.
274 * @param P_END_DATE It is the date up to, which the attribute usage is
275 * effective. If p_validate is false, then it is set to 31-Dec-4712.
276 * If p_validate is true, then it is set to null.
277 * @rep:displayname Update Ame Attribute Usage
278 * @rep:category BUSINESS_ENTITY AME_ATTRIBUTE
279 * @rep:lifecycle active
280 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
281 * @rep:scope public
282 */
283 --
284 -- {End Of Comments}
285 --
286 procedure update_ame_attribute_usage
287 (p_validate in boolean default false
288 ,p_attribute_id in number
289 ,p_application_id in number
290 ,p_is_static in varchar2 default ame_util.booleanTrue
291 ,p_query_string in varchar2 default null
292 ,p_value_set_id in number default null
293 ,p_object_version_number in out nocopy number
294 ,p_start_date out nocopy date
295 ,p_end_date out nocopy date
296 );
297 --
298 -- ----------------------------------------------------------------------------
299 -- |--------------------------< delete_ame_attribute_usage >------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 /*#
303 * This API deletes the attribute usage from the given transaction type.
304 *
305 * This API delete the attribute usage from the transaction type and if this
306 * usage is the last usage for the attribute and no other transaction type is
307 * using this attribute then the attribute is also deleted.
308 *
309 * <p><b>Licensing</b><br>
310 * This API is available for use with any licensed component of the e-business
311 * suite.
312 *
313 * <p><b>Prerequisites</b><br>
314 * Application Id and attribute Id should be valid.
315 *
316 * <p><b>Post Success</b><br>
317 * Deletes the attribute usage successfully.
318 *
319 * <p><b>Post Failure</b><br>
320 * The attribute usage is not deleted and an error is raised.
321 *
322 * @param P_VALIDATE If true, then validation alone will be performed and the
323 * database will remain unchanged. If false and all validation checks pass,
324 * then the database will be modified.
325 * @param P_ATTRIBUTE_ID This uniquely identifies the attribute.
326 * @param P_APPLICATION_ID This uniquely identifies the transaction type for
327 * which attribute usage is to be deleted.
328 * @param P_OBJECT_VERSION_NUMBER Pass in the current version number of the
329 * attribute usage to be deleted. When the API completes, if p_validate
330 * is false, it will be set to the new version number of the deleted
331 * attribute usage. If p_validate is true, will be set to the same value
332 * which was passed in.
333 * @param P_START_DATE If p_validate is false, then set to the start date
334 * for the deleted attribute usage. If p_validate is true, then set to null.
335 * @param P_END_DATE f p_validate is false, it is set to present date.
336 * If p_validate is true, it is set to the same date which was passed in.
337 * @rep:displayname Delete Ame Attribute Usage
338 * @rep:category BUSINESS_ENTITY AME_ATTRIBUTE
339 * @rep:lifecycle active
340 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
341 * @rep:scope public
342 */
343 --
344 -- {End Of Comments}
345 --
346 procedure delete_ame_attribute_usage
347 (p_validate in boolean default false
348 ,p_attribute_id in number
349 ,p_application_id in number
350 ,p_object_version_number in out nocopy number
351 ,p_start_date out nocopy date
352 ,p_end_date out nocopy date
353 );
354 --
355 -- -----------------------------------------------------------------------
356 -- |---------------------------< updateUseCount >------------------------|
357 -- -----------------------------------------------------------------------
358 procedure updateUseCount(p_attribute_id in integer
359 ,p_application_id in integer
360 ,p_atu_object_version_number in integer);
361 --
362 --
363 end ame_attribute_api;