DBA Data[Home] [Help]

PACKAGE: APPS.CZ_UIOA_PVT

Source


5 
1 PACKAGE CZ_UIOA_PVT AUTHID CURRENT_USER AS
2 /*	$Header: czuioas.pls 120.3.12010000.3 2009/09/03 13:12:53 vsingava ship $		*/
3 
4   G_OA_STYLE_UI                 CONSTANT VARCHAR2(255) := '7';
6   g_temp_xmldoc           xmldom.DOMDocument;
7   g_temp_source_xml_node  xmldom.DOMNode;
8   g_temp_xml_node         xmldom.DOMNode;
9 
10 
11   TYPE model_nodes_tbl_type IS TABLE OF CZ_UITEMPLS_FOR_PSNODES_V%ROWTYPE INDEX BY VARCHAR2(15);
12   TYPE varchar_tbl_type IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
13 
14   FAILED_TO_LOCK_MODEL    EXCEPTION;
15   FAILED_TO_LOCK_TEMPLATE EXCEPTION;
16 
17   --
18   -- create a new UI for a given model
19   -- Parameters :
20   --   p_model_id           - identifies Model
21   --   p_master_template_id - identifies UI Master Template
22   --   px_ui_def_id         - Id of a new UI
23   --   x_return_status      - status string
24   --   x_msg_count          - number of error messages
25   --   x_msg_data           - string which contains error messages
26   --
27   PROCEDURE create_UI(p_model_id           IN NUMBER,
28                       p_master_template_id IN NUMBER   DEFAULT NULL,
29                       p_ui_name            IN VARCHAR2 DEFAULT NULL,
30                       p_description        IN VARCHAR2 DEFAULT NULL,
31                       p_show_all_nodes     IN VARCHAR2 DEFAULT NULL,
32                       p_create_empty_ui    IN VARCHAR2 DEFAULT NULL,
36                       x_msg_data           OUT NOCOPY  VARCHAR2);
33                       x_ui_def_id          OUT NOCOPY  NUMBER,
34                       x_return_status      OUT NOCOPY  VARCHAR2,
35                       x_msg_count          OUT NOCOPY  NUMBER,
37 
38   --
39   -- refresh a given UI
40   -- Parameters :
41   --   p_ui_def_id          - identifies UI
42   --   x_return_status      - status string
43   --   x_msg_count          - number of error messages
44   --   x_msg_data           - string which contains error messages
45   --
46   PROCEDURE refresh_UI(p_ui_def_id     IN NUMBER,
47                        x_return_status OUT NOCOPY VARCHAR2,
48                        x_msg_count     OUT NOCOPY NUMBER,
49                        x_msg_data      OUT NOCOPY VARCHAR2);
50 
51   --
52   -- refresh given UI element recursively
53   --
54   PROCEDURE refresh_UI_Subtree(p_element_id            IN VARCHAR2,
55                                p_page_id               IN NUMBER,
56                                p_suppress_refresh_flag IN VARCHAR2 DEFAULT NULL);
57 
58   FUNCTION parse_JRAD_Document(p_doc_full_name IN VARCHAR2)
59     RETURN xmldom.DOMDocument;
60 
61   PROCEDURE Save_Document(p_xml_doc  xmldom.DOMDocument,
62                           p_doc_name IN VARCHAR2);
63 
64   FUNCTION create_UI_Page(p_node          IN CZ_UITEMPLS_FOR_PSNODES_V%ROWTYPE,
65                           x_page_set_id   OUT NOCOPY NUMBER,
66                           x_page_set_type OUT NOCOPY NUMBER,
67                           x_page_ref_id   OUT NOCOPY NUMBER,
68                           p_parent_page_id IN NUMBER DEFAULT NULL)
69     RETURN CZ_UI_PAGE_ELEMENTS%ROWTYPE;
70 
71   PROCEDURE add_CX_Button(p_node                IN CZ_UITEMPLS_FOR_PSNODES_V%ROWTYPE,
72                           p_ui_node             IN CZ_UI_PAGE_ELEMENTS%ROWTYPE);
73 
74   PROCEDURE delete_UI_Subtree(p_ui_def_id      IN NUMBER,
75                               p_ui_page_id     IN NUMBER,
76                               p_element_id     IN VARCHAR2,
77                               p_delete_xml     IN VARCHAR2,
78                               x_return_status  OUT NOCOPY VARCHAR2,
79                               x_msg_count      OUT NOCOPY NUMBER,
80                               x_msg_data       OUT NOCOPY VARCHAR2);
81 
82   PROCEDURE delete_UI_Page(p_ui_def_id      IN NUMBER,         -- ui_def_id of UI
83                             p_ui_page_id    IN NUMBER,        -- page_id of
84                                                                 -- UI page which needs
85                                                                 -- to be deleted.
86                             x_return_status  OUT NOCOPY VARCHAR2,-- status string
87                             x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
88                             x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
89                             );
90 
91 
92   PROCEDURE delete_UI_Page_Ref(p_ui_def_id      IN NUMBER,         -- ui_def_id of UI
93                                 p_page_ref_id   IN NUMBER,       -- page_ref_id of
94                                                                     -- Menu/Page Flow link which needs
95                                                                     -- to be deleted.
96                                 x_return_status  OUT NOCOPY VARCHAR2,-- status string
97                                 x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
98                                 x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
99                                 );
100 
101   PROCEDURE delete_Local_Template(p_template_ui_def_id  IN NUMBER,      -- ui_def_id of UI
102                                    p_template_id        IN NUMBER,    -- template_id of
103                                                                         -- Local UI Template which needs
104                                                                         -- to be deleted.
105                                    x_return_status  OUT NOCOPY VARCHAR2,-- status string
106                                    x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
107                                    x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
108                                    );
109 
110   PROCEDURE delete_Local_Template_Elem(p_template_ui_def_id IN NUMBER,          -- ui_def_id of UI
111                                        p_template_id        IN NUMBER,        -- template_id of
112                                        p_element_id         IN VARCHAR2,        -- element_id of Element to delete
113                                        x_return_status      OUT NOCOPY VARCHAR2,-- status string
114                                        x_msg_count          OUT NOCOPY NUMBER,  -- number of error messages
115                                        x_msg_data           OUT NOCOPY VARCHAR2 -- string which contains error messages
116                                        );
117 
118 
119   --
120   -- This procedure copies a UI element and its subtree specified by parameters p_element_id, p_page_id and p_ui_def_id to
121   -- to a new location specified by paremeters p_new_parent_element_id - new parent UI element  and p_target_ui_def_id.
122   -- For all caption intl_text_ids, UI condtion rules ids  from the source page a new copies will be created for use in the copied page.
123 	-- Action records associated to the UI Elements will also be copied, pointing to the same action as the source Element.
124   --
125   PROCEDURE copy_UI_Subtree(p_source_ui_def_id      IN NUMBER,    -- ui_def_id of source UI
126                             p_source_element_id     IN VARCHAR2,  -- element_id of
127                                                                   -- UI element which needs
128                                                                   -- to be copied ( source element )
132                             p_target_parent_element_id     IN VARCHAR2,  -- element_id of
129                             p_source_ui_page_id IN NUMBER,        -- page_id of UI page to which source element belongs to
130                             p_target_ui_def_id  IN NUMBER, -- ui_def_id of target UI
131                             p_target_ui_page_id IN NUMBER,        -- page_id of target UI page
133                                                                          -- new parent UI element
134                             x_new_element_id OUT NOCOPY VARCHAR2,     -- element_id of copied UI element
135                             x_return_status  OUT NOCOPY VARCHAR2,-- status string
136                             x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
137                             x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
138                             );
139 
140   PROCEDURE copy_UI_Page (p_source_ui_def_id       IN NUMBER,         -- ui_def_id of UI
141                           p_source_ui_page_id      IN NUMBER,        -- page_id of
142                                                                -- UI page which needs
143                                                                -- to be copied
144                           p_target_ui_def_id  IN NUMBER,        -- ui_def_id of target UI
145                           x_new_ui_page_id    OUT NOCOPY NUMBER,-- page_id of copied UI page
146                           x_return_status  OUT NOCOPY VARCHAR2,-- status string
147                           x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
148                           x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
149                           );
150 
151 
152   PROCEDURE copy_UI_Page_Ref(p_source_ui_def_id      IN NUMBER,    -- ui_def_id of UI
153                              p_source_page_ref_id    IN NUMBER,  -- page_ref_id of
154                                                                    -- Menu/Page Flow link which needs
155                                                                    -- to be deleted.
156                              p_target_ui_def_id       IN NUMBER,   -- ui_def_id of target UI
157                              p_target_parent_page_ref_id IN NUMBER,-- new parent page ref id
158                              x_page_ref_id OUT NOCOPY NUMBER,    -- template_id of
159                                                                    -- Local UI Template which needs
160                                                                    -- to be copied
161                              x_return_status  OUT NOCOPY VARCHAR2, -- status string
162                              x_msg_count      OUT NOCOPY NUMBER,   -- number of error messages
163                              x_msg_data       OUT NOCOPY VARCHAR2  -- string which contains error messages
164                              );
165 
166 
167   PROCEDURE copy_Local_Template(p_source_ui_def_id       IN NUMBER,   -- ui_def_id of UI
168                                 p_source_template_id     IN NUMBER, -- template_id of
169                                                                       -- Local UI Template which needs
170                                                                       -- to be copied
171                                 p_target_ui_def_id       IN NUMBER,           -- ui_def_id of target UI
172                                 x_new_template_id        OUT NOCOPY NUMBER, -- template_id of
173                                                                               -- Local UI Template which needs
174                                                                               -- to be copied
175                                 x_return_status  OUT NOCOPY VARCHAR2,-- status string
176                                 x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
177                                 x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
178                                 );
179 
180   PROCEDURE copy_Local_Template_Elem(p_source_ui_def_id      IN NUMBER,         -- ui_def_id of UI
181                                      p_source_template_id    IN NUMBER,        -- template_id of
182                                                                                  -- Local UI Template which needs
183                                                                                  -- to be copied
184                                      p_source_element_id     IN VARCHAR2,
185                                      p_target_ui_def_id      IN NUMBER,          -- ui_def_id of UI
186                                      p_target_template_id    IN NUMBER,        -- template_id of
187                                                                                  -- Local UI Template which needs
188                                                                                  -- to be copied
189                                      p_target_parent_element_id IN VARCHAR2,
190                                      x_new_element_id OUT NOCOPY VARCHAR2,       -- template_id of
191                                                                                  -- Local UI Template which needs
192                                                                                  -- to be copied
193                                      x_return_status  OUT NOCOPY VARCHAR2,-- status string
194                                      x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
195                                      x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
196                                      );
197 
198 
199   --
200   -- This procedure creates a new copy of JRAD document specified by parameter p_source_jrad_doc
201   -- new copy will have full JRAD path = p_target_jrad_doc
202   --
203   PROCEDURE copy_JRAD_Document(p_source_jrad_doc    IN VARCHAR2,   -- specify source JRAD document that will be copied
204                                p_target_jrad_doc    IN VARCHAR2,   -- specify full JRAD path of new copy
205                                x_return_status      OUT NOCOPY VARCHAR2,-- status string
209 
206                                x_msg_count          OUT NOCOPY NUMBER,  -- number of error messages
207                                x_msg_data           OUT NOCOPY VARCHAR2 -- string which contains error messages
208                                );
210   PROCEDURE create_Region_From_Template (p_ui_def_id       IN NUMBER,   -- ui_def_id of UI
211                                          p_template_id     IN NUMBER, -- template_id of
212                                                                         -- Local UI Template which needs
213                                                                         -- to be copied
214                                          p_template_ui_def_id    IN NUMBER,
215                                          p_ui_page_id            IN NUMBER,
216                                          p_parent_element_id     IN VARCHAR2, -- ui_def_id of target UI
217                                          x_new_element_id        OUT NOCOPY VARCHAR2, -- element_id of new UI region
218                                          x_return_status  OUT NOCOPY VARCHAR2,-- status string
219                                          x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
220                                          x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
221                                          );
222 
223   PROCEDURE convert_Template_Reference  (p_ui_def_id      IN NUMBER,
224                                          p_ui_page_id     IN NUMBER,
225                                          p_element_id     IN VARCHAR2,
226                                          x_return_status  OUT NOCOPY VARCHAR2,-- status string
227                                          x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
228                                          x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
229                                          );
230 
231   PROCEDURE add_Template_To_Template (p_template_id                 IN NUMBER,
232                                       p_template_ui_def_id          IN NUMBER,
233                                       p_target_template_id          IN NUMBER,
234                                       p_target_template_ui_def_id   IN NUMBER,
235                                       p_parent_element_id           IN VARCHAR2,          -- ui_def_id of target UI
236                                       x_new_element_id        OUT NOCOPY VARCHAR2, -- element_id of new UI region
237                                       x_return_status  OUT NOCOPY VARCHAR2,-- status string
238                                       x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
239                                       x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
240                                       );
241 
242   ------------------------------------------------------------------------------
243   ------------- some procedures for fast access to UI Generation ---------------
244   ------------------------------------------------------------------------------
245 
246   FUNCTION get_Element_XML_Path(p_ui_def_id      IN NUMBER,
247                                 p_page_id        IN NUMBER,
248                                 p_element_id     IN VARCHAR2,
249                                 p_is_parser_open IN VARCHAR2 DEFAULT NULL) RETURN VARCHAR2;
250 
251   -- validate all UI conditions of given UI
252   PROCEDURE validate_UI_Conditions(p_ui_def_id      IN NUMBER,
253                                    p_is_parser_open IN VARCHAR2 DEFAULT NULL);
254 
255   --
256   -- update UI Reference when target ui_def_id is changed
257   -- ( it is called by Developer )
258   --
259   PROCEDURE update_UI_Reference
260   (
261    p_ui_def_id              IN NUMBER,
262    p_ref_persistent_node_id IN NUMBER,
263    p_new_target_ui_def_id   IN NUMBER,
264    x_return_status          OUT NOCOPY VARCHAR2,-- status string
265    x_msg_count              OUT NOCOPY NUMBER,  -- number of error messages
266    x_msg_data               OUT NOCOPY VARCHAR2 -- string which contains error messages
267   );
268 
269   --
270   -- simple UI Generation
271   --
272   PROCEDURE cui(p_model_id           IN NUMBER,
273                 p_master_template_id IN NUMBER DEFAULT NULL,
274                 p_ui_name            IN VARCHAR2 DEFAULT NULL,
275                 p_description        IN VARCHAR2 DEFAULT NULL,
276                 p_show_all_nodes     IN VARCHAR2 DEFAULT NULL,
277                 p_create_empty_ui    IN VARCHAR2 DEFAULT NULL,
278                 p_handling_mode      IN VARCHAR2 DEFAULT NULL);
279 
280   --
281   -- simple UI Refresh
282   --
283   PROCEDURE rui(p_ui_def_id     IN NUMBER,
284                 p_handling_mode IN VARCHAR2 DEFAULT NULL);
285   --vsingava bug8688987 24th Jul '09
286   --
287   --Moves  a given ui_page from one ui to another target ui
288   --
289   PROCEDURE move_JRAD_Document (p_source_jrad_doc IN VARCHAR2,      -- jrad_doc of a ui page to be moved
290                           p_source_page_id         IN  NUMBER,      -- ui page_id of the page being moved
291                           p_source_ui_def_id       IN NUMBER,         -- ui_def_id of UI
292                           p_target_ui_def_id  IN NUMBER,        -- ui_def_id of target UI
293                           x_new_jrad_doc    OUT NOCOPY VARCHAR2,-- jrad_doc of moved UI page doc
294                           x_return_status  OUT NOCOPY VARCHAR2,-- status string
295                           x_msg_count      OUT NOCOPY NUMBER,  -- number of error messages
296                           x_msg_data       OUT NOCOPY VARCHAR2 -- string which contains error messages
297                           );
298 END CZ_UIOA_PVT;