1 Package hxc_pref_hierarchies_api as
2 /* $Header: hxchphapi.pkh 120.0 2005/05/29 05:36:53 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-----------------------------< get_node_data >----------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This enhancement is to allow the use of the API to load seed data easily.
11 -- This procedure gets the ID of a node in the hierarchy given the full name
12 -- of the Preference.get_node_data takes the full name of the preference
13 -- hierarchy node such as A.B.C and returns the id of the node C in A.B.C
14 -- So now if node D needs to be added as the child of C ,then id of the node
15 -- C becomes the p_parent_pref_hierarchy_id for node D.
16 --
17 -- Pre Conditions:
18 -- None
19 --
20 -- In Arguments:
21 -- preference_full_name
22 -- p_name
23 --
24 -- Post Success:
25 -- Processing continues if the ID of a preference is determined
26 --
27 -- Post Failure:
28 -- An application error is raised for no_data_found or invalid data
29 --
30 -- {End Of Comments}
31 -- ----------------------------------------------------------------------------
32 Procedure get_node_data
33 (
34 p_preference_full_name in varchar2
35 ,p_name in varchar2
36 ,p_business_group_id in number
37 ,p_legislation_code in varchar2
38 ,p_mode out nocopy varchar2
39 ,p_pref_hierarchy_id out nocopy number
40 ,p_parent_pref_hierarchy_id out nocopy number
41 ,p_object_version_number out nocopy number
42 );
43 --
44 -- ----------------------------------------------------------------------------
45 -- |-----------------------< create_pref_hierarchies >------------------------|
46 -- ----------------------------------------------------------------------------
47 -- {Start Of Comments}
48 --
49 -- Description:
50 --
51 -- This API creates the Preference Hierarchies.
52 --
53 -- Prerequisites:
54 --
55 -- None
56 --
57 -- In Parameters:
58 -- Name Reqd Type Description
59 --
60 -- p_validate No boolean IF TRUE then the database
61 -- remains unchanged.IF FALSE
62 -- then a new Pref Hierarchy is
63 -- created.Default is FALSE.
64 -- p_pref_hierarchy_id Yes number Primary Key for entity
65 -- p_type No varchar2 Specifies the position of the
66 -- node in the hierarchy.
67 -- p_name Yes varchar2 Name of the pref hierarchy
68 -- p_parent_pref_hierarchy_id No number Reference to another row of
69 -- this table
70 -- p_edit_allowed Yes boolean This flag indicates whether
71 -- or not the user can edit the
72 -- instance of the preference
73 -- p_displayed Yes boolean This flag indicates whether
74 -- or not the preference instance
75 -- is displayed on the user pref
76 -- screen
77 -- p_pref_definition_id No number Only populated for leaf nodes
78 -- p_attribute_category No varchar2 Attribute Category for
79 -- attribute columns.Only popula
80 -- ted for leaf nodes.
81 -- p_attribute1..n No varchar2 Values for preferences.
82 -- Only populated for leaf nodes
83 -- p_orig_pref_hierarchy_id No number Used for Setup Form.Stores the
84 -- original pref_hierarcy_id
85 -- while pasting nodes along with
86 -- their child nodes
87 -- p_orig_parent_hierarchy_id No number Used for Setup Form.Stores the
88 -- original parent_pref_hierarcy_
89 -- id while pasting nodes along
90 -- with their child nodes
91 -- p_object_version_number No number Object Version Number
92 -- p_effective_date No date Effective Date
93 -- p_top_level_parent_id No number pref_hierarchy_Id of the top
94 -- level parent.Populated for leaf
95 -- nodes only.
96 -- p_code No varchar2 Code indicates the code for
97 -- the pref_definition_id and
98 -- populated for leaf nodes only.
99 --
100 -- Post Success:
101 --
102 -- The OUT PARAMETERS set,after the pref hierachy has been created successfully,-- are:
103 --
104 -- Name Type Description
105 --
106 -- p_pref_hierarchy_id number Primary key of the new pref
107 -- hierarchy
108 -- p_object_version_number number Object Version Number of the new
109 -- pref hierarchy
110 --
111 -- Post Failure:
112 --
113 -- The pref hierarchy will not be created and an application error is raised --
114 -- Access Status:
115 -- Public.
116 --
117 -- {End Of Comments}
118 --
119 procedure create_pref_hierarchies
120 (p_validate in boolean default false
121 ,p_pref_hierarchy_id in out nocopy number
122 ,p_object_version_number in out nocopy number
123 ,p_type in varchar2 default null
124 ,p_name in varchar2
125 ,p_business_group_id in number default null
126 ,p_legislation_code in varchar2 default null
127 ,p_parent_pref_hierarchy_id in number default null
128 ,p_edit_allowed in varchar2
129 ,p_displayed in varchar2
130 ,p_pref_definition_id in number default null
131 ,p_attribute_category in varchar2 default null
132 ,p_attribute1 in varchar2 default null
133 ,p_attribute2 in varchar2 default null
134 ,p_attribute3 in varchar2 default null
135 ,p_attribute4 in varchar2 default null
136 ,p_attribute5 in varchar2 default null
137 ,p_attribute6 in varchar2 default null
138 ,p_attribute7 in varchar2 default null
139 ,p_attribute8 in varchar2 default null
140 ,p_attribute9 in varchar2 default null
141 ,p_attribute10 in varchar2 default null
142 ,p_attribute11 in varchar2 default null
143 ,p_attribute12 in varchar2 default null
144 ,p_attribute13 in varchar2 default null
145 ,p_attribute14 in varchar2 default null
146 ,p_attribute15 in varchar2 default null
147 ,p_attribute16 in varchar2 default null
148 ,p_attribute17 in varchar2 default null
149 ,p_attribute18 in varchar2 default null
150 ,p_attribute19 in varchar2 default null
151 ,p_attribute20 in varchar2 default null
152 ,p_attribute21 in varchar2 default null
153 ,p_attribute22 in varchar2 default null
154 ,p_attribute23 in varchar2 default null
155 ,p_attribute24 in varchar2 default null
156 ,p_attribute25 in varchar2 default null
157 ,p_attribute26 in varchar2 default null
158 ,p_attribute27 in varchar2 default null
159 ,p_attribute28 in varchar2 default null
160 ,p_attribute29 in varchar2 default null
161 ,p_attribute30 in varchar2 default null
162 ,p_orig_pref_hierarchy_id in number default null
163 ,p_orig_parent_hierarchy_id in number default null
164 ,p_effective_date in date default null
165 ,p_top_level_parent_id in number default null --Performance Fix
166 ,p_code in varchar2 default null
167 );
168 --
169 -- ----------------------------------------------------------------------------
170 -- |------------------------<update_pref_hierarchies>-------------------------|
171 -- ----------------------------------------------------------------------------
172 --
173 -- {Start Of Comments}
174 --
175 -- Description:
176 --
177 -- This API updates an existing Preference Hierarchy
178 --
179 -- Prerequisites:
180 --
181 -- None
182 --
183 -- In Parameters:
184 -- Name Reqd Type Description
185 --
186 -- p_validate No boolean IF TRUE then the database
187 -- remains unchanged.IF FALSE
188 -- then a new pref hierarchy is
189 -- created.Default is FALSE.
190 -- p_pref_hierarchy_id Yes number Primary Key for entity
191 -- p_type No varchar2 Specifies the position of the
192 -- node in the hierarchy.
193 -- p_name Yes varchar2 Name of the pref hierarchy
194 -- p_parent_pref_hierarchy_id No number Reference to another row of
195 -- this table
196 -- p_edit_allowed Yes boolean This flag indicates whether
197 -- or not the user can edit the
198 -- instance of the preference
199 -- p_displayed Yes boolean This flag indicates whether
200 -- or not the preference instance
201 -- is displayed on the user pref
202 -- screen
203 -- p_pref_definition_id No number Only populated for leaf nodes
204 -- p_attribute_category No varchar2 Attribute Category for
205 -- attribute columns.Only popula
206 -- ted for leaf nodes.
207 -- p_attribute1..n No varchar2 Values for preferences.
208 -- Only populated for leaf nodes
209 -- p_orig_pref_hierarchy_id No number Used for Setup Form.Stores the
210 -- original pref_hierarcy_id
211 -- while pasting nodes along with
212 -- their child nodes
213 -- p_orig_parent_hierarchy_id No number Used for Setup Form.Stores the
214 -- original parent_pref_hierarcy_
215 -- id while pasting nodes along
216 -- with their child nodes
217 -- p_object_version_number No number Object Version Number
218 -- p_effective_date No date Effective Date
219 -- p_top_level_parent_id No number pref_hierarchy_Id of the top
220 -- level parent.Populated for leaf
221 -- nodes only.
222 -- p_code No varchar2 Code indicates the code for
223 -- the pref_definition_id and
224 -- populated for leaf nodes only.
225 -- Post Success:
226 --
227 -- when the pref hierarchy has been updated successfully the following
228 -- out parameters are set.
229 --
230 -- Name Type Description
231 --
232 -- p_object_version_number Number Object version number for the
233 -- updated pref hierarchies
234 --
235 -- Post Failure:
236 --
237 -- The pref hierarchy will not be updated and an application error raised
238 --
239 -- Access Status:
240 -- Public.
241 --
242 -- {End Of Comments}
243 --
244 procedure update_pref_hierarchies
245 (p_validate in boolean default false
246 ,p_pref_hierarchy_id in number
247 ,p_object_version_number in out nocopy number
248 ,p_type in varchar2 default null
249 ,p_name in varchar2
250 ,p_business_group_id in number default null
251 ,p_legislation_code in varchar2 default null
252 ,p_parent_pref_hierarchy_id in number default null
253 ,p_edit_allowed in varchar2
254 ,p_displayed in varchar2
255 ,p_pref_definition_id in number default null
256 ,p_attribute_category in varchar2 default null
257 ,p_attribute1 in varchar2 default null
258 ,p_attribute2 in varchar2 default null
259 ,p_attribute3 in varchar2 default null
260 ,p_attribute4 in varchar2 default null
261 ,p_attribute5 in varchar2 default null
262 ,p_attribute6 in varchar2 default null
263 ,p_attribute7 in varchar2 default null
264 ,p_attribute8 in varchar2 default null
265 ,p_attribute9 in varchar2 default null
266 ,p_attribute10 in varchar2 default null
267 ,p_attribute11 in varchar2 default null
268 ,p_attribute12 in varchar2 default null
269 ,p_attribute13 in varchar2 default null
270 ,p_attribute14 in varchar2 default null
271 ,p_attribute15 in varchar2 default null
272 ,p_attribute16 in varchar2 default null
273 ,p_attribute17 in varchar2 default null
274 ,p_attribute18 in varchar2 default null
275 ,p_attribute19 in varchar2 default null
276 ,p_attribute20 in varchar2 default null
277 ,p_attribute21 in varchar2 default null
278 ,p_attribute22 in varchar2 default null
279 ,p_attribute23 in varchar2 default null
280 ,p_attribute24 in varchar2 default null
281 ,p_attribute25 in varchar2 default null
282 ,p_attribute26 in varchar2 default null
283 ,p_attribute27 in varchar2 default null
284 ,p_attribute28 in varchar2 default null
285 ,p_attribute29 in varchar2 default null
286 ,p_attribute30 in varchar2 default null
287 ,p_orig_pref_hierarchy_id in number default null
288 ,p_orig_parent_hierarchy_id in number default null
289 ,p_effective_date in date default null
290 ,p_top_level_parent_id in number default null --Performance Fix
291 ,p_code in varchar2 default null
292 );
293 --
294 -- ----------------------------------------------------------------------------
295 -- |------------------------< delete_pref_hierarchies >-----------------------|
296 -- ----------------------------------------------------------------------------
297 --
298 -- {Start Of Comments}
299 --
300 -- Description:
301 --
302 -- This API deletes an existing Preference Hierarchy
303 --
304 -- Prerequisites:
305 --
306 -- None
307 --
308 -- In Parameters:
309 -- Name Reqd Type Description
310 --
311 -- p_validate No boolean If TRUE then the database
312 -- remains unchanged. If FALSE
313 -- then the pref hierarchy
314 -- is deleted. Default is FALSE.
315 -- p_pref_hierarchy_id Yes number Primary Key for entity
316 -- p_object_version_number Yes number Object Version Number
317 --
318 -- Post Success:
319 --
320 -- when the pref hierarchy has been deleted successfully the process
321 -- completes with success.
322 --
323 -- Post Failure:
324 --
325 -- The pref hierrachy will not be deleted and an application error is raised
326 --
327 -- Access Status:
328 -- Public.
329 --
330 -- {End Of Comments}
331 --
332 procedure delete_pref_hierarchies
333 (p_validate in boolean default false
334 ,p_pref_hierarchy_id in number
335 ,p_object_version_number in number
336 );
337 --
338 end hxc_pref_hierarchies_api;