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