DBA Data[Home] [Help]

PACKAGE: APPS.CZ_CONFIG_API_PUB

Source


1 PACKAGE CZ_CONFIG_API_PUB AUTHID CURRENT_USER AS
2 /*      $Header: czcfgaps.pls 120.0 2005/05/25 05:26:35 appldev noship $  */
3 
4 G_PKG_NAME 	CONSTANT VARCHAR2(30) := 'cz_config_api_pub';
5 
6 --------------------------------------------------------------------------------------
7 -- API name    :  copy_configuration
8 -- Package Name:  CZ_CONFIG_API_PUB
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 initializtion 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                             );
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 
45 --        OUT:  x_config_hdr_id, new config_hdr_id of the new config
46 --              x_config_rev_nbr, config_rev_nbr of the new config
47 --              x_orig_item_id_tbl, table of config_item_ids from the source config
48 --              x_new_item_id_tbl, table of config_item_ids from the new config
49 --              x_return_status, standard OUT NOCOPY parameter (FND_API.G_RET_STS_SUCCESS,
50 --                FND_API.G_RET_STS_ERROR, or FND_API.G_RET_STS_UNEXP_ERROR)
51 --              x_msg_count, standard OUT NOCOPY parameter
52 --              x_msg_data, standard OUT NOCOPY parameter
53 
54 -- Validation:
55 --   p_config_hdr_id/p_config_rev_nbr: config exists in cz schema and is a network container
56 --        config or a non-network config, i.e, component_instance_type is 'R'
57 --   p_copy_mode: must be either of the following values
58 --                    CZ_API_PUB.G_NEW_HEADER_COPY_MODE
59 --                    CZ_API_PUB.G_NEW_REVISION_COPY_MODE
60 
61 
62 -- API name    :  copy_configuration_auto
63 -- Package Name:  CZ_CONFIG_API_PUB
64 -- Type        :  Public
65 -- Pre-reqs    :  None
66 -- Function    :  Calls copy_configuration within an autonomous transaction and commits the copied data
67 -- Version     :  Current version 1.0
68 --                Initial version 1.0
69 
70 PROCEDURE copy_configuration_auto
71              (p_api_version          IN  NUMBER
72              ,p_config_hdr_id        IN  NUMBER
73              ,p_config_rev_nbr       IN  NUMBER
74              ,p_copy_mode            IN  VARCHAR2
75              ,x_config_hdr_id        OUT NOCOPY  NUMBER
76              ,x_config_rev_nbr       OUT NOCOPY  NUMBER
77              ,x_orig_item_id_tbl     OUT NOCOPY  CZ_API_PUB.number_tbl_type
78              ,x_new_item_id_tbl      OUT NOCOPY  CZ_API_PUB.number_tbl_type
79              ,x_return_status        OUT NOCOPY  VARCHAR2
80              ,x_msg_count            OUT NOCOPY  NUMBER
81              ,x_msg_data             OUT NOCOPY  VARCHAR2
82              ,p_handle_deleted_flag  IN  VARCHAR2 := NULL
83              ,p_new_name             IN  VARCHAR2 := NULL
84       );
85 
86 --------------------------------------------------------------------------------
87 -- API name    :  verify_configuration
88 -- Package Name:  CZ_CONFIG_API_PUB
89 -- Type        :  Public
90 -- Pre-reqs    :  None
91 -- Function    :  Verifies that the specified configuration exists and returns
92 --                whether it is valid and/or complete
93 -- Version     :  Current version 1.0
94 --                Initial version 1.0
95 
96 PROCEDURE verify_configuration(p_api_version        IN  NUMBER
97                               ,p_config_hdr_id      IN  NUMBER
98                               ,p_config_rev_nbr     IN  NUMBER
99                               ,x_exists_flag        OUT NOCOPY  VARCHAR2
100                               ,x_valid_flag         OUT NOCOPY  VARCHAR2
101                               ,x_complete_flag      OUT NOCOPY  VARCHAR2
102                               ,x_return_status      OUT NOCOPY  VARCHAR2
103                               ,x_msg_count          OUT NOCOPY  NUMBER
104                               ,x_msg_data           OUT NOCOPY  VARCHAR2
105                               );
106 
107 -- Parameters:
108 --         IN:  p_api_version (required), standard pl/sql api in parameter
109 --              p_config_hdr_id (required), header id of config to be verified
110 --              p_config_rev_nbr (required), revision of config to be verified
111 
112 --        OUT:  x_exists_flag  FND_API.G_TRUE if config_hdr_id and config_rev_nbr describe a saved configuration,
113 --                             FND_API.G_FALSE if there is no saved configuration
114 --              x_valid_flag  FND_API.G_TRUE if configuration exists and is valid, FND_API.G_FALSE if the configuration
115 --                            exists and is invalid, NULL if configuration does not exist.
116 --              x_complete_flag  FND_API.G_TRUE if configuration exists and is complete, FND_API.G_FALSE if the
117 --                               configuration exists and is incomplete, NULL if configuration does not exist.
118 --              x_return_status, standard OUT parameter (FND_API.G_RET_STS_SUCCESS,
119 --                FND_API.G_RET_STS_ERROR, or FND_API.G_RET_STS_UNEXP_ERROR)
120 --              x_msg_count, standard OUT parameter
121 --              x_msg_data, standard OUT parameter
122 
123 -- Validation:
124 --   p_config_hdr_id/p_config_rev_nbr: In 19 Configurator builds and later, the API validates that the configuration header
125 --   identified by config_hdr_id and config_rev_nbr is a session (not instance) header.  If not, x_return_status will be
126 --   FND_API.G_RET_STS_ERROR and a message will be returned in x_msg_data.
127 
128 END CZ_CONFIG_API_PUB;