DBA Data[Home] [Help]

PACKAGE: APPS.CZ_MODEL_MIGRATION_PVT

Source


1 PACKAGE cz_model_migration_pvt AS
2 /* $Header: czmdlmgs.pls 120.4 2006/01/30 07:27:40 srangar ship $ */
3 
4 TYPE t_varchar40_array_tbl_type IS TABLE OF VARCHAR2(40) INDEX BY BINARY_INTEGER;
5 TYPE t_num_array_tbl_type       IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
6 
7 TARGET_SERVER_PUBLISH_ALLOW     CONSTANT VARCHAR2(1)  := '0';
8 TARGET_SERVER_PUBLISH_NOTALLOW  CONSTANT VARCHAR2(1)  := '1';
9 MODEL_PUBLICATION_OBSELETE      CONSTANT VARCHAR2(3)  := 'OBS';
10 
11 MIGRATE_MODEL                   CONSTANT VARCHAR2(20) := 'MIGRATEMODEL';
12 MODE_MIGRATION                  CONSTANT VARCHAR2(1)  := 'M';
13 MODE_PUBLICATION                CONSTANT VARCHAR2(1)  := 'P';
14 MODE_COPY                       CONSTANT VARCHAR2(1)  := 'T';
15 
16 PUB_SOURCE_FLAG                 CONSTANT VARCHAR2(1)  := 'S';
17 PUB_TARGET_FLAG                 CONSTANT VARCHAR2(1)  := 'T';
18 MIG_SOURCE_FLAG                 CONSTANT VARCHAR2(1)  := 'M';
19 MIG_TARGET_FLAG                 CONSTANT VARCHAR2(1)  := 'R';
20 
21 CHANGE_FLAG_UNCHANGED           CONSTANT VARCHAR2(1)  := 'N';
22 ---------------------------------------------------------------------------------------
23 /*
24  * Public API for Model Migration.
25  * @param p_request_id This is the CZ_MODEL_PUBLICATIONS, MIGRATION_GROUP_ID of the migration request.
26  *                     Migration request is created by Developer and contains the list of all models selected
27  *                     for Migration from the source's Configurator Repository, target Instance name and
28  *                     target Repository Folder.
29  * @param p_userid     Standard parameters required for locking. Represent calling user.
30  * @param p_respid     Standard parameters required for locking. Represent calling responsibility.
31  * @param p_applid     Standard parameters required for locking. Represent calling application.
32  * @param p_run_id     Number identifying the session. If left NULL, the API will generate the number and
33  *                     return it in x_run_id.
34  * @param x_run_id     Output parameter containing internally generated session identifier if p_run_id
35  *                     was NULL, otherwise equal to p_run_id.
36  */
37 
38 PROCEDURE migrate_models(p_request_id  IN  NUMBER,
39                          p_user_id     IN  NUMBER,
40                          p_resp_id     IN  NUMBER,
41                          p_appl_id     IN  NUMBER,
42                          p_run_id      IN  NUMBER,
43                          x_run_id      OUT NOCOPY NUMBER,
44                          x_status      OUT NOCOPY VARCHAR2
45                         );
46 ---------------------------------------------------------------------------------------
47 /*
48  * Migrate Models concurrent procedure.
49  * @param errbuf       Standard Oracle Concurrent Program output parameters.
50  * @param retcode      Standard Oracle Concurrent Program output parameters.
51  * @param p_request_id This is the CZ_MODEL_PUBLICATIONS, MIGRATION_GROUP_ID of the migration request.
52  *                     Migration request is created by Developer and contains the list of all models selected
53  *                     for Migration from the source's Configurator Repository, target Instance name and
54  *                     target Repository Folder.
55  */
56 
57 PROCEDURE migrate_models_cp(errbuf       OUT NOCOPY VARCHAR2,
58                             retcode      OUT NOCOPY NUMBER,
59                             p_request_id IN  NUMBER
60                            );
61 ---------------------------------------------------------------------------------------
62 /*
63  * Procedure for persistent id(s) allocation in migrated models.
64  * @param p_model_id       devl_project_id of the model.
65  * @param x_new_record_id  Candidate for the new id.
66  */
67 
68 PROCEDURE allocate_persistent_id(p_model_id      IN NUMBER,
69                                  x_new_record_id IN OUT NOCOPY NUMBER
70                                 );
71 ---------------------------------------------------------------------------------------
72 /*
73  * Concurrent procedure for Configuration Upgrade by Item.
74  * @param errbuf              Standard Oracle Concurrent Program output parameters.
75  * @param retcode             Standard Oracle Concurrent Program output parameters.
76  * @param p_organization_id   Used to search configurations by organization ID, required.
77  * @param p_top_inv_item_from Used to search configurations by top item, required.
78  * @param p_top_inv_item_to   Used to search configurations by top item, optional
79  * @param p_application_id    Used to refine search for equivalent published models
80  *                            to use as baselines for upgrade, optional.
81  * @param p_config_begin_date Optional, if present, indicates the date of the oldest
82  *                            configuration to be updated.
83  * @param p_config_end_date   Optional, if present, indicates the date of the newest
84  *                            configuration to be updated.
85  */
86 
87 PROCEDURE upgrade_configs_by_items_cp
88        (errbuf              OUT NOCOPY VARCHAR2
89        ,retcode             OUT NOCOPY NUMBER
90        ,p_organization_code IN VARCHAR2
91        ,p_organization_id   IN NUMBER
92        ,p_top_inv_item_from IN VARCHAR2
93        ,p_top_inv_item_to   IN VARCHAR2
94        ,p_application_id    IN NUMBER
95        ,p_config_begin_date IN VARCHAR2
96        ,p_config_end_date   IN VARCHAR2
97        );
98 ---------------------------------------------------------------------------------------
99 /*
100  * Concurrent procedure for Configuration Upgrade by Product key.
101  * @param errbuf              Standard Oracle Concurrent Program output parameters.
102  * @param retcode             Standard Oracle Concurrent Program output parameters.
103  * @param p_product_key       Used to search configurations, required.
104  * @param p_application_id    Used to refine search for equivalent published models
105  *                            to use as baselines for upgrade, optional.
106  * @param p_config_begin_date Optional, if present, indicates the date of the oldest
107  *                            configuration to be updated.
108  * @param p_config_end_date   Optional, if present, indicates the date of the newest
109  *                            configuration to be updated.
110  */
111 
112 PROCEDURE upgrade_configs_by_product_cp
113        (errbuf               OUT NOCOPY VARCHAR2
114        ,retcode              OUT NOCOPY NUMBER
115        ,p_product_key        IN VARCHAR2
116        ,p_application_id     IN NUMBER
117        ,p_config_begin_date  IN VARCHAR2
118        ,p_config_end_date    IN VARCHAR2
119        );
120 ---------------------------------------------------------------------------------------
121 /*
122  * This procedure converts a publication target to a Development Instance.
123  * @param errbuf       Standard Oracle Concurrent Program output parameters.
124  * @param retcode      Standard Oracle Concurrent Program output parameters.
125  */
126 
127 PROCEDURE convert_instance_cp(errbuf       OUT NOCOPY VARCHAR2,
128                               retcode      OUT NOCOPY NUMBER
129                              );
130 ---------------------------------------------------------------------------------------
131 PROCEDURE obsolete_nonpublishable(p_commit_flag   IN VARCHAR2,
132                                   x_return_status OUT NOCOPY VARCHAR2,
133                                   x_msg_count     OUT NOCOPY NUMBER,
134                                   x_msg_data      OUT NOCOPY VARCHAR2
135                                  );
136 
137 ---------------------------------------------------------------------------------------
138 /*
139  * The target machine may have been converted into a Developer enabled, migratable machine.
140  * If so, the target is publishable no more.
141  *
142  * This method will verify for each server before, presenting to the user in a Dropdown
143  * when a publication is defined in Developer.
144  */
145 
146 FUNCTION target_open_for (
147    p_migration_or_publishing   IN   VARCHAR2,
148    p_link_name                 IN   VARCHAR2,
149    p_local_name                IN   VARCHAR2
150 )  RETURN VARCHAR2;
151 ---------------------------------------------------------------------------------------
152 /*
153  * For a given link name, get the converted target name.
154  */
155 
156 FUNCTION get_converted_target(p_link_name  IN VARCHAR2, p_instance_name IN VARCHAR2)
157   RETURN VARCHAR2;
158 ---------------------------------------------------------------------------------------
159 /*
160  * The target machine may have been convrted into
161  * a Developer enabled, migratable machine.
162  * If so, the target is publishable no more
163  */
164 
165 FUNCTION get_target_name_if_converted RETURN t_varchar40_array_tbl_type;
166 ---------------------------------------------------------------------------------------
167 END;