1 PACKAGE CZ_CONFIG_API_PVT AUTHID CURRENT_USER AS
2 /* $Header: czcfgpvs.pls 120.1 2012/01/24 07:34:50 nvalakon ship $ */
3
4 G_PKG_NAME CONSTANT VARCHAR2(30) := 'cz_config_api_pvt';
5
6 --------------------------------------------------------------------------------------
7 -- API name : copy_configuration
8 -- Package Name: CZ_CONFIG_API_PVT
9 -- Type : Public
10 -- Pre-reqs : None
11 -- Function : Creates new configuration by copying the input configuration specified by
12 -- p_config_hdr_id and p_config_rev_nbr
13 -- Version : Current version 1.0
14 -- Initial version 1.0
15 -- Note : 1. new config_item_id generated only if copy_mode is CZ_API_PUB.G_NEW_HEADER_COPY_MODE
16 -- and baseline_rev_nbr is null
17 -- 2. caller is responsible for initialization of the message list and commit
18
19 PROCEDURE copy_configuration(p_api_version IN NUMBER
20 ,p_config_hdr_id IN NUMBER
21 ,p_config_rev_nbr IN NUMBER
22 ,p_copy_mode IN VARCHAR2
23 ,x_config_hdr_id OUT NOCOPY NUMBER
24 ,x_config_rev_nbr OUT NOCOPY NUMBER
25 ,x_orig_item_id_tbl OUT NOCOPY CZ_API_PUB.number_tbl_type
26 ,x_new_item_id_tbl OUT NOCOPY CZ_API_PUB.number_tbl_type
27 ,x_return_status OUT NOCOPY VARCHAR2
28 ,x_msg_count OUT NOCOPY NUMBER
29 ,x_msg_data OUT NOCOPY VARCHAR2
30 ,p_handle_deleted_flag IN VARCHAR2 := NULL
31 ,p_new_name IN VARCHAR2 := NULL
32 ,p_force_new_inst_rev IN VARCHAR2 := NULL
33 );
34 -- Parameters:
35 -- IN: p_api_version (required), standard pl/sql api in parameter
36 -- p_config_hdr_id (required), header id of source config to be copied
37 -- p_config_rev_nbr (required), revision of source config to be copied
38 -- p_copy_mode (required), flag to specify whether creating a config having
39 -- new header id or new revision, has one of the following values.
40 -- CZ_API_PUB.G_NEW_HEADER_COPY_MODE
41 -- CZ_API_PUB.G_NEW_REVISION_COPY_MODE
42 -- p_handle_deleted_flag (optional), flag to indicate if handle deleted_flag
43 -- p_new_name (optional), name of the output config
44 -- p_force_new_inst_rev (optional), when called from generate_config_tree, this
45 -- parameter is used to indicate that a new revision should be created for
46 -- any instances contained in the configuration
47 -- OUT: x_config_hdr_id, new config_hdr_id of the new config
48 -- x_config_rev_nbr, config_rev_nbr of the new config
49 -- x_orig_item_id_tbl, table of config_item_ids from the source config
50 -- x_new_item_id_tbl, table of config_item_ids from the new config
51 -- x_return_status, standard OUT NOCOPY parameter (FND_API.G_RET_STS_SUCCESS,
52 -- FND_API.G_RET_STS_ERROR, or FND_API.G_RET_STS_UNEXP_ERROR)
53 -- x_msg_count, standard OUT NOCOPY parameter
54 -- x_msg_data, standard OUT NOCOPY parameter
55
56 -- Validation:
57 -- p_config_hdr_id/p_config_rev_nbr: config exists in cz schema and is a network container
58 -- config or a non-network config, i.e, component_instance_type is 'R'
59 -- p_copy_mode: must be either of the following values
60 -- CZ_API_PUB.G_NEW_HEADER_COPY_MODE
61 -- CZ_API_PUB.G_NEW_REVISION_COPY_MODE
62
63 -- API name : copy_configuration_auto
64 -- Package Name: CZ_CONFIG_API_PVT
65 -- Type : Public
66 -- Pre-reqs : None
67 -- Function : Calls copy_configuration within an autonomous transaction and commits the copied data
68 -- Version : Current version 1.0
69 -- Initial version 1.0
70
71 PROCEDURE copy_configuration_auto
72 (p_api_version IN NUMBER
73 ,p_config_hdr_id IN NUMBER
74 ,p_config_rev_nbr IN NUMBER
75 ,p_copy_mode IN VARCHAR2
76 ,x_config_hdr_id OUT NOCOPY NUMBER
77 ,x_config_rev_nbr OUT NOCOPY NUMBER
78 ,x_orig_item_id_tbl OUT NOCOPY CZ_API_PUB.number_tbl_type
79 ,x_new_item_id_tbl OUT NOCOPY CZ_API_PUB.number_tbl_type
80 ,x_return_status OUT NOCOPY VARCHAR2
81 ,x_msg_count OUT NOCOPY NUMBER
82 ,x_msg_data OUT NOCOPY VARCHAR2
83 ,p_handle_deleted_flag IN VARCHAR2 := NULL
84 ,p_new_name IN VARCHAR2 := NULL
85 );
86
87 --------------------------------------------------------------------------------
88 -- API name : verify_configuration
89 -- Package Name: CZ_CONFIG_API_PVT
90 -- Type : Public
91 -- Pre-reqs : None
92 -- Function : Verifies that the specified configuration exists and returns
93 -- whether it is valid and/or complete
94 -- Version : Current version 1.0
95 -- Initial version 1.0
96
97 PROCEDURE verify_configuration(p_api_version IN NUMBER
98 ,p_config_hdr_id IN NUMBER
99 ,p_config_rev_nbr IN NUMBER
100 ,x_exists_flag OUT NOCOPY VARCHAR2
101 ,x_valid_flag OUT NOCOPY VARCHAR2
102 ,x_complete_flag OUT NOCOPY VARCHAR2
103 ,x_return_status OUT NOCOPY VARCHAR2
104 ,x_msg_count OUT NOCOPY NUMBER
105 ,x_msg_data OUT NOCOPY VARCHAR2
106 );
107
108 -- Parameters:
109 -- IN: p_api_version (required), standard pl/sql api in parameter
110 -- p_config_hdr_id (required), header id of config to be verified
111 -- p_config_rev_nbr (required), revision of config to be verified
112
113 -- OUT: x_exists_flag FND_API.G_TRUE if config_hdr_id and config_rev_nbr describe a saved configuration,
114 -- FND_API.G_FALSE if there is no saved configuration
115 -- x_valid_flag FND_API.G_TRUE if configuration exists and is valid, FND_API.G_FALSE if the configuration
116 -- exists and is invalid, NULL if configuration does not exist.
117 -- x_complete_flag FND_API.G_TRUE if configuration exists and is complete, FND_API.G_FALSE if the
118 -- configuration exists and is incomplete, NULL if configuration does not exist.
119 -- x_return_status, standard OUT parameter (FND_API.G_RET_STS_SUCCESS,
120 -- FND_API.G_RET_STS_ERROR, or FND_API.G_RET_STS_UNEXP_ERROR)
121 -- x_msg_count, standard OUT parameter
122 -- x_msg_data, standard OUT parameter
123
124 -- Validation:
125 -- p_config_hdr_id/p_config_rev_nbr: In 19 Configurator builds and later, the API validates that the configuration header
126 -- identified by config_hdr_id and config_rev_nbr is a session (not instance) header. If not, x_return_status will be
127 -- FND_API.G_RET_STS_ERROR and a message will be returned in x_msg_data.
128
129 END CZ_CONFIG_API_PVT;