1 PACKAGE cz_network_api_pub AS
2 /* $Header: czntapis.pls 120.2 2005/10/07 10:26:48 misheehy ship $ */
3 /*#
4 * This is the public interface for some operations with configurations in Oracle Configurator
5 * @rep:scope internal
6 * @rep:product CZ
7 * @rep:displayname Network API
8 * @rep:lifecycle active
9 * @rep:compatibility S
10 * @rep:category BUSINESS_ENTITY CZ_CONFIG
11 */
12
13
14 G_PKG_NAME CONSTANT VARCHAR2(30) := 'cz_network_api_pub';
15
16 --------------------------API status return codes-----------------------------------------
17 ---Start of comments
18 ---API name : generate_config_trees
19 ---Type : Public
20 ---Pre-reqs : None
21 ---Function : generates config trees for a given set of config hdr ids and rev nbrs
22 ---Parameters :
23 ---IN : p_api_version IN NUMBER Required
24 --- p_config_tbl IN config_tbl_type Required
25 --- p_tree_copy_mode IN VARCHAR2 Required
26 --- p_appl_param_rec IN appl_param_rec_type Required
27 --- p_validation_context IN VARCHAR2 Required
28 ---OUT :
29 --- : x_return_status OUT NOCOPY VARCHAR2
30 --- x_msg_count OUT NOCOPY NUMBER
31 --- x_msg_data OUT NOCOPY VARCHAR2
32 ---Version: Current version :1.0
33 ---End of comments
34 /*#
35 * generates config trees for a given set of config hdr ids and rev nbrs
36 * @param p_api_version api verion
37 * @param p_config_tbl PL/SQL table which represents configuation
38 * @param p_tree_copy_mode tree copy mode
39 * @param p_appl_param_rec application parameters record
40 * @param p_validation_context validation context
41 * @param x_config_model_tbl PL/SQL table which represents output configuation
42 * @param x_return_status status string
43 * @param x_msg_count number of error messages
44 * @param x_msg_data string which contains error messages
45 * @rep:scope public
46 * @rep:lifecycle active
47 * @rep:displayname Generate Config Trees
48 */
49 PROCEDURE generate_config_trees(p_api_version IN NUMBER,
50 p_config_tbl IN CZ_API_PUB.config_tbl_type,
51 p_tree_copy_mode IN VARCHAR2,
52 p_appl_param_rec IN CZ_API_PUB.appl_param_rec_type,
53 p_validation_context IN VARCHAR2,
54 x_config_model_tbl OUT NOCOPY CZ_API_PUB.config_model_tbl_type,
55 x_return_status OUT NOCOPY VARCHAR2,
56 x_msg_count OUT NOCOPY NUMBER,
57 x_msg_data OUT NOCOPY VARCHAR2
58 );
59
60 ---------------------------------------------------------------------------
61 ---Start of comments
62 ---API name : generate_config_trees
63 ---Type : Public
64 ---Pre-reqs : None
65 ---Function : generates config trees for a given set of config hdr ids and rev nbrs
66 ---Parameters :
67 ---IN : p_api_version IN NUMBER Required
68 --- p_config_tbl IN config_tbl_type Required
69 --- p_tree_copy_mode IN VARCHAR2 Required
70 --- p_appl_param_rec IN appl_param_rec_type Required
71 --- p_validation_context IN VARCHAR2 Required
72 --- p_validation_type IN VARCHAR2
73 ---OUT :
74 --- : x_return_status OUT NOCOPY VARCHAR2
75 --- x_msg_count OUT NOCOPY NUMBER
76 --- x_msg_data OUT NOCOPY VARCHAR2
77 ---Version: Current version :1.0
78 ---End of comments
79 /*#
80 * generates config trees for a given set of config hdr ids and rev nbrs
81 * @param p_api_version api verion
82 * @param p_config_tbl PL/SQL table which represents configuation
83 * @param p_tree_copy_mode tree copy mode
84 * @param p_appl_param_rec application parameters record
85 * @param p_validation_context validation context
86 * @param p_validation_type validation type, valid values are CZ_API_PUB.INTERACTIVE and CZ_API_PUB.VALIDATE_RETURN
87 * @param x_config_model_tbl PL/SQL table which represents output configuation
88 * @param x_return_status status string
89 * @param x_msg_count number of error messages
90 * @param x_msg_data string which contains error messages
91 * @rep:scope public
92 * @rep:lifecycle active
93 * @rep:displayname Generate Config Trees
94 */
95 PROCEDURE generate_config_trees(p_api_version IN NUMBER,
96 p_config_tbl IN CZ_API_PUB.config_tbl_type,
97 p_tree_copy_mode IN VARCHAR2,
98 p_appl_param_rec IN CZ_API_PUB.appl_param_rec_type,
99 p_validation_context IN VARCHAR2,
100 p_validation_type IN VARCHAR2,
101 x_config_model_tbl OUT NOCOPY CZ_API_PUB.config_model_tbl_type,
102 x_return_status OUT NOCOPY VARCHAR2,
103 x_msg_count OUT NOCOPY NUMBER,
104 x_msg_data OUT NOCOPY VARCHAR2
105 );
106
107 ------------------------------------------------------------------------------------------
108 -----procedure adds instances to the saved configuration of a container model
109 -- Parameters:
110
111 -- IN: p_api_version (required), standard pl/sql api in parameter
112 -- p_inventory_item_id (optional), top inventory_item_id of network
113 -- container model
114 -- p_organization_id (optional), organization_id of network container model
115 -- p_config_hdr_id (optional), header id of saved network container config
116 -- p_config_rev_nbr (optional), revision of saved network container config
117 -- p_instance_tbl (required), table of instance records (config_hdr_id, config_rev_nbr)
118 -- p_tree_copy_mode (required), flag to specify the type of hierarchy to
119 -- build, has one of the following values. G_NEW_HEADER_COPY_MODE G_NEW_REVISION_COPY_MODE
120 -- p_appl_param_rec (required), publication applicability parameters
121 -- program callers should pass in the same set of applicability
122 -- parameter values as they pass in the Configurator xml initialize
123 -- message
124 -- p_validation_context (optional), has one of the following values. G_PENDING_OR_INSTALLED G_INSTALLED
125
126 -- OUT: x_config_model_rec, new network container output record
127 -- If any error occurs during the execution of this procedure,
128 -- x_config_model_rec will be null.
129 -- x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
130 -- x_msg_count, standard OUT NOCOPY parameter
131 -- x_msg_data, standard OUT NOCOPY parameter
132 /*#
133 * procedure adds instances to the saved configuration of a container model
134 * @param p_api_version api verion
135 * @param p_inventory_item_id top inventory_item_id of network container model
136 * @param p_organization_id organization_id of network container model
137 * @param p_config_hdr_id header id of saved network container config
138 * @param p_config_rev_nbr revision of saved network container config
139 * @param p_instance_tbl table of instance records (config_hdr_id, config_rev_nbr)
140 * @param p_tree_copy_mode flag to specify the type of hierarchy to
141 * build, has one of the following values : G_NEW_HEADER_COPY_MODE G_NEW_REVISION_COPY_MODE
142 * @param p_appl_param_rec publication applicability parameters
143 * program callers should pass in the same set of applicability
144 * parameter values as they pass in the Configurator xml initialize message
145 * @param p_validation_context has one of the following values. G_PENDING_OR_INSTALLED G_INSTALLED
146 * @param x_config_model_rec new network container output record
147 * If any error occurs during the execution of this procedure,
148 * x_config_model_rec will be null.
149 * @param x_return_status status string
150 * @param x_msg_count number of error messages
151 * @param x_msg_data string which contains error messages
152 * @rep:scope public
153 * @rep:lifecycle active
154 * @rep:displayname Add to Config Tree
155 */
156 PROCEDURE add_to_config_tree (p_api_version IN NUMBER,
157 p_inventory_item_id IN NUMBER,
158 p_organization_id IN NUMBER,
159 p_config_hdr_id IN NUMBER,
160 p_config_rev_nbr IN NUMBER,
161 p_instance_tbl IN CZ_API_PUB.config_tbl_type,
162 p_tree_copy_mode IN VARCHAR2,
163 p_appl_param_rec IN CZ_API_PUB.appl_param_rec_type,
164 p_validation_context IN VARCHAR2,
165 x_config_model_rec OUT NOCOPY CZ_API_PUB.config_model_rec_type,
166 x_return_status OUT NOCOPY VARCHAR2,
167 x_msg_count OUT NOCOPY NUMBER,
168 x_msg_data OUT NOCOPY VARCHAR2);
169
170 -------------------------------------------------------------------------------------------
171 -- API name : get_contained_models
172 -- Package Name: CZ_NETWORK_API_PUB
173 -- -Type : Public
174 -- Pre-reqs : None
175 -- Function: Retrieves all possible enclosed trackable child models for the network
176 -- container model specified by the input inventory_item_id and
177 -- organization_id
178 -- Version : Current version 1.0
179 -- Initial version 1.0
180
181 -- Parameters:
182 -- IN: p_api_version (required), standard IN parameter
183 -- p_inventory_item_id (required), top inventory_item_id of network
184 -- container model
185 -- p_organization_id (required), organization_id of network container model
186 -- p_appl_param_rec (required), publication applicability parameters
187 -- program callers should pass in the same set of applicability
188 -- parameter values as they pass in the Configurator xml initialize
189 -- message
190 --
191 -- OUT: x_model_tbl, output array of inventory_item_ids of enclosed models
192 -- IF any error occurs during execution of this procedure, null will be
193 -- returned.
194 -- x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
195 -- x_msg_count, standard OUT NOCOPY parameter
196 -- x_msg_data, standard OUT NOCOPY parameter
197 /*#
198 * retrieves all possible enclosed trackable child models for the network
199 * container model specified by the input inventory_item_id and organization_id
200 * @param p_api_version api verion
201 * @param p_inventory_item_id top inventory_item_id of network container model
202 * @param p_organization_id organization_id of network container model
203 * @param p_appl_param_rec application parameters record
204 * @param x_model_tbl PL/SQL table which represents output configuation
205 * @param x_return_status status string
206 * @param x_msg_count number of error messages
207 * @param x_msg_data string which contains error messages
208 * @rep:scope public
209 * @rep:lifecycle active
210 * @rep:displayname Get Contained Models
211 */
212 procedure get_contained_models(p_api_version IN NUMBER
213 ,p_inventory_item_id IN NUMBER
214 ,p_organization_id IN NUMBER
215 ,p_appl_param_rec IN CZ_API_PUB.appl_param_rec_type
216 ,x_model_tbl OUT NOCOPY CZ_API_PUB.number_tbl_type
217 ,x_return_status OUT NOCOPY VARCHAR2
218 ,x_msg_count OUT NOCOPY NUMBER
219 ,x_msg_data OUT NOCOPY VARCHAR2
220 );
221
222 ------------------------------------------------------------------------------
223 -- API name : is_container
224 -- Package Name: CZ_NETWORK_API_PUB
225 -- Type : Public
226 -- Pre-reqs : None
227 -- Function: Checks if a model specified by the top inventory_item_id and
228 -- organization_id is a network container model.
229 -- Version : Current version 1.0
230 -- Initial version 1.0
231 -- Parameters:
232 -- IN: p_api_version (required), standard IN parameterp_inventory_item_id (required), top inventory_item_id of model
233 -- p_inventory_item_id (required), top inventory_item_id of model
234 -- p_organization_id (required), organization_id of model
235 -- p_appl_param_rec (required), publication applicability parameters
236 -- program callers should pass in the same set of applicability
237 -- parameter values as they pass in the Configurator xml initialize
238 -- message.
239 -- OUT: x_return_value, has one of the following values FND_API.G_TRUE,FND_API.G_FALSE,NULL
240 -- x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
241 -- x_msg_count, standard OUT NOCOPY parameter
242 -- x_msg_data, standard OUT NOCOPY parameter
243 /*#
244 * Checks if a model specified by the top inventory_item_id and organization_id is a network container model.
245 * @param p_api_version api verion
246 * @param p_inventory_item_id top inventory_item_id of network container model
247 * @param p_organization_id organization_id of network container model
248 * @param p_appl_param_rec publication applicability parameters
249 * program callers should pass in the same set of applicability
250 * parameter values as they pass in the Configurator xml initialize message
251 * @param x_return_value has one of the following values FND_API.G_TRUE,FND_API.G_FALSE,NULL
255 * @rep:scope public
252 * @param x_return_status status string
253 * @param x_msg_count number of error messages
254 * @param x_msg_data string which contains error messages
256 * @rep:lifecycle active
257 * @rep:displayname Check if it is Container
258 */
259 procedure is_container(p_api_version IN NUMBER
260 ,p_inventory_item_id IN NUMBER
261 ,p_organization_id IN NUMBER
262 ,p_appl_param_rec IN CZ_API_PUB.appl_param_rec_type
263 ,x_return_value OUT NOCOPY VARCHAR2
264 ,x_return_status OUT NOCOPY VARCHAR2
265 ,x_msg_count OUT NOCOPY NUMBER
266 ,x_msg_data OUT NOCOPY VARCHAR2
267 );
268
269 ----------------------------------------------------------------------------------
270 -- API name : is_configurable
271 -- Package Name: CZ_NETWORK_API_PUB
272 -- Type : Public
273 -- Pre-reqs : None
274 -- Function: Checks whether a config item is independently configurable or not.
275 -- Version : Current version 1.0
276 -- Initial version 1.0
277 -- Parameters:
278 -- IN: p_api_version (required), standard IN parameter
279 -- p_config_hdr_id (required), config_hdr_id of an instance
280 -- IN: p_config_hdr_id (required), config_hdr_id of an instance
281 -- p_config_hdr_id (required), config_hdr_id of an instance
282 -- p_config_rev_nbr (required), config_rev_nbr of an instance
283 -- p_config_item_id (required), config_item_id of an instance item
284 -- OUT: x_return_value, has one of the following values FND_API.G_TRUE, FND_API.G_FALSE,NULL
285 -- x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
286 -- x_msg_count, standard OUT NOCOPY parameter
287 -- x_msg_data, standard OUT NOCOPY parameter
288 /*#
289 * Checks whether a config item is independently configurable or not.
290 * @param p_api_version api verion
291 * @param p_config_hdr_id config_hdr_id of an instance
292 * @param p_config_rev_nbr config_rev_nbr of an instance
293 * @param p_config_item_id config_item_id of an instance item
294 * @param x_return_value has one of the following values FND_API.G_TRUE,FND_API.G_FALSE,NULL
295 * @param x_return_status status string
296 * @param x_msg_count number of error messages
297 * @param x_msg_data string which contains error messages
298 * @rep:scope public
299 * @rep:lifecycle active
300 * @rep:displayname Check if it is Configurable
301 */
302 procedure is_configurable(p_api_version IN NUMBER
303 ,p_config_hdr_id IN NUMBER
304 ,p_config_rev_nbr IN NUMBER
305 ,p_config_item_id IN NUMBER
306 ,x_return_value OUT NOCOPY VARCHAR2
307 ,x_return_status OUT NOCOPY VARCHAR2
308 ,x_msg_count OUT NOCOPY NUMBER
309 ,x_msg_data OUT NOCOPY VARCHAR2
310 );
311
312 --------------------------------------------------------------------------
313 -- API name : is_rma_allowed
314 -- Package Name: CZ_NETWORK_API_PUB
315 -- Type : Public
316 -- Pre-reqs : None
317 -- Function: Checks if a configurable item instance can be split.
318 -- Version : Current version 1.0
319 -- Initial version 1.0
320 -- Parameters:
321 -- IN: p_api_version (required), standard IN parameter
322 -- p_config_hdr_id (required), config_hdr_id of an instance
323 -- IN: p_config_hdr_id (required), config_hdr_id of the instance
324 -- p_config_rev_nbr (required), config_rev_nbr of the instance
325 -- p_config_item_id (required), config_item_id of the instance item
326 -- OUT: x_return_value, has one of the following values FND_API.G_TRUE, FND_API.G_FALSE, NULL
327 -- x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
328 -- x_msg_count, standard OUT NOCOPY parameter
329 -- x_msg_data, standard OUT NOCOPY parameter
330 /*#
331 * Checks if a configurable item instance can be split.
332 * @param p_api_version api verion
333 * @param p_config_hdr_id config_hdr_id of an instance
334 * @param p_config_rev_nbr config_rev_nbr of an instance
335 * @param p_config_item_id config_item_id of an instance item
336 * @param x_return_value has one of the following values FND_API.G_TRUE,FND_API.G_FALSE,NULL
337 * @param x_return_status status string
338 * @param x_msg_count number of error messages
339 * @param x_msg_data string which contains error messages
340 * @rep:scope public
341 * @rep:lifecycle active
342 * @rep:displayname Check if a configurable item instance can be split.
343 */
344 procedure is_rma_allowed(p_api_version IN NUMBER
345 ,p_config_hdr_id IN NUMBER
346 ,p_config_rev_nbr IN NUMBER
347 ,p_config_item_id IN NUMBER
348 ,x_return_value OUT NOCOPY VARCHAR2
349 ,x_return_status OUT NOCOPY VARCHAR2
350 ,x_msg_count OUT NOCOPY NUMBER
351 ,x_msg_data OUT NOCOPY VARCHAR2
352 );
353
354 -------------------------------------------------------------------------------
355 -- API name : ext_deactivate_item
356 -- Package Name: CZ_NETWORK_API_PUB
357 -- Type : Public
358 -- Pre-reqs: None
359 -- Function: Externally deactivates an instance from CZ_CONFIG_DETAILS_V.
360 -- Version : Current version 1.0
361 -- Initial version 1.0
362 -- Parameters:
363 -- IN: p_api_version (required), standard IN parameter
364 -- p_config_hdr_id (required), config_hdr_id of an iteminstance
365 -- p_config_rev_nbr (required), config_rev_nbr of an iteminstance
366 -- p_config_item_id (required), config_item_id of an iteminstance
367 -- OUT: x_return_status, standard OUT NOCOPY parameter (see generate_config_trees)
368 -- x_msg_count, standard OUT NOCOPY parameter
369 -- x_msg_data, standard OUT NOCOPY parameter
370 /*#
371 * Externally deactivates an instance from CZ_CONFIG_DETAILS_V.
372 * @param p_api_version api verion
373 * @param p_config_hdr_id config_hdr_id of an instance
374 * @param p_config_rev_nbr config_rev_nbr of an instance
375 * @param p_config_item_id config_item_id of an instance item
376 * @param x_return_status status string
377 * @param x_msg_count number of error messages
378 * @param x_msg_data string which contains error messages
379 * @rep:scope public
380 * @rep:lifecycle active
381 * @rep:displayname Externally deactivate an instance from CZ_CONFIG_DETAILS_V.
382 */
383 procedure ext_deactivate_item(p_api_version IN NUMBER
384 ,p_config_hdr_id IN NUMBER
385 ,p_config_rev_nbr IN NUMBER
386 ,p_config_item_id IN NUMBER
387 ,x_return_status OUT NOCOPY VARCHAR2
388 ,x_msg_count OUT NOCOPY NUMBER
389 ,x_msg_data OUT NOCOPY VARCHAR2
390 );
391
392 --------------------------Validation status return codes----------------------------------
393 PROCEDURE VALIDATE ( config_input_list IN CZ_CF_API.CFG_INPUT_LIST, -- input selections
394 init_message IN VARCHAR2, -- additional XML
395 config_messages IN OUT NOCOPY CZ_CF_API.CFG_OUTPUT_PIECES, -- table of output XML messages
396 validation_status IN OUT NOCOPY NUMBER, -- status return
397 URL IN VARCHAR2 DEFAULT FND_PROFILE.Value('CZ_UIMGR_URL'),
398 p_validation_type IN VARCHAR2 DEFAULT CZ_API_PUB.VALIDATE_ORDER
399 );
400
401 -- The "is_item_added" function returns 1 if the config item has an "add" delta, 0 if not.
402 -- Note that p_config_hdr_id and p_config_rev_nbr are for the session header, not the instance header.
403
404 FUNCTION is_item_added (p_config_hdr_id IN NUMBER,
405 p_config_rev_nbr IN NUMBER,
406 p_config_item_id IN NUMBER) RETURN pls_integer;
407
408 END cz_network_api_pub;